#N canvas 417 36 884 660 12;
#X declare -stdpath ./;
#X floatatom 63 143 4 0 100 0 - - - 0;
#X obj 187 485 *~;
#X floatatom 295 88 6 0 200 0 - - - 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 6 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 187 573 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 - - - 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 - - - 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 197 88 precession => (percent), f 13;
#X text 604 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 2;
#X coords 0 1.02 44103 -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 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 90 91 <= record;
#X obj 67 91 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X connect 2 0 8 0;
#X connect 3 0 4 0;
#X connect 4 0 7 0;
#X connect 8 0 5 0;
#X connect 10 0 7 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 obj 403 599 declare -stdpath ./;
#X obj 187 543 hip~ 5;
#X connect 0 0 26 0;
#X connect 1 0 25 0;
#X connect 2 0 36 0;
#X connect 3 0 28 0;
#X connect 4 0 5 0;
#X connect 5 0 3 0;
#X connect 7 0 4 1;
#X connect 7 0 5 1;
#X connect 7 0 14 0;
#X connect 9 0 57 0;
#X connect 12 0 13 0;
#X connect 13 0 57 0;
#X connect 13 1 57 1;
#X connect 14 0 15 0;
#X connect 15 0 16 0;
#X connect 16 0 1 1;
#X connect 19 0 22 0;
#X connect 19 0 6 0;
#X connect 21 0 3 1;
#X connect 22 0 23 0;
#X connect 23 0 24 0;
#X connect 25 0 70 0;
#X connect 26 0 8 0;
#X connect 27 0 61 0;
#X connect 28 0 31 0;
#X connect 29 0 1 0;
#X connect 30 0 4 0;
#X connect 31 0 29 0;
#X connect 32 0 19 0;
#X connect 34 0 57 0;
#X connect 34 1 57 2;
#X connect 35 0 34 0;
#X connect 36 0 33 0;
#X connect 36 0 62 0;
#X connect 37 0 25 1;
#X connect 38 0 45 0;
#X connect 39 0 40 0;
#X connect 40 0 38 0;
#X connect 41 0 42 0;
#X connect 42 0 43 0;
#X connect 43 0 37 1;
#X connect 44 0 38 1;
#X connect 45 0 48 0;
#X connect 46 0 37 0;
#X connect 47 0 39 0;
#X connect 48 0 46 0;
#X connect 49 0 41 0;
#X connect 49 0 40 1;
#X connect 49 0 39 1;
#X connect 50 0 53 0;
#X connect 53 0 0 0;
#X connect 54 0 55 0;
#X connect 55 0 58 0;
#X connect 56 0 54 0;
#X connect 57 0 32 0;
#X connect 58 0 62 0;
#X connect 58 1 62 1;
#X connect 58 1 61 1;
#X connect 59 0 56 0;
#X connect 61 0 20 0;
#X connect 62 0 27 0;
#X connect 70 0 17 0;
