#N canvas 480 60 884 678 12;
#X obj 187 545 hip~ 5;
#X floatatom 63 143 4 0 100 0 - - -;
#X obj 187 485 *~;
#X floatatom 295 88 0 0 200 0 - - -;
#X obj 61 355 +~;
#X obj 61 300 samphold~;
#X obj 61 327 *~;
#X obj 550 236 s~ phase;
#X obj 205 330 r~ phase;
#X obj 63 189 s chunk-size;
#X floatatom 550 27 0 0 0 0 - - -;
#X text 157 181 chunk size;
#X text 157 195 in seconds;
#X obj 562 74 r chunk-size;
#X obj 562 99 t b f;
#X obj 205 378 -~ 0.5;
#X obj 205 402 *~ 0.5;
#X obj 205 449 cos~;
#X obj 168 586 output~;
#X text 626 614 updated for Pd version 0.37;
#X obj 550 180 phasor~;
#X obj 395 235 s~ read-pt;
#X obj 95 355 r~ read-pt;
#X obj 621 215 +~ 0.5;
#X obj 621 241 wrap~;
#X obj 621 266 s~ phase2;
#X obj 187 514 +~;
#X obj 63 166 * 0.001;
#X obj 353 184 phasor~;
#X obj 61 386 *~ 44100;
#X obj 61 441 tabread4~ table23;
#X obj 61 270 r chunk-size;
#X obj 61 412 +~ 1;
#X floatatom 550 156 5 0 0 0 - - -;
#X obj 295 222 s precession;
#X obj 675 98 t b f;
#X obj 675 73 r precession;
#X obj 295 129 * 0.01;
#X obj 287 506 *~;
#X obj 287 367 +~;
#X obj 287 318 samphold~;
#X obj 287 343 *~;
#X obj 422 378 -~ 0.5;
#X obj 422 402 *~ 0.5;
#X obj 422 449 cos~;
#X obj 321 365 r~ read-pt;
#X obj 287 391 *~ 44100;
#X obj 287 441 tabread4~ table23;
#X obj 287 293 r chunk-size;
#X obj 287 417 +~ 1;
#X obj 422 344 r~ phase2;
#X obj 63 93 loadbang;
#X text 28 38 TIME COMPRESSION/EXPANSION BY LOOPED SAMPLING;
#X text 524 460 We've changed the control for "chunk size" to milliseconds
for added convenience \, and delayed multiplying sample location by
the sample rate (44100) until the last moment \, so that calculations
using "read-pt" and "chunk size" can be in the same units (seconds.)
, f 47;
#X msg 63 118 25;
#X floatatom 381 85 4 0 900 0 - - -;
#X obj 381 107 * 0.001;
#X msg 381 61 900;
#X obj 550 131 expr (pow(2 \, $f1/120)-$f3)/$f2;
#X obj 381 132 t b f;
#X obj 381 36 loadbang;
#X text 457 99 (msec);
#X obj 395 211 *~;
#X obj 353 160 /;
#X text 101 143 <= chunk size (msec);
#X text 416 84 <= loop length;
#X text 199 88 precession => (percent), f 13;
#X text 584 28 <= transposition \, halftones/10, f 17;
#N canvas 457 259 614 280 table 0;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table23 44103 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 363 64 graph;
#X text 365 198 --- 44103 samples ---;
#X obj 48 148 loadbang;
#X obj 52 37 adc~ 1;
#X obj 52 62 hip~ 5;
#X msg 67 91 bang;
#X obj 48 202 soundfiler;
#X text 141 155 v-- re-read original table;
#X obj 52 118 tabwrite~ table23;
#X msg 48 175 read ../sound/voice.wav table23;
#X text 108 91 <= record;
#X connect 2 0 9 0;
#X connect 3 0 4 0;
#X connect 4 0 8 0;
#X connect 5 0 8 0;
#X connect 9 0 6 0;
#X restore 748 236 pd table;
#X text 523 347 Here \, rather than ask you to push the read pointer
back and forth in the sample \, we use a phasor~. This makes it possible
to avoid the samphold~ on the read pointer (r~ read-pt) \, since \,
knowing the precession \, we can correct for it in computing the frequency
of the original phasor~ above at right., f 46;
#X connect 0 0 18 0;
#X connect 0 0 18 1;
#X connect 1 0 27 0;
#X connect 2 0 26 0;
#X connect 3 0 37 0;
#X connect 4 0 29 0;
#X connect 5 0 6 0;
#X connect 6 0 4 0;
#X connect 8 0 5 1;
#X connect 8 0 6 1;
#X connect 8 0 15 0;
#X connect 10 0 58 0;
#X connect 13 0 14 0;
#X connect 14 0 58 0;
#X connect 14 1 58 1;
#X connect 15 0 16 0;
#X connect 16 0 17 0;
#X connect 17 0 2 1;
#X connect 20 0 7 0;
#X connect 20 0 23 0;
#X connect 22 0 4 1;
#X connect 23 0 24 0;
#X connect 24 0 25 0;
#X connect 26 0 0 0;
#X connect 27 0 9 0;
#X connect 28 0 62 0;
#X connect 29 0 32 0;
#X connect 30 0 2 0;
#X connect 31 0 5 0;
#X connect 32 0 30 0;
#X connect 33 0 20 0;
#X connect 35 0 58 0;
#X connect 35 1 58 2;
#X connect 36 0 35 0;
#X connect 37 0 34 0;
#X connect 37 0 63 0;
#X connect 38 0 26 1;
#X connect 39 0 46 0;
#X connect 40 0 41 0;
#X connect 41 0 39 0;
#X connect 42 0 43 0;
#X connect 43 0 44 0;
#X connect 44 0 38 1;
#X connect 45 0 39 1;
#X connect 46 0 49 0;
#X connect 47 0 38 0;
#X connect 48 0 40 0;
#X connect 49 0 47 0;
#X connect 50 0 42 0;
#X connect 50 0 41 1;
#X connect 50 0 40 1;
#X connect 51 0 54 0;
#X connect 54 0 1 0;
#X connect 55 0 56 0;
#X connect 56 0 59 0;
#X connect 57 0 55 0;
#X connect 58 0 33 0;
#X connect 59 0 63 0;
#X connect 59 1 63 1;
#X connect 59 1 62 1;
#X connect 60 0 57 0;
#X connect 62 0 21 0;
#X connect 63 0 28 0;
