#N canvas 492 38 831 688 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table19 44103 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 513 25 graph;
#X obj 87 367 hip~ 5;
#X floatatom 147 66 5 0 0 0 - - - 0;
#X floatatom 172 121 4 0 100 0 - - - 0;
#X obj 172 150 * 441;
#X obj 147 179 *~ 0;
#X obj 147 207 +~ 1;
#X obj 355 355 adc~ 1;
#X obj 355 381 hip~ 5;
#N canvas 0 0 450 300 (subpatch) 0;
#X array graph19 44100 float 0;
#X coords 0 44100 44100 0 200 130 1;
#X restore 522 209 graph;
#X obj 87 341 *~;
#X obj 200 258 line~;
#X obj 200 208 * 441;
#X floatatom 200 182 4 0 0 0 - - - 0;
#X obj 147 290 +~;
#X text 71 495 In this patch we can loop in any "window" of the input
sample. The "read point" (0-100) gives the starting point of the window
and "chunk" is its size (both in 100ths of a second.) Try \, for example
\, frequency 4 \, sharpness 10 \, chunk size 25 \, and vary the read
point from -25 to 100 \, listening to the result.;
#X text 540 346 ----- 1 second ------;
#X obj 534 393 loadbang;
#X text 570 417 v-- re-read the original sample;
#X obj 544 462 soundfiler;
#X text 527 164 ---- 44103 samples ---;
#X obj 355 441 tabwrite~ table19;
#X msg 544 438 read ../sound/voice.wav table19;
#X text 603 632 updated for Pd version 0.37;
#X msg 534 488 \; graph19 ylabel 48000 0 44100;
#X obj 86 173 -~ 0.5;
#X obj 147 91 phasor~;
#X obj 86 201 *~ 0.5;
#X obj 86 230 cos~;
#X obj 64 407 output~;
#X text 56 23 ENVELOPING THE LOOPING SAMPLER;
#X text 74 595 You should hear some doppler shift as you change the
read point. To see why \, click on "graph table index" and quickly
start changing the read point--- you should see entertaining pictures
in "table-index". The next patch shows how to prevent this if you wish
to.;
#X obj 148 351 tabread4~ table19;
#X obj 194 322 tabwrite~ graph19;
#X text 217 293 <= graph table index;
#X text 234 183 <= read point (100ths of a second);
#X text 208 121 <= chunk size (100ths of a second);
#X text 192 65 <= frequency (Hz.);
#X obj 623 578 declare -stdpath ./;
#X obj 373 410 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf
#000000 #000000;
#X text 396 409 <-- record;
#X obj 194 293 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf
#000000 #000000;
#X obj 200 232 pack f 100;
#X connect 1 0 29 0;
#X connect 1 0 29 1;
#X connect 2 0 26 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 6 0;
#X connect 6 0 14 0;
#X connect 7 0 8 0;
#X connect 8 0 21 0;
#X connect 10 0 1 0;
#X connect 11 0 14 1;
#X connect 12 0 42 0;
#X connect 13 0 12 0;
#X connect 14 0 32 0;
#X connect 14 0 33 0;
#X connect 17 0 24 0;
#X connect 17 0 22 0;
#X connect 22 0 19 0;
#X connect 25 0 27 0;
#X connect 26 0 5 0;
#X connect 26 0 25 0;
#X connect 27 0 28 0;
#X connect 28 0 10 0;
#X connect 32 0 10 1;
#X connect 39 0 21 0;
#X connect 41 0 33 0;
#X connect 42 0 11 0;
