#N canvas 113 57 1004 644 12;
#X msg 409 9 \; pd dsp 1;
#X msg 495 10 \; pd dsp 0;
#X text 430 40 ON;
#X text 511 41 OFF;
#X graph graph1 0 -1.02 44100 1.02 631 140 831 10;
#X array sample-table 44103 float 0;
#X pop;
#X obj 586 483 loadbang;
#X floatatom 60 462 0 0 0;
#N canvas 159 26 495 266 output 0;
#X obj 338 160 t b;
#X obj 338 110 f;
#X obj 338 60 inlet;
#X text 344 29 mute;
#X obj 338 185 f;
#X msg 425 178 0;
#X msg 338 85 bang;
#X obj 338 135 moses 1;
#X obj 425 153 t b f;
#X obj 397 117 moses 1;
#X obj 83 148 dbtorms;
#X obj 397 92 r master-lvl;
#X obj 83 42 r master-lvl;
#X obj 338 210 s master-lvl;
#X obj 22 181 inlet~;
#X obj 199 41 inlet;
#X text 199 18 level;
#X obj 199 100 s master-lvl;
#X msg 96 65 set \$1;
#X obj 96 89 outlet;
#X msg 214 64 \; pd dsp 1;
#X obj 83 194 line~;
#X obj 22 212 *~;
#X obj 22 241 dac~;
#X obj 83 171 pack 0 50;
#X text 20 158 audio;
#X text 93 110 show level;
#X connect 0 0 4 0;
#X connect 1 0 7 0;
#X connect 2 0 6 0;
#X connect 4 0 13 0;
#X connect 5 0 13 0;
#X connect 6 0 1 0;
#X connect 7 0 0 0;
#X connect 7 1 8 0;
#X connect 8 0 5 0;
#X connect 9 1 4 1;
#X connect 10 0 24 0;
#X connect 11 0 1 1;
#X connect 11 0 9 0;
#X connect 12 0 10 0;
#X connect 12 0 18 0;
#X connect 14 0 22 0;
#X connect 15 0 17 0;
#X connect 15 0 20 0;
#X connect 18 0 19 0;
#X connect 21 0 22 1;
#X connect 22 0 23 0;
#X connect 22 0 23 1;
#X connect 24 0 21 0;
#X restore 31 490 pd output;
#X msg 89 462 MUTE;
#X text 124 455 <-- output amplitude;
#X obj 31 430 hip~ 5;
#X obj 47 381 tabread4~ sample-table;
#X floatatom 46 50 0 0 0;
#X text 85 49 <-- frequency (Hz.);
#X floatatom 165 122 0 0 0;
#X obj 164 145 * 441;
#X obj 46 220 +~ 1;
#X obj 46 74 phasor~ 0;
#X msg 151 262 bang;
#X text 204 121 <-- chunk size (100ths of a second);
#X obj 580 379 adc~ 1;
#X obj 580 403 hip~ 5;
#X obj 580 453 tabwrite~ sample-table;
#X msg 595 426 bang;
#X text 627 425 <-- click here to record your own sample;
#X text 695 497 v-- re-read the original sample;
#X graph graph2 0 0 44100 44100 633 309 833 179;
#X array table-index 44100 float 0;
#X pop;
#X obj 151 354 tabwrite~ table-index;
#X obj 31 406 *~;
#N canvas 160 476 591 415 envelope 0;
#X obj 81 68 -~ 0.5;
#X obj 83 276 clip~ -0.5 0.5;
#X obj 83 254 *~ 1;
#X obj 127 227 moses 1;
#X msg 96 227 1;
#X obj 83 301 cos~;
#X obj 81 93 wrap~;
#X obj 81 122 -~ 0.5;
#X obj 83 349 *~ -0.5;
#X obj 83 324 -~ 1;
#X floatatom 127 195 0 0 0;
#X text 135 65 subtracting 0.5 and wrapping produces a sawtooth wave
180 degrees out of phase from the original.;
#X text 130 116 as before we subtract 1/2 again to center the sawtooth
from -1/2 to 1/2.;
#X text 177 195 <-- sharpness (at least 1);
#X obj 81 42 inlet~;
#X obj 83 379 outlet~;
#X obj 127 173 inlet;
#X connect 0 0 6 0;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 4 0;
#X connect 3 1 2 1;
#X connect 4 0 2 1;
#X connect 5 0 9 0;
#X connect 6 0 7 0;
#X connect 7 0 2 0;
#X connect 8 0 15 0;
#X connect 9 0 8 0;
#X connect 10 0 3 0;
#X connect 14 0 0 0;
#X connect 16 0 10 0;
#X restore 30 102 pd envelope;
#X floatatom 149 84 0 0 0;
#X text 183 83 <-- envelope sharpness;
#X obj 65 308 line~;
#X obj 65 260 * 441;
#X floatatom 150 238 0 0 0;
#X obj 65 284 pack 0 100;
#X text 185 237 <-- read point in 100ths of a second;
#X obj 47 356 +~;
#X text 191 262 <-- graph table index;
#X obj 65 332 samphold~;
#X text 26 522 This example differs from the previous one in having
samphold~ objects which allow the chunk size and especially the read
point to change only at points where the phase wraps around. This removes
signal discontinuities (when the chunk size changes) and doppler shift
for changing read point.;
#X obj 99 195 samphold~;
#X obj 164 170 sig~;
#X obj 47 196 *~;
#X text 229 192 explicitly to use samphold~...;
#X text 200 173 <-- you often have to convert to audio;
#X text 643 315 ----- 1 second ------;
#X text 631 144 ---- 44103 samples ---;
#X msg 586 570 \; graph2 ylabel 48000 0 44100;
#X text 739 621 updated for Pd version 0.33;
#X msg 646 519 read ../sound/voice.wav sample-table;
#X obj 646 543 soundfiler;
#X text 21 8 SLIDING STABLE LOOPS WITHOUT DOPPLER SHIFT;
#X connect 5 0 48 0;
#X connect 5 0 50 0;
#X connect 6 0 7 1;
#X connect 7 0 6 0;
#X connect 8 0 7 2;
#X connect 10 0 7 0;
#X connect 11 0 28 1;
#X connect 12 0 17 0;
#X connect 14 0 15 0;
#X connect 15 0 42 0;
#X connect 16 0 37 0;
#X connect 17 0 29 0;
#X connect 17 0 39 1;
#X connect 17 0 41 1;
#X connect 17 0 43 0;
#X connect 18 0 27 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 23 0 22 0;
#X connect 28 0 10 0;
#X connect 29 0 28 0;
#X connect 30 0 29 1;
#X connect 32 0 39 0;
#X connect 33 0 35 0;
#X connect 34 0 33 0;
#X connect 35 0 32 0;
#X connect 37 0 27 0;
#X connect 37 0 11 0;
#X connect 39 0 37 1;
#X connect 41 0 43 1;
#X connect 42 0 41 0;
#X connect 43 0 16 0;
#X connect 50 0 51 0;
