max v2; #N vpatcher 33 44 911 817; #P window setfont "Sans Serif" 9.; #P comment 22 676 216 196617 Most up-to-date versions of templates:; #P window linecount 3; #P message 22 690 314 196617 \; max launch_browser http://rhoadley.net/cgi/courses/tech_resources/max-msp/examples/PERFORMANCE_TEMPLATES/; #P toggle 554 653 15 0; #P window linecount 1; #P message 577 653 27 196617 open; #P newex 577 688 63 196617 sfrecord~ 2; #P newex 577 597 53 196617 adoutput~; #P comment 547 567 99 196617 record a demo...; #P window linecount 9; #P comment 664 597 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 547 586 263 133; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P number 634 162 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 1; #P newex 614 180 30 196617 - 40; #P newex 614 207 31 196617 mtof; #P number 614 144 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0; #P newex 614 119 40 196617 key; #P message 17 111 14 196617 1; #P newex 17 86 48 196617 loadbang; #N vpatcher 720 301 1320 701; #P window setfont Times 10.; #P comment 130 148 92 1310730 modulator amplitude; #P comment 116 123 92 1310730 modulating oscillator; #P comment 82 197 74 1310730 carrier oscillator; #P comment 171 32 77 1310730 Modulation index; #P comment 92 32 77 1310730 Harmonicity ratio; #P comment 12 32 74 1310730 Carrier frequency; #N comlet FM signal; #P outlet 38 220 15 0; #P window setfont "Fixedwidth Serif" 10.; #P newex 120 94 38 1441802 *~ $2; #P newex 38 171 43 1441802 +~; #P newex 71 68 38 1441802 *~ $1; #P newex 71 146 59 1441802 *~; #P newex 71 121 43 1441802 cycle~; #P newex 38 195 43 1441802 cycle~; #N comlet Modulation index; #P inlet 200 46 15 0; #N comlet Harmonicity ratio; #P inlet 121 46 15 0; #N comlet Carrier frequency; #P inlet 38 46 15 0; #P window setfont Times 10.; #P comment 53 221 53 1310730 FM signal; #P connect 1 0 8 0; #P connect 8 0 4 0; #P connect 4 0 10 0; #P fasten 1 0 7 0 43 64 76 64; #P connect 7 0 5 0; #P connect 5 0 6 0; #P connect 6 0 8 1; #P fasten 2 0 7 1 126 64 104 64; #P fasten 7 0 9 0 76 89 125 89; #P connect 9 0 6 1; #P fasten 3 0 9 1 205 64 153 64; #P pop; #P newobj 41 290 136 196617 p simpleFM~; #P comment 71 353 41 196617 Volume; #P user gain~ 41 338 30 36 158 0 1.071519 7.94321 10.; #P newex 104 264 32 196617 sig~; #P newex 41 264 32 196617 sig~; #N vpreset 8; #X append 1 2 8 127 167 flonum float 123. \; 10 242 41 flonum float 178. \; 11 242 104 flonum float 1.35 \; 17 168 167 function clear \; 17 168 167 function add 0. 1.5 0 \; 17 168 167 function; #X append 1 2 add 123. 0. 0 \; 17 168 167 function domain 123. \; 17 168 167 function range 0. 24. \; 18 168 291 function clear \; 18 168 291 function add 0. 0.6875 0 \; 18 168 291 function add; #X append 1 2 12.412852 0.84375 0 \; 18 168 291 function add 30.46788 0.765625 0 \; 18 168 291 function add 49.651409 0.09375 0 \; 18 168 291 function add 123. 0. 0 \; 18 168 291 function domain 123. \; 18 168 291; #X append 1 2 function range 0. 1. \; 28 338 41 gain~ list 90 10. \;; #X append 2 2 8 127 167 flonum float 1113. \; 10 242 41 flonum float 880. \; 11 242 104 flonum float 7.03 \; 17 168 167 function clear \; 17 168 167 function add 0. 24. 0 \; 17 168 167 function; #X append 2 2 add 1113. 0. 0 \; 17 168 167 function domain 1113. \; 17 168 167 function range 0. 24. \; 18 168 291 function clear \; 18 168 291 function add 0. 0.6875 0 \; 18 168 291 function add; #X append 2 2 122.532104 1. 0 \; 18 168 291 function add 275.697144 0.765625 0 \; 18 168 291 function add 673.926575 0.359375 0 \; 18 168 291 function add 1113. 0. 0 \; 18 168 291 function domain 1113. \; 18 168 291; #X append 2 2 function range 0. 1. \; 28 338 41 gain~ list 90 10. \; 34 144 614 number int 104 \; 37 162 634 number int 23 \;; #P preset 74 191 46 28; #P button 89 127 15 0; #P comment 70 113 63 196617 Play a note; #P comment 334 257 55 196617 Amplitude; #P window linecount 2; #P comment 210 257 77 196617 Modulation Index; #P window linecount 1; #P comment 167 113 115 196617 Duration in milliseconds; #P message 167 145 80 196617 setdomain \$1; #P user function 291 168 412 257 1 1 0 0; #X frgb 82 82 82; #X brgb 204 204 204; #X rgb2 85 85 85; #X rgb3 255 255 255; #X rgb4 0 0 0; #X rgb5 0 0 0; #X add 0. 0.6875 0; #X add 12.412852 0.84375 0; #X add 30.46788 0.765625 0; #X add 49.651409 0.09375 0; #X add 123. 0. 0; #X domain 123.; #X range 0. 1.; #X done; #P user function 167 168 288 257 1 1 0 0; #X frgb 82 82 82; #X brgb 204 204 204; #X rgb2 85 85 85; #X rgb3 255 255 255; #X rgb4 0 0 0; #X rgb5 0 0 0; #X add 0. 1.5 0; #X add 123. 0. 0; #X domain 123.; #X range 0. 24.; #X done; #P comment 107 228 61 196617 Harmonicity; #P user ezdac~ 41 407 85 440 0; #P newex 167 264 38 196617 line~; #P newex 180 289 38 196617 line~; #P newex 41 314 149 196617 *~; #P flonum 104 242 60 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P flonum 41 242 60 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window linecount 2; #P comment 43 228 57 196617 Carrier Freq.; #P flonum 167 127 60 9 0. 0 1 3 0 0 0 221 221 221 222 222 222 0 0 0; #P window setfont "American Typewriter" 18.; #P window linecount 1; #P comment 11 30 331 199491602 Performance Template 4: Synthesis; #P window setfont "Sans Serif" 9.; #P comment 11 62 100 196617 v0.3 RH 2006-7; #P comment 85 171 100 196617 presets; #P window linecount 2; #P comment 650 203 119 196617 <<<< mtof converts midi values into frequencies; #P comment 677 163 100 196617 <<< provide an offset for the (pitch) value; #P user panel 588 79 207 173; #X brgb 191 191 191; #X frgb 0 0 0; #X border 1; #X rounded 0; #X shadow 0; #X done; #P window linecount 3; #P comment 252 322 178 196617 notice that this is all monophonic! Look at PT4 Synthesis_Poly for using this polyphonically!; #P window linecount 1; #P comment 252 365 100 196617 Also see FMSurfer!; #P connect 31 0 32 0; #P fasten 35 0 10 0 619 106 46 106; #P connect 10 0 26 0; #P connect 26 0 30 0; #P connect 30 0 12 0; #P connect 12 0 28 0; #P connect 28 0 15 0; #P fasten 32 0 25 0 22 183 79 183; #P connect 28 0 15 1; #P fasten 34 0 24 0 619 110 94 110; #P connect 11 0 27 0; #P connect 27 0 30 1; #P connect 8 0 19 0; #P fasten 24 0 17 0 94 164 172 164; #P connect 19 0 17 0; #P fasten 17 1 14 0 209 260 172 260; #P connect 14 0 30 2; #P fasten 18 1 13 0 333 285 185 285; #P connect 13 0 12 1; #P fasten 19 0 18 0 172 164 296 164; #P fasten 24 0 18 0 94 164 296 164; #P fasten 44 0 42 0 559 678 582 678; #P connect 43 0 42 0; #P connect 41 0 42 0; #P connect 33 0 34 0; #P connect 34 0 36 0; #P connect 36 0 35 0; #P fasten 41 1 42 1 625 670 635 670; #P connect 37 0 36 1; #P pop;