#N canvas 64 19 709 658 12;
#X declare -stdpath ./;
#X obj 400 345 loadbang;
#X obj 496 251 adc~ 1;
#X obj 400 400 soundfiler;
#X obj 60 495 output~;
#X obj 496 301 tabwrite~ E03-table;
#X msg 400 372 read ../sound/voice.wav E03-table;
#X obj 76 120 moses 1;
#X obj 203 148 mtof;
#N canvas 0 23 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000
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 95 405 pd;
#N canvas 0 23 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000
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 49 405 pd;
#X text 484 351 re-read original sample;
#X obj 507 278 bng 15 250 50 0 empty empty empty 0 -6 0 8 #fcfcfc #000000
#000000;
#X text 170 390 on/off for original;
#X text 63 16 OCTAVE DOUBLING VIA VARIABLE COMB FILTER;
#X obj 77 443 +~;
#X obj 256 197 samplerate~;
#X obj 203 196 t f b;
#X obj 78 66 delwrite~ G06-del 100;
#X obj 96 270 delread~ G06-del;
#X obj 114 356 vd~ G06-del;
#X obj 96 382 +~;
#X obj 238 254 +;
#X obj 203 171 expr 500/$f1;
#X obj 238 308 line~;
#X obj 238 283 pack 0 20;
#X text 242 148 fundamental frequency;
#X text 301 170 1/2 period \, in msec;
#X text 290 241 estimate fiddle~ delay;
#X obj 256 223 expr 2048000/$f1;
#X text 292 256 as one window (in msec);
#X text 526 276 <= record a sample;
#X text 141 406 <= and processed sounds;
#X obj 506 32 declare -stdpath ./;
#X obj 49 36 adc~ 1;
#X obj 76 96 sigmund~ -npts 2048;
#X text 469 630 updated for Pd version 0.53;
#X text 223 97 track pitch;
#X text 138 120 reject low numbers indicating no pitch found;
#X text 181 443 We already saw how to use ring modulation to alias
a pitched sound down one octave. Here we do the reverse: filter out
all odd harmonics using a variable-delay comb filter tuned one octave
above the incoming sound. We use two taps into the delay line. The
fixed one (delread~) adjusts for the delayed output of sigmund~. The
variable one (vd~) adds to this an additional delay equal to 1/2 the
measured period of the incoming sound. These two are added. Odd harmonics
are 180 degrees out of phase at the two taps and cancel. Even harmonics
get through - so the sound goes up an octave \, without denaturing
the timbre as a speed-up would., f 67;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 5 0 2 0;
#X connect 6 1 7 0;
#X connect 7 0 22 0;
#X connect 8 0 14 1;
#X connect 9 0 14 0;
#X connect 11 0 4 0;
#X connect 14 0 3 0;
#X connect 14 0 3 1;
#X connect 15 0 28 0;
#X connect 16 0 21 0;
#X connect 16 1 15 0;
#X connect 18 0 20 0;
#X connect 19 0 20 1;
#X connect 20 0 8 0;
#X connect 21 0 24 0;
#X connect 22 0 16 0;
#X connect 23 0 19 0;
#X connect 24 0 23 0;
#X connect 28 0 21 1;
#X connect 28 0 18 0;
#X connect 33 0 17 0;
#X connect 33 0 34 0;
#X connect 33 0 9 0;
#X connect 34 0 6 0;
