#N canvas 353 101 689 547 10;
#N canvas 0 0 450 300 (subpatch) 0;
#X array cos-output 44100 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 361 217 graph;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table18 44103 float 0;
#X coords 0 1.02 44103 -1.02 200 130 1;
#X restore 361 42 graph;
#X obj 395 452 loadbang;
#X obj 21 251 hip~ 5;
#X floatatom 22 54 0 0 0 0 - - -;
#X text 50 53 <-- frequency (Hz.);
#X floatatom 101 91 0 0 0 0 - - -;
#X obj 101 118 * 441;
#X obj 86 167 +~ 1;
#X text 129 90 <-- chunk size (100ths of a second);
#X obj 395 375 adc~ 1;
#X msg 410 397 bang;
#X obj 21 143 -~ 0.5;
#X obj 21 193 cos~;
#X obj 21 226 *~;
#X obj 395 496 soundfiler;
#X text 376 174 -- 44103 samples ---;
#X text 364 348 ----- 1 second ------;
#X obj 22 81 phasor~;
#X obj 21 168 *~ 0.5;
#X obj 20 283 output~;
#X obj 86 142 *~;
#X text 17 345 Here we apply an amplitude envelope to protect against
discontinuities at the loop point. The envelope is just a cosine wave
from -90 degrees to +90 degrees \, (-pi/2 to pi/2 radians) \, i.e.
\, the part that is zero or positive in sign. The "cos~" object's input
is in cycles (units of 2pi radians) so -1/4 to +1/4 addresses the desired
part of the waveform.;
#X obj 143 251 tabwrite~ cos-output;
#X obj 143 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X text 164 224 <-- click to graph envelope;
#X text 17 432 To see the envelope \, put the phasor on 2 Hz or so
\, click the "graph" button \, and look at "cos-output." This is multiplied
by the tabread4~ output so that it doesn't click when the phase wraps
around.;
#X text 17 486 It is possible to get much more control over the shape
of the envelope \, but this will be taken up later.;
#X obj 86 193 tabread4~ table18;
#X obj 395 419 tabwrite~ table18;
#X msg 395 474 read ../sound/voice.wav table18;
#X text 442 397 <-- click here to record to table;
#X text 486 453 v-- re-read the original sound;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header enveloping_your_looping_sampler
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 525 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
#X text 12 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 85 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 145 HELP_PATCH_AUTHORS Updated for release 0.37. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 25 KEYWORDS signal;
#X text 12 65 DESCRIPTION enveloping your looping sampler;
#X restore 392 527 pd META;
#N canvas 13 202 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Hello World- Related Help Documents;
#X text 19 37 Mention the help link \, and the fact that you can basically
click on anything to get a help patch on it. Also be sure to see the
FAQ at puredata.info as you start out with Pd. A link can be found
in the "Help" menu above.;
#X text 18 90 Another hello world can be found in the mailing lists.
You can search for answers to questions on there \, and if you're having
a hard time finding info you can always ask questions \, too. (See
the netiquette page before posting \, though.);
#X text 69 159 rethink calling that an "atom";
#X restore 103 527 pd References;
#X obj 6 527 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X connect 2 0 30 0;
#X connect 3 0 20 0;
#X connect 3 0 20 1;
#X connect 4 0 18 0;
#X connect 6 0 7 0;
#X connect 7 0 21 1;
#X connect 8 0 28 0;
#X connect 10 0 29 0;
#X connect 11 0 29 0;
#X connect 12 0 19 0;
#X connect 13 0 14 0;
#X connect 13 0 23 0;
#X connect 14 0 3 0;
#X connect 18 0 12 0;
#X connect 18 0 21 0;
#X connect 19 0 13 0;
#X connect 21 0 8 0;
#X connect 24 0 23 0;
#X connect 28 0 14 1;
#X connect 30 0 15 0;
