max v2; #N vpatcher 115 54 1228 849; #P window setfont "Sans Serif" 9.; #P window linecount 3; #P message 448 605 263 196617 \; max launch_browser http://rhoadley.net/cgi/courses/tech_resources/max-msp/examples/SOUNDS/; #P window linecount 1; #P comment 448 590 216 196617 Sounds used in the templates >>>>; #P comment 448 661 216 196617 Most up-to-date versions of templates:; #P window linecount 3; #P message 448 675 314 196617 \; max launch_browser http://rhoadley.net/cgi/courses/tech_resources/max-msp/examples/PERFORMANCE_TEMPLATES/; #P toggle 821 673 15 0; #P window linecount 1; #P message 844 673 27 196617 open; #P newex 844 708 63 196617 sfrecord~ 2; #P newex 844 617 53 196617 adoutput~; #P comment 814 587 99 196617 record a demo...; #P window linecount 9; #P comment 941 618 113 196617 1. Click on open to open a file for recording. Save the file in one of your own directories to which you know you have access. 2. Use the toggle to turn recording on and \, when finished \, off.; #P user panel 814 606 263 133; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P window linecount 1; #P newex 5 26 48 196617 loadbang; #P message 65 513 65 196617 set mybuff1; #P message 20 311 85 196617 replace anton.aif; #P window setfont "American Typewriter" 18.; #P window linecount 2; #P comment 271 428 112 199491602 Basic Groove; #P window setfont "Sans Serif" 9.; #P window linecount 1; #P comment 271 474 100 196617 v 0.02; #P comment 271 489 100 196617 rhoadley.net; #P toggle 23 442 15 0; #P message 178 485 23 196617 0.5; #P message 178 466 23 196617 1.; #P flonum 178 504 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P toggle 255 552 15 0; #P message 255 571 68 196617 loopinterp \$1; #P message 65 532 65 196617 set mybuff2; #P message 65 592 49 196617 startloop; #P message 65 566 27 196617 stop; #P message 106 628 27 196617 stop; #P message 37 628 65 196617 startwindow; #P toggle 206 546 15 0; #P message 206 571 41 196617 loop \$1; #P flonum 238 601 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 199 601 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 160 661 29 196617 dac~; #P toggle 160 489 15 0; #P newex 160 530 27 196617 sig~; #P newex 160 620 88 196617 groove~ mybuff1; #B color 5; #P window linecount 3; #P comment 203 466 47 196617 control playback rate; #P window linecount 1; #P comment 224 536 81 196617 turn loop on/off; #P comment 38 498 112 196617 change working buffer; #P window linecount 5; #P comment 253 621 131 196617 The object itself - note that mybuff1 is the buffer initially being read \, but that this can be changed with a 'set' message (see left).; #P comment 15 357 403 196617 1. Read or replace something in one or both of the buffers. Replace resizes the buffer to the size of the soundfile read. Check that something's there by double-clicking on buffer~ or groove~. 2. click startwindow. 3. click startloop. 4. click the checkbox attached to the 'loop \$1' message. 5. click the checkbox attached to sig~ 6. alternatively \, click the bang on the left.; #P window linecount 1; #P comment 41 442 100 196617 <<<< on/off; #P comment 270 514 100 196617 also see GrooveDuck; #P message 294 261 106 196617 replace helicopter.aif; #P message 201 261 89 196617 replace jongly.aif; #P message 154 261 43 196617 replace; #P message 58 261 93 196617 read helicopter.aif; #P message 20 261 30 196617 read; #P newex 20 330 112 196617 buffer~ mybuff2 2000; #P newex 20 290 112 196617 buffer~ mybuff1 2000; #P number 465 209 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 427 209 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 427 162 64 196617 route 74 71; #P number 465 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 427 134 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 427 109 40 196617 unpack; #P window setfont "American Typewriter" 18.; #P comment 448 529 499 199491602 Performance Template 3: Midi/Human Interface Control; #P window setfont "Sans Serif" 9.; #P comment 838 430 53 196617 see also:; #P window linecount 3; #P comment 783 322 131 196617 change focus by sending the device's name - can also be instantiated as an argument; #P window linecount 1; #P message 731 342 51 196617 Keyboard; #P message 732 322 50 196617 Trackpad; #P comment 783 298 133 196617 clear ignore and delta lists; #P comment 783 278 179 196617 don't output zero data from element 6; #P comment 783 258 162 196617 don't output data from element 10; #P message 742 277 40 196617 delta 5; #P message 730 257 52 196617 ignore 10; #P comment 783 238 125 196617 don't poll the output queue; #P message 742 237 40 196617 poll 0; #P message 750 297 32 196617 clear; #P comment 783 218 125 196617 output queue every 10 ms; #P comment 783 198 114 196617 output event queue; #P comment 783 179 178 196617 generate a menu of available devices; #P comment 783 159 160 196617 output device info to max window; #P button 767 197 15 0; #P number 714 475 35 9 0 0 8228 3 0 0 0 221 221 221 222 222 222 0 0 0; #P number 759 475 35 9 0 0 8228 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 714 450 55 196617 unpack 0 0; #P window setfont "Sans Serif" 14.; #P comment 935 454 23 196622 hi; #P window setfont "Sans Serif" 9.; #P newex 726 412 42 196617 print hi; #P message 742 217 40 196617 poll 10; #P user umenu 750 387 173 196647 1 64 403 1; #X add Trackpad; #X add Keyboard; #P message 750 178 32 196617 menu; #P newex 714 387 29 196617 hi; #P message 757 158 25 196617 info; #P comment 850 476 112 196617 human interface object; #P user panel 755 473 44 18; #X brgb 182 191 73; #X frgb 255 255 255; #X border 1; #X rounded 0; #X shadow 0; #X done; #P user panel 710 473 44 18; #X brgb 197 91 91; #X frgb 255 255 255; #X border 1; #X rounded 0; #X shadow 0; #X done; #P comment 797 403 100 196617 device menu; #P newex 401 88 92 196617 midiparse; #P newex 401 66 37 196617 midiin; #P comment 448 567 252 196617 featuring use of MIDI Controllers and USB Controllers; #P window linecount 7; #P comment 646 57 279 196617 to test your USB device \, plug it in \, restart Max/MSP \, press 'menu' \, select your device \, click on 'poll 10' and check whether you have data appearing in the coloured boxes below. USB can be rather flaky \, so if you don't get a response \, try quitting and restarting Max \, or even restarting the computer. Always plug the device in before starting Max.; #P window linecount 2; #P comment 649 384 64 196617 the object is here >>>>>>; #P window linecount 1; #P comment 134 68 264 196617 1. double-click here to set your midi input device >>>>>>; #P window linecount 2; #P comment 99 84 299 196617 2. midiparse separates the various midi messages. In this case \, we're only using MIDI controls: the third outlet.; #P comment 59 130 365 196617 3. your device's control data should appear in these boxes. The box on the left should display the control number \, the box on the right that control's value.; #P window linecount 3; #P comment 28 157 396 196617 4. Use the route object \, direct from midiparse to obtain the value of any particular control. Route accepts pairs of numbers \, the first of which determines which outlet the second is used.; #P user panel 16 238 403 118; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P user panel 15 419 405 268; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P user panel 636 49 391 455; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P user panel 16 55 498 180; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P window linecount 1; #P comment 448 552 100 196617 v0.3 RH 2006-7; #P fasten 58 0 52 0 299 281 25 281; #P fasten 57 0 52 0 206 281 25 281; #P fasten 56 0 52 0 159 281 25 281; #P fasten 55 0 52 0 63 281 25 281; #P connect 54 0 52 0; #P fasten 90 0 88 0 10 309 25 309; #P connect 88 0 53 0; #P fasten 84 0 74 0 28 603 42 603; #P fasten 84 0 77 0 28 588 70 588; #P fasten 84 0 68 0 28 470 165 470; #P fasten 83 0 67 0 183 526 165 526; #P fasten 82 0 67 0 183 528 165 528; #P fasten 81 0 67 0 183 526 165 526; #P connect 68 0 67 0; #P fasten 89 0 66 0 70 556 165 556; #P connect 67 0 66 0; #P fasten 77 0 66 0 70 613 165 613; #P fasten 76 0 66 0 70 588 165 588; #P fasten 72 0 66 0 211 597 165 597; #P fasten 78 0 66 0 70 557 165 557; #P fasten 79 0 66 0 260 593 165 593; #P connect 66 0 69 0; #P fasten 74 0 69 0 42 656 165 656; #P fasten 75 0 69 0 111 656 165 656; #P connect 70 0 66 1; #P fasten 90 0 57 0 10 236 206 236; #P fasten 84 0 73 0 28 530 211 530; #P connect 73 0 72 0; #P connect 71 0 66 2; #P connect 80 0 79 0; #P connect 12 0 13 0; #P connect 13 2 46 0; #P connect 46 0 47 0; #P connect 13 2 49 0; #P connect 49 0 50 0; #P fasten 46 1 48 0 462 131 470 131; #P fasten 49 1 51 0 459 194 470 194; #P fasten 33 0 19 0 755 314 719 314; #P fasten 21 1 19 0 918 405 926 405 926 382 719 382; #P fasten 36 0 19 0 735 274 719 274; #P fasten 34 0 19 0 747 254 719 254; #P fasten 22 0 19 0 747 234 719 234; #P fasten 20 0 19 0 755 195 719 195; #P fasten 18 0 19 0 762 175 719 175; #P fasten 28 0 19 0 772 214 719 214; #P fasten 37 0 19 0 747 294 719 294; #P fasten 41 0 19 0 737 339 719 339; #P fasten 42 0 19 0 736 359 719 359; #P connect 19 0 25 0; #P connect 25 0 27 0; #P connect 19 0 23 0; #P fasten 19 1 21 0 738 405 746 405 746 385 755 385; #P connect 25 1 26 0; #P fasten 97 0 95 0 826 698 849 698; #P connect 96 0 95 0; #P connect 94 0 95 0; #P fasten 94 1 95 1 892 690 902 690; #P pop;