#N canvas 441 23 712 706 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array osc-output 4410 float 0;
#X coords 0 1.02 4410 -1.02 200 130 1;
#X restore 449 248 graph;
#X obj 165 316 tabwrite~ osc-output;
#X floatatom 326 117 5 0 0 0 - - - 0;
#X obj 106 251 r frequency;
#X msg 326 88 set \$1;
#X floatatom 52 127 6 0 0 0 - - - 0;
#X obj 52 69 r frequency;
#X msg 52 98 set \$1;
#X obj 65 151 s frequency;
#X obj 326 59 r pitch;
#X obj 335 149 s pitch;
#X obj 326 180 mtof;
#X obj 326 209 s frequency;
#X obj 52 206 s pitch;
#X obj 52 177 ftom;
#X text 472 389 ---- 0.1 seconds ----;
#X text 97 20 FREQUENCY AND PITCH;
#X text 85 588 Note also the "set" messages going to the number boxes so that they can each update the other without bringing on an infinite loop. (get help on number boxes for details.), f 70;
#X text 152 195 to "MIDI" pitch;
#X obj 106 354 output~;
#X text 471 659 updated for Pd version 0.36;
#X obj 106 287 osc~;
#X obj 512 25 declare -stdpath ./;
#X text 100 127 <-- set frequency;
#X text 370 116 <-- set MIDI pitch;
#X text 367 180 <-- convert "MIDI" pitch to frequency;
#X text 97 177 <-- convert frequency;
#X obj 165 286 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 226 374 <-- output level;
#X text 85 444 The [osc~] object expects floating-point messages or signals to set its frequency., f 70;
#X text 85 485 Frequency and pitch are converted using the [ftom] and [mtof] objects. Frequency refers to the number of cycles per second. Pitch is "60" for Middle C \, 61 for C sharp \, 72 for the next C up \, and so on., f 70;
#X text 85 537 [mtof] and [ftom] work fine for microtones (non-integral "MIDI pitch") and don't have MIDI's range restriction - for example \, MIDI -36 is about 1 Hz., f 70;
#X text 190 286 <-- bang button \, click to graph;
#X connect 2 0 10 0;
#X connect 2 0 11 0;
#X connect 3 0 21 0;
#X connect 4 0 2 0;
#X connect 5 0 8 0;
#X connect 5 0 14 0;
#X connect 6 0 7 0;
#X connect 7 0 5 0;
#X connect 9 0 4 0;
#X connect 11 0 12 0;
#X connect 14 0 13 0;
#X connect 21 0 1 0;
#X connect 21 0 19 0;
#X connect 27 0 1 0;
