#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 209 327 tabwrite~ osc-output;
#X floatatom 326 127 5 0 0 0 - - - 0;
#X obj 150 262 r frequency;
#X msg 326 98 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 69 r pitch;
#X obj 335 151 s pitch;
#X obj 326 177 mtof;
#X obj 326 206 s frequency;
#X obj 52 206 s pitch;
#X obj 52 177 ftom;
#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 472 389 ---- 0.1 seconds ----;
#X text 97 20 FREQUENCY AND PITCH;
#X text 85 434 The osc~ object \, if you give it an argument \, expects floating-point messages to set its frequency. Without arguments \, its frequency is controlled by connecting an audio signal to its input., 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 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 92 339 output~;
#X text 471 659 updated for Pd version 0.36;
#X obj 150 298 osc~;
#X text 164 356 <= output level;
#X obj 512 25 declare -stdpath ./;
#X text 100 127 <-- set frequency;
#X text 370 126 <-- set MIDI pitch;
#X text 373 178 <-- convert "MIDI" pitch to frequency;
#X text 97 177 <-- convert frequency;
#X text 234 297 <-- click to graph;
#X obj 209 297 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X connect 2 0 10 0;
#X connect 2 0 11 0;
#X connect 3 0 24 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 24 0 1 0;
#X connect 24 0 22 0;
#X connect 24 0 22 1;
#X connect 32 0 1 0;
