max v2; #N vpatcher 30 89 912 708; #P window setfont Times 12.; #P window linecount 1; #P comment 601 437 229 1310732 load multiple 'cues' into a single sfplay~ object; #P window linecount 2; #P comment 314 182 204 1310732 a database of samples and transpositions to use based on the MIDI key played; #P comment 93 173 136 1310732 suppress note-off messages (ones with a velocity of 0); #P window linecount 1; #P comment 335 217 204 1310732 split a list into multiple ordered messages; #P window setfont Times 18.; #P window linecount 2; #P comment 193 385 143 1310738 trigger playback of the desired 'cue'; #P window linecount 1; #P comment 290 527 96 1310738 audio on/off; #P window linecount 3; #P comment 425 419 147 1310738 calculate playback speed based on the twelfth root of 2; #P window linecount 2; #P comment 482 264 115 1310738 transposition (in semitones); #P window linecount 4; #P comment 308 26 276 1310738 Choose an appropriate sample and transpose the pitch of the 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 259 212 76 1441810 unpack; #P newex 121 139 109 1441810 stripnote; #P newex 121 106 98 1441810 notein a; #P user kslider 259 109 54 0 36 60 31 12 0 128 128 128 128 128 128 255 255 255 0 0 0 0 0 0; #P flonum 414 396 96 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P message 414 342 19 1441810 2; #P newex 414 368 43 1441810 pow; #P number 447 274 35 18 0 0 0 22 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 447 301 65 1441810 / 12.; #P newex 621 253 98 1441810 loadbang; #N coll ; #T flags 1 0; #T 36 1 -4; #T 37 1 -3; #T 38 1 -2; #T 39 1 -1; #T 40 1 0; #T 41 1 1; #T 42 1 2; #T 43 2 -2; #T 44 2 -1; #T 45 2 0; #T 46 2 1; #T 47 2 2; #T 48 3 -2; #T 49 3 -1; #T 50 3 0; #T 51 3 1; #T 52 3 2; #T 53 4 -2; #T 54 4 -1; #T 55 4 0; #T 56 4 1; #T 57 5 -2; #T 58 5 -1; #T 59 5 0; #T 60 5 1; #T 61 5 2; #T 62 6 -2; #T 63 6 -1; #T 64 6 0; #T 65 6 1; #T 66 6 2; #T 67 7 -2; #T 68 7 -1; #T 69 7 0; #T 70 7 1; #T 71 7 2; #T 72 8 -2; #T 73 8 -1; #T 74 8 0; #T 75 8 1; #T 76 8 2; #T 77 8 3; #T 78 8 4; #T 79 8 5; #T 80 8 6; #T 81 8 7; #T 82 8 8; #T 83 8 9; #P newobj 259 183 55 1441810 coll; #P user ezdac~ 319 495 363 528 0; #P number 337 392 35 18 0 8 3 22 0 0 0 221 221 221 222 222 222 0 0 0; #N sfplay~ 1 120960 0 ; #P newobj 337 441 87 1441810 sfplay~; #P window linecount 8; #P message 621 283 209 1441810 open E1.aiff \, preload 2 A1.aiff \, preload 3 D2.aiff \, preload 4 G2.aiff \, preload 5 B2.aiff \, preload 6 E3.aiff \, preload 7 A3.aiff \, preload 8 D4.aiff; #P connect 12 0 13 0; #P fasten 12 1 13 1 170 134 225 134; #P fasten 13 0 4 0 126 172 264 172; #P connect 11 0 4 0; #P connect 4 0 14 0; #P connect 1 0 3 0; #P fasten 14 0 2 0 264 255 342 255; #P connect 2 0 1 0; #P fasten 0 0 1 0 626 436 342 436; #P connect 1 0 3 1; #P fasten 6 0 9 0 452 336 419 336; #P connect 9 0 8 0; #P connect 8 0 10 0; #P connect 10 0 1 1; #P fasten 14 1 7 0 330 243 452 243; #P connect 7 0 6 0; #P connect 6 0 8 1; #P connect 5 0 0 0; #P pop;