#N canvas 441 38 709 702 12;
#X declare -stdpath ./;
#X obj 54 558 output~;
#X obj 96 154 moses 1;
#X obj 142 183 mtof;
#X text 173 427 on/off for original;
#X obj 54 510 +~;
#X obj 195 235 samplerate~;
#X obj 142 231 t f b;
#X obj 115 93 delwrite~ G06-del 100;
#X obj 97 301 delread~ G06-del, f 8;
#X obj 97 413 +~;
#X obj 177 289 +;
#X obj 142 206 expr 500/$f1;
#X obj 177 343 line~;
#X obj 177 318 pack 0 20;
#X text 181 183 fundamental frequency;
#X text 240 205 1/2 period \, in msec;
#X obj 195 261 expr 2048000/$f1;
#X obj 438 96 declare -stdpath ./;
#X obj 54 48 adc~ 1;
#X obj 96 127 sigmund~ -npts 2048;
#X text 241 127 track pitch;
#X text 158 154 reject low numbers indicating no pitch found;
#X obj 115 443 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 97 470 *~;
#X obj 72 443 tgl 19 0 empty empty empty 0 -6 0 8 #dfdfdf #000000 #000000 0 1;
#X obj 54 470 *~;
#X text 323 254 estimate [sigmund~] delay as one window (in msec), f 25;
#X text 141 443 <-- and processed sounds;
#X obj 115 387 delread4~ G06-del;
#X obj 146 29 cnv 5 5 25 empty empty Octave\ Doubling\ via\ Variable\ Comb\ Filter 15 13 0 16 #dfdfdf #202020 0;
#X text 188 480 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 ([delread4~]) 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 1 1 2 0;
#X connect 2 0 11 0;
#X connect 4 0 0 0;
#X connect 5 0 16 0;
#X connect 6 0 10 0;
#X connect 6 1 5 0;
#X connect 8 0 9 0;
#X connect 9 0 23 0;
#X connect 10 0 13 0;
#X connect 11 0 6 0;
#X connect 12 0 28 0;
#X connect 13 0 12 0;
#X connect 16 0 10 1;
#X connect 16 0 8 0;
#X connect 18 0 7 0;
#X connect 18 0 19 0;
#X connect 18 0 25 0;
#X connect 19 0 1 0;
#X connect 22 0 23 1;
#X connect 23 0 4 1;
#X connect 24 0 25 1;
#X connect 25 0 4 0;
#X connect 28 0 9 1;
