#N canvas 392 78 571 618 10;
#X obj 287 155 loadbang;
#X obj 31 271 hip~ 5;
#X obj 407 67 adc~ 1;
#X obj 287 230 soundfiler;
#X obj 32 304 output~;
#X obj 408 114 tabwrite~ E03-table;
#X msg 287 182 read ../sound/voice.wav E03-table;
#X obj 117 65 fiddle~ 2048;
#X obj 118 96 unpack;
#X obj 111 193 osc~;
#X obj 118 120 moses 1;
#X obj 77 193 *~;
#X obj 157 143 mtof;
#X obj 157 166 *;
#X msg 201 114 0.5;
#X floatatom 201 143 3 0 0 0 - - -, f 3;
#X msg 239 114 15;
#N canvas 0 0 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 100 20 inlet~;
#X obj 99 87 *~;
#X obj 98 159 outlet~;
#X text 381 181 corner;
#X connect 0 0 2 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X coords 0 0 100 100 40 18 1;
#X restore 78 238 pd;
#N canvas 0 0 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
;
#X obj 100 20 inlet~;
#X obj 99 87 *~;
#X obj 98 159 outlet~;
#X text 381 181 corner;
#X connect 0 0 2 1;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X coords 0 0 100 100 40 18 1;
#X restore 32 238 pd;
#X obj 78 216 *~ 2;
#X obj 201 89 loadbang;
#N canvas 414 195 613 302 looper 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array E03-table 44103 float 0;
#X coords 0 1.02 44103 -1.02 200 130 1;
#X restore 349 22 graph;
#X text 347 161 ---- 44103 samples ----;
#X obj 35 77 +~ 1;
#X obj 35 25 phasor~ 1;
#X obj 35 50 *~ 44100;
#X obj 35 106 tabread4~ E03-table;
#X obj 35 132 outlet~;
#X text 46 238 one-second sample reader loop. You can replace this
with an adc~ if you want to go live.;
#X connect 2 0 5 0;
#X connect 3 0 4 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X restore 118 38 pd looper;
#X text 371 161 re-read original sample;
#X obj 419 91 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#N canvas 300 203 758 306 delay 0;
#X obj 15 222 outlet~;
#X obj 14 21 inlet~;
#X obj 15 102 loadbang;
#X obj 14 49 delwrite~ E03-del 40;
#X obj 15 195 delread~ E03-del;
#X obj 15 152 expr 1000*1024/$f1;
#X obj 15 128 samplerate~;
#X text 208 47 write to delay line which has enough memory to hold
40 msec;
#X text 125 128 get sample rate at load time;
#X text 185 152 divide 1024 by sample rate to give time in seconds
\; multiply by 1000 to convert to milliseconds.;
#X text 168 197 read from the delay line at the calculater delay;
#X text 317 268 1024-sample delay;
#X connect 1 0 3 0;
#X connect 2 0 6 0;
#X connect 4 0 0 0;
#X connect 5 0 4 0;
#X connect 6 0 5 0;
#X restore 31 72 pd delay;
#X text 438 89 <-- record a sample;
#X text 272 114 <-- choose an effect;
#X text 146 224 on/off for original;
#X text 128 237 <--and processed sounds;
#X text 106 303 This patch demonstrates using ring modulation to alias
a sound down one octave. The ring modulation itself ("osc~" and multiplier)
is easy. (We step it up by a factor of 2 to balance the original better.)
;
#X text 29 356 Harder is getting the fundamental frequency of the original
sound. We do this with the complicated "fiddle~" object \, which puts
out a stream of analysis data for an incoming signal. The "2048" argument
specifies the analysis window size. The analysis is most closely aligned
with what the sound was doing at the middle of the window \, i.e. \,
1024 samples ago. The "pd delay" window delays the signal itself 1024
samples so it will be as tightly synchronized with the analysis data
as possible. (If you're doing this on a real-time input \, you might
drop the delay and settle for less perfect synchronization.);
#X text 28 486 About fiddle~ \, suffice it to say that the third outlet
contains (pitch \, amplitude) pairs. We unpack the pitch and strip
out any zeros (when fiddle~ fails to find a pitch it outputs zero but
we'd rather stick with the most recent good one). This is converted
from MIDI to Hertz \, and multiplied by 1/2 to control the modulation
oscillator. (You can also try large-ish integers which leave the pitch
intact but introduce funny formants.);
#X msg 306 207 read ../../saucisse.wav E03-table;
#X obj 31 38 adc~ 1;
#X obj 1 596 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
#X text 12 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 85 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 145 HELP_PATCH_AUTHORS Updated for release 0.37. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 25 KEYWORDS signal;
#X text 12 65 DESCRIPTION octave dividing via ring modulation;
#X restore 392 598 pd META;
#N canvas 13 202 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 octave dividing- Related Help Documents;
#X text 19 37 links:;
#X restore 103 598 pd References;
#X obj 6 598 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header octave_dividing_via_ring_modulation
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X connect 0 0 6 0;
#X connect 1 0 4 0;
#X connect 1 0 4 1;
#X connect 2 0 5 0;
#X connect 6 0 3 0;
#X connect 7 2 8 0;
#X connect 8 0 10 0;
#X connect 9 0 11 1;
#X connect 10 1 12 0;
#X connect 11 0 19 0;
#X connect 12 0 13 0;
#X connect 13 0 9 0;
#X connect 14 0 15 0;
#X connect 15 0 13 1;
#X connect 16 0 15 0;
#X connect 17 0 1 0;
#X connect 18 0 1 0;
#X connect 19 0 17 0;
#X connect 20 0 14 0;
#X connect 21 0 24 0;
#X connect 21 0 7 0;
#X connect 23 0 5 0;
#X connect 24 0 18 0;
#X connect 24 0 11 0;
#X connect 32 0 3 0;
