#N canvas 366 23 709 658 12;
#X declare -stdpath ./;
#X obj 400 345 loadbang;
#X obj 496 247 adc~ 1;
#X obj 400 400 soundfiler;
#X obj 53 527 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;
#X text 484 351 re-read original sample;
#X obj 507 274 bng 19 250 50 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000;
#X text 169 396 on/off for original;
#X text 160 23 OCTAVE DOUBLING VIA VARIABLE COMB FILTER;
#X obj 53 479 +~;
#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 532 274 <= record a sample;
#X text 140 412 <= and processed sounds;
#X obj 506 32 declare -stdpath ./;
#X obj 53 26 adc~ 1;
#X obj 76 96 sigmund~ -npts 2048;
#X text 469 630 updated for Pd version 0.53;
#X text 221 96 track pitch;
#X text 138 120 reject low numbers indicating no pitch found;
#X text 187 455 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 obj 114 412 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 96 439 *~;
#X obj 71 412 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 53 439 *~;
#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 20 0;
#X connect 9 0 4 0;
#X connect 12 0 3 0;
#X connect 12 0 3 1;
#X connect 13 0 26 0;
#X connect 14 0 19 0;
#X connect 14 1 13 0;
#X connect 16 0 18 0;
#X connect 17 0 18 1;
#X connect 18 0 38 0;
#X connect 19 0 22 0;
#X connect 20 0 14 0;
#X connect 21 0 17 0;
#X connect 22 0 21 0;
#X connect 26 0 19 1;
#X connect 26 0 16 0;
#X connect 31 0 15 0;
#X connect 31 0 32 0;
#X connect 31 0 40 0;
#X connect 32 0 6 0;
#X connect 37 0 38 1;
#X connect 38 0 12 1;
#X connect 39 0 40 1;
#X connect 40 0 12 0;
