#N canvas 2 26 882 654 10; #X obj 264 484 dac~; #X obj 276 399 osc~; #X obj 276 455 *~; #X floatatom 321 245 5 0 100 1 volume - -; #X obj 321 264 / 100; #X floatatom 321 285 5 0 1 1 amplitude - -; #X obj 321 356 line~; #X msg 351 322 100; #X obj 321 303 t f b; #X obj 276 300 line~; #X msg 203 254 220 500; #X obj 134 195 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X obj 203 234 delay 4000; #X msg 134 234 880 4000; #X obj 276 156 mtof; #X floatatom 276 130 5 0 127 1 pitch - -; #X floatatom 276 186 5 0 0 1 frequency - -; #X obj 480 253 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1; #X floatatom 514 178 5 1 200 1 events_per_second - -; #X obj 545 249 /; #X obj 514 203 t b f; #X msg 514 225 1000; #X floatatom 545 269 6 0 0 1 milliseconds - -; #X obj 502 363 + 1; #X msg 520 423 0; #X obj 480 313 float 60; #X obj 480 387 select 72; #X obj 377 418 delay 1000; #X msg 377 440 0; #X msg 564 423 60; #N canvas 0 22 458 308 subpatch 0; #X obj 141 51 inlet; #X obj 258 58 inlet; #X obj 204 207 outlet; #X restore 584 572 pd subpatch; #X floatatom 32 604 5 0 127 1 pitch - -; #X obj 37 461 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 489 36 \; pd dsp 0; #X msg 595 36 \; pd dsp \$1; #X obj 595 14 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X obj 87 168 send myfavoritepitches; #X obj 32 584 receive myfavoritepitches; #X msg 489 4 \; pd dsp 1; #X msg 37 480 \; myfavoritepitches 36; #X text 309 156 convert MIDI pitch number to frequency; #X obj 480 286 metro 1000; #X text 35 511 in a message box \, a semicolon followed by the name of a receive object followed by any message will send that message to that receive object; #X text 86 5 you can use a semicolon to send a message directly to the pd environment itself. in this case we're sending pd the message "dsp 1" or "dsp 0" to turn dsp on/off; #X text 279 65 in a message box \, \$1 is replaced by the first item in the incoming message \, so this message box will receive 1 or 0 from the toggle and will send "dsp 1" or "dsp 0" to pd; #X text 32 556 send and receive objects permit communication without patch cords \, using a shared name as a unique keyword; #X text 4 260 glide to 880 in 4 seconds \; 4 seconds later \, glide to 220 in 1/2 second; #X text 572 202 same as; #X text 573 250 1000 / eps; #X text 555 287 ms between bangs; #X obj 410 304 select 1; #X msg 410 324 25; #X text 541 353 send as pitch \, then increment; #X text 510 401 when 72 is reached \, reset to 60 and stop; #X obj 480 340 t f f f; #X text 367 406 one second later; #X text 403 441 lower volume; #X text 29 374 use the line~ object to create a linear audio rate signal that will glide smoothly from one value to another; #X text 378 322 ms; #X text 544 543 you can encapsulate a pd patch; #X text 544 555 as a "subpatch" in a pd object; #X text 408 587 the name "subpatch" here is just an arbitrary name to appear in the title bar of the subpatch window; #X obj 626 202 trigger bang float; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 2 0 0 1; #X connect 3 0 4 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 2 1; #X connect 7 0 6 1; #X connect 8 0 6 0; #X connect 8 1 7 0; #X connect 9 0 1 0; #X connect 10 0 9 0; #X connect 11 0 13 0; #X connect 11 0 12 0; #X connect 12 0 10 0; #X connect 13 0 9 0; #X connect 14 0 16 0; #X connect 15 0 14 0; #X connect 15 0 36 0; #X connect 16 0 9 0; #X connect 17 0 41 0; #X connect 17 0 50 0; #X connect 18 0 20 0; #X connect 19 0 22 0; #X connect 20 0 21 0; #X connect 20 1 19 1; #X connect 21 0 19 0; #X connect 22 0 41 1; #X connect 23 0 25 1; #X connect 24 0 17 0; #X connect 25 0 54 0; #X connect 26 0 24 0; #X connect 26 0 27 0; #X connect 26 0 29 0; #X connect 27 0 28 0; #X connect 28 0 3 0; #X connect 29 0 25 1; #X connect 32 0 39 0; #X connect 35 0 34 0; #X connect 37 0 31 0; #X connect 41 0 25 0; #X connect 50 0 51 0; #X connect 51 0 3 0; #X connect 54 0 26 0; #X connect 54 1 23 0; #X connect 54 2 15 0;