#N canvas 346 32 679 621 10;
#N canvas 0 0 450 300 (subpatch) 0;
#X array table21 44103 float 0;
#X coords 0 1.02 44100 -1.02 200 130 1;
#X restore 406 240 graph;
#X obj 337 477 loadbang;
#X obj 31 509 hip~ 5;
#X floatatom 22 255 0 0 0 0 - - -;
#X obj 22 280 * 441;
#X obj 22 402 +~ 1;
#X text 59 254 <-- chunk size (100ths of a second);
#X obj 337 373 adc~ 1;
#X obj 337 398 hip~ 5;
#X msg 352 420 bang;
#X obj 56 483 *~;
#X obj 118 405 line~;
#X obj 118 355 * 441;
#X floatatom 118 330 0 0 0 0 - - -;
#X obj 118 380 pack 0 100;
#X text 144 330 <-- read point in 100ths of a second;
#X obj 56 434 +~;
#X obj 118 430 samphold~;
#X obj 22 330 samphold~;
#X obj 22 305 sig~;
#X obj 22 377 *~;
#X obj 136 486 r~ phase;
#X obj 22 217 s~ phase;
#X obj 73 305 r~ phase;
#X obj 38 352 r~ phase;
#X obj 169 405 r~ phase;
#X obj 163 305 s chunk-size;
#X floatatom 22 66 0 0 0 0 - - -;
#X text 51 67 <-- transposition (10ths of a halftone);
#X obj 163 280 * 0.01;
#X text 246 290 chunk size;
#X text 246 305 in seconds;
#X obj 33 118 r chunk-size;
#X obj 33 143 t b f;
#X obj 22 167 /;
#X text 73 144 divide speed change by chunk;
#X text 71 165 size to get loop frequency;
#X text 302 57 The transposition is frequency in Hz. divided by chunk
size in seconds. This patch calculates the loop frequency as a function
of desired transposition;
#X text 302 99 Notice now that we get Doppler effects when the chunk
size changes. You can suppress that if you don't want it \, by converting
the chunk size to an audio signal \, sampling and holding it. But then
there would be more work to deal with very low frequencies never triggering
the sample and hold...;
#X obj 337 523 soundfiler;
#X obj 22 43 loadbang;
#X obj 136 508 -~ 0.5;
#X obj 136 530 *~ 0.5;
#X obj 136 552 cos~;
#X obj 31 534 output~;
#X obj 56 459 tabread4~ table21;
#X text 393 420 <-- record;
#X text 400 478 v-- re-read original table;
#X text 438 374 --- 44103 samples ---;
#X obj 22 91 expr pow(2 \, $f1/120);
#X text 158 91 speed change;
#X text 302 163 You might also want to have a way to retrigger the
loop to sync it with some other process. By the time we had all this
built the patch would be fairly involved. For now \, we'll move on
to the next topic...;
#X obj 22 191 phasor~;
#X obj 337 447 tabwrite~ table21;
#X msg 337 501 read ../sound/voice.wav table21;
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header calculating_loop_frequency...
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X text 108 27 ...as function of transposition;
#X obj 1 599 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 calculating loop frequency;
#X restore 392 601 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 loop frequency- Related Help Documents;
#X text 19 37 links:;
#X restore 103 601 pd References;
#X obj 6 601 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#X connect 1 0 54 0;
#X connect 2 0 44 0;
#X connect 2 0 44 1;
#X connect 3 0 4 0;
#X connect 3 0 29 0;
#X connect 4 0 19 0;
#X connect 5 0 16 0;
#X connect 7 0 8 0;
#X connect 8 0 53 0;
#X connect 9 0 53 0;
#X connect 10 0 2 0;
#X connect 11 0 17 0;
#X connect 12 0 14 0;
#X connect 13 0 12 0;
#X connect 14 0 11 0;
#X connect 16 0 45 0;
#X connect 17 0 16 1;
#X connect 18 0 20 0;
#X connect 19 0 18 0;
#X connect 20 0 5 0;
#X connect 21 0 41 0;
#X connect 23 0 18 1;
#X connect 24 0 20 1;
#X connect 25 0 17 1;
#X connect 27 0 49 0;
#X connect 29 0 26 0;
#X connect 32 0 33 0;
#X connect 33 0 34 0;
#X connect 33 1 34 1;
#X connect 34 0 52 0;
#X connect 40 0 27 0;
#X connect 41 0 42 0;
#X connect 42 0 43 0;
#X connect 43 0 10 1;
#X connect 45 0 10 0;
#X connect 49 0 34 0;
#X connect 52 0 22 0;
#X connect 54 0 39 0;
