max v2; #N vpatcher 84 56 883 533; #P window setfont Times 12.; #P window linecount 2; #P comment 31 88 136 1310732 suppress note-off messages (ones with a velocity of 0); #P comment 544 129 233 1310732 find the difference between the played MIDI key and the known pitch of the recorded sample; #P comment 309 91 233 1310732 split a message into multiple ordered messages \, in this case an int followed by a bang; #P window setfont Times 18.; #P window linecount 1; #P comment 47 245 126 1310738 trigger playback; #P comment 196 411 96 1310738 audio on/off; #P window linecount 2; #P comment 380 315 223 1310738 calculate playback speed based on the twelfth root of 2; #P comment 526 155 115 1310738 transposition (in semitones); #P window linecount 3; #P comment 72 144 276 1310738 Transpose the pitch of a recorded note by changing the playback speed based on the incoming MIDI pitch; #P window setfont "Fixedwidth Serif" 18.; #P window linecount 1; #P newex 261 210 98 1441810 loadbang; #P newex 40 59 109 1441810 stripnote; #P newex 40 26 98 1441810 notein a; #P newex 178 91 131 1441810 trigger b i; #P newex 490 130 54 1441810 - 40; #P user kslider 178 29 54 0 36 60 31 12 0 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0; #P user ezdac~ 223 379 267 412 0; #P message 28 244 19 1441810 1; #P toggle 240 281 15 0; #P flonum 457 288 96 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P message 457 234 19 1441810 2; #P newex 457 260 43 1441810 pow; #P number 490 166 35 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 490 193 65 1441810 / 12.; #P message 261 277 142 1441810 open E1.aiff; #N sfplay~ 1 120960 0 ; #P newobj 240 320 87 1441810 sfplay~; #P user panel 206 252 215 179; #X brgb 214 251 212; #X frgb 0 0 0; #X border 0; #X rounded 16; #X shadow 0; #X done; #P fasten 13 0 9 0 183 121 33 121; #P connect 14 0 15 0; #P fasten 14 1 15 1 89 54 144 54; #P connect 11 0 13 0; #P fasten 15 0 13 0 45 87 183 87; #P connect 1 0 10 0; #P fasten 9 0 8 0 33 273 245 273; #P connect 2 0 1 0; #P connect 8 0 1 0; #P connect 1 0 10 1; #P connect 16 0 2 0; #P fasten 7 0 1 1 462 314 322 314; #P fasten 3 0 6 0 495 228 462 228; #P connect 6 0 5 0; #P connect 5 0 7 0; #P fasten 13 1 12 0 304 121 495 121; #P connect 12 0 4 0; #P connect 4 0 3 0; #P connect 3 0 5 1; #P pop;