#N canvas 303 79 965 595 12;
#X declare -stdpath ./;
#N canvas 0 0 450 300 (subpatch) 0;
#X array tabread4-out 44100 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 466 70 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table17 44103 float 0;
#X coords 0 1.02 44103 -1.02 200 130 1;
#X restore 683 67 graph;
#X obj 612 380 loadbang;
#X obj 98 306 tabwrite~ tabread4-out;
#X obj 65 335 hip~ 5;
#X floatatom 65 81 5 0 0 0 - - - 0;
#X text 191 242 read from the table;
#X text 80 38 LOOPING SAMPLER;
#X floatatom 90 134 5 0 0 0 - - - 0;
#X obj 90 160 * 441;
#X obj 65 187 *~ 0;
#X obj 65 214 +~ 1;
#X obj 591 254 adc~ 1;
#X text 702 385 v-- re-read the original sample;
#X text 161 491 In this patch you will frequently hear discontinuities
at the looping point. If you're working in a studio \, you can sometimes
find "good" loop points for samples. Another approach \, better for
live situations \, is shown in the next patch., f 55;
#X obj 612 433 soundfiler;
#X text 699 206 ---- 44103 samples ----;
#X text 477 206 ---- 1 second ------;
#X obj 38 375 output~;
#X text 717 527 updated for Pd version 0.37;
#X obj 65 243 tabread4~ table17;
#X obj 591 321 tabwrite~ table17;
#X msg 612 408 read ../sound/voice.wav table17;
#X text 162 352 This is a looping sampler in which you specify the
number of loops per second (the frequency) and the size of the chunk
to loop. If the frequency is less than about 20 \, you will hear repetition
and the chunk size will sound like transposition. For frequencies above
50 or so \, you hear a tone whose timbre is controlled by the chunk
size (best kept below 10 or so.) Remember you can use the "shift" key
on number boxes to make fine adjustments., f 55;
#X obj 760 15 declare -stdpath ./;
#X obj 98 272 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000
#000000;
#X text 123 271 <-- click to display output;
#X obj 604 288 bng 17 250 50 0 empty empty empty 17 7 0 10 #dfdfdf
#000000 #000000;
#X text 630 288 <-- click here to record your own sample;
#X text 114 81 <-- frequency (Hz.);
#X text 135 135 <-- chunk size (100ths of a second);
#X text 111 186 <-- readjust phase for range 0 - (chunk size);
#X text 110 214 <-- add one to avoid beginning of table;
#X obj 65 107 phasor~;
#X connect 2 0 22 0;
#X connect 4 0 18 0;
#X connect 4 0 18 1;
#X connect 5 0 33 0;
#X connect 8 0 9 0;
#X connect 9 0 10 1;
#X connect 10 0 11 0;
#X connect 11 0 20 0;
#X connect 12 0 21 0;
#X connect 20 0 4 0;
#X connect 20 0 3 0;
#X connect 22 0 15 0;
#X connect 25 0 3 0;
#X connect 27 0 21 0;
#X connect 33 0 10 0;
