#N canvas 535 38 830 700 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 0 0 0 0 - - - 0;
#X floatatom 172 121 0 0 100 0 - - - 0;
#X obj 172 150 * 441;
#X obj 147 173 *~ 0;
#X obj 147 201 +~ 1;
#X msg 194 293 bang;
#X obj 355 355 adc~ 1;
#X obj 355 381 hip~ 5;
#X msg 373 410 bang;
#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 256 line~;
#X obj 200 208 * 441;
#X floatatom 200 185 0 0 0 0 - - - 0;
#X obj 200 232 pack 0 100;
#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 169 322 tabwrite~ graph19;
#X text 242 293 <= graph table index;
#X text 234 186 <= read point (100ths of a second);
#X text 208 121 <= chunk size (100ths of a second);
#X text 192 65 <= frequency (Hz.);
#X text 414 409 <= record;
#X obj 623 578 declare -stdpath ./;
#X connect 1 0 32 0;
#X connect 1 0 32 1;
#X connect 2 0 29 0;
#X connect 3 0 4 0;
#X connect 4 0 5 1;
#X connect 5 0 6 0;
#X connect 6 0 17 0;
#X connect 7 0 36 0;
#X connect 8 0 9 0;
#X connect 9 0 24 0;
#X connect 10 0 24 0;
#X connect 12 0 1 0;
#X connect 13 0 17 1;
#X connect 14 0 16 0;
#X connect 15 0 14 0;
#X connect 16 0 13 0;
#X connect 17 0 35 0;
#X connect 17 0 36 0;
#X connect 20 0 27 0;
#X connect 20 0 25 0;
#X connect 25 0 22 0;
#X connect 28 0 30 0;
#X connect 29 0 5 0;
#X connect 29 0 28 0;
#X connect 30 0 31 0;
#X connect 31 0 12 0;
#X connect 35 0 12 1;
