From 9c0e19a3be2288db79e2502e5fa450c3e20a668d Mon Sep 17 00:00:00 2001 From: Guenter Geiger Date: Fri, 9 May 2003 16:04:00 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r610, which included commits to RCS files with non-trunk default branches. svn path=/trunk/; revision=611 --- pd/doc/3.audio.examples/A06.frequency.pd | 60 ++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 pd/doc/3.audio.examples/A06.frequency.pd (limited to 'pd/doc/3.audio.examples/A06.frequency.pd') diff --git a/pd/doc/3.audio.examples/A06.frequency.pd b/pd/doc/3.audio.examples/A06.frequency.pd new file mode 100644 index 00000000..50cff7c0 --- /dev/null +++ b/pd/doc/3.audio.examples/A06.frequency.pd @@ -0,0 +1,60 @@ +#N canvas 8 17 693 642 12; +#N canvas 0 0 450 300 graph1 0; +#X array osc-output 4410 float 0; +#X coords 0 1.02 4410 -1.02 200 130 1; +#X restore 473 167 graph; +#X obj 98 261 tabwrite~ osc-output; +#X msg 98 232 bang; +#X floatatom 280 66 0 0 0 0 - - -; +#X text 147 231 <-- click to graph; +#X obj 15 206 r frequency; +#X msg 280 37 set \$1; +#X floatatom 6 66 0 0 0 0 - - -; +#X obj 6 8 r frequency; +#X msg 6 37 set \$1; +#X obj 19 90 s frequency; +#X obj 280 8 r pitch; +#X obj 289 90 s pitch; +#X obj 280 116 mtof; +#X obj 280 145 s frequency; +#X obj 6 145 s pitch; +#X obj 6 116 ftom; +#X text 105 66 <-- set frequency; +#X text 372 65 <-- set MIDI pitch; +#X text 15 429 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.; +#X text 476 308 ---- 0.1 seconds ----; +#X text 447 6 FREQUENCY AND PITCH; +#X text 16 363 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. +; +#X text 14 496 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.; +#X text 15 553 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.); +#X text 87 291 <-- output level; +#X text 51 116 <-- convert frequency; +#X text 106 134 to "MIDI" pitch; +#X text 327 117 <-- convert "MIDI" pitch to frequency; +#X obj 15 273 output~; +#X text 437 619 updated for Pd version 0.36; +#X obj 15 232 osc~; +#X connect 2 0 1 0; +#X connect 3 0 12 0; +#X connect 3 0 13 0; +#X connect 5 0 31 0; +#X connect 6 0 3 0; +#X connect 7 0 10 0; +#X connect 7 0 16 0; +#X connect 8 0 9 0; +#X connect 9 0 7 0; +#X connect 11 0 6 0; +#X connect 13 0 14 0; +#X connect 16 0 15 0; +#X connect 31 0 1 0; +#X connect 31 0 29 0; -- cgit v1.2.1