G06.octave.doubler.pd 4.37 KB
Newer Older
1
#N canvas 425 25 448 622 10;
2 3 4 5 6 7 8 9 10 11 12 13
#X obj 197 378 loadbang;
#X obj 279 300 adc~ 1;
#X obj 197 422 soundfiler;
#X obj 22 396 output~;
#X obj 280 347 tabwrite~ E03-table;
#X msg 197 400 read ../sound/voice.wav E03-table;
#X obj 49 95 fiddle~ 2048;
#X obj 117 118 unpack;
#X obj 117 142 moses 1;
#X obj 190 120 mtof;
#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
Miller Puckette's avatar
Miller Puckette committed
14 15 16 17 18 19 20 21 22
;
#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;
23 24
#X restore 68 339 pd;
#N canvas 0 0 446 202 (subpatch) 0;
Miller Puckette's avatar
Miller Puckette committed
25 26 27 28 29 30 31 32 33 34
#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;
35
#X restore 22 339 pd;
Miller Puckette's avatar
Miller Puckette committed
36
#N canvas 414 195 613 302 looper 0;
37
#N canvas 0 0 450 300 (subpatch) 0;
38
#X array E03-table 44103 float 0 black black;
Miller Puckette's avatar
Miller Puckette committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52
#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;
53 54 55
#X restore 22 42 pd looper;
#X text 261 379 re-read original sample;
#X obj 291 324 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
Miller Puckette's avatar
Miller Puckette committed
56
-1;
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
#X text 310 322 <-- record a sample;
#X obj 22 369 +~;
#X obj 243 169 samplerate~;
#X obj 190 168 t f b;
#X obj 50 70 delwrite~ G06-del 100;
#X obj 70 244 delread~ G06-del;
#X obj 92 292 vd~ G06-del;
#X obj 69 316 +~;
#X obj 221 222 +;
#X obj 190 143 expr 500/$f1;
#X obj 221 272 line~;
#X obj 221 249 pack 0 20;
#X text 225 120 fundamental frequency;
#X text 274 143 1/2 period \, in msec;
#X text 257 213 estimate fiddle~ delay;
#X obj 243 195 expr 2048000/$f1;
#X text 259 228 as one window (in msec);
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header octave_doubling_via_variable_comb_filter
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X text 135 325 on/off for;
#X text 135 355 processed sounds;
#X text 111 340 <-- original and;
81
#X obj 1 610 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
82 83
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
84 85 86 87 88
#X text 12 105 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 85 AUTHOR Miller Puckette;
#X text 12 65 LIBRARY PDDP;
#X text 12 25 LICENSE SIBSD;
#X text 12 125 HELP_PATCH_AUTHORS Updated for release 0.37-1. Jonathan
89 90
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
91
#X text 12 45 DESCRIPTION octave doubling via variable comb filter
92
;
93 94
#X text 12 5 KEYWORDS signal tutorial;
#X restore 392 612 pd META;
95 96 97 98 99
#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 doubling- Related Help Documents;
#X text 19 37 links:;
100 101 102
#X restore 103 612 pd References;
#X obj 6 612 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X text 20 456 We already saw how to use ring modulation to alias a
103 104 105 106 107
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 [fiddle~]. The variable
one (vd~) adds to this an additional delay equal to 1/2 the measured
108
period of the incoming sound. These two are added. Odd harmonics are
109 110
180 degrees out of phase at the two taps and cancel. Even harmonics
get through -- so the sound goes up an octave \, without denaturing
Miller Puckette's avatar
Miller Puckette committed
111 112 113 114 115 116 117
the timbre as a speed-up would.;
#X connect 0 0 5 0;
#X connect 1 0 4 0;
#X connect 5 0 2 0;
#X connect 6 2 7 0;
#X connect 7 0 8 0;
#X connect 8 1 9 0;
118 119 120
#X connect 9 0 24 0;
#X connect 10 0 16 1;
#X connect 11 0 16 0;
Miller Puckette's avatar
Miller Puckette committed
121 122
#X connect 12 0 6 0;
#X connect 12 0 11 0;
123
#X connect 12 0 19 0;
Miller Puckette's avatar
Miller Puckette committed
124
#X connect 14 0 4 0;
125 126 127 128 129 130 131 132 133 134 135 136 137 138
#X connect 16 0 3 0;
#X connect 16 0 3 1;
#X connect 17 0 30 0;
#X connect 18 0 23 0;
#X connect 18 1 17 0;
#X connect 20 0 22 0;
#X connect 21 0 22 1;
#X connect 22 0 10 0;
#X connect 23 0 26 0;
#X connect 24 0 18 0;
#X connect 25 0 21 0;
#X connect 26 0 25 0;
#X connect 30 0 23 1;
#X connect 30 0 20 0;