aboutsummaryrefslogtreecommitdiff
path: root/tof/sample_shifft~.pd
diff options
context:
space:
mode:
Diffstat (limited to 'tof/sample_shifft~.pd')
-rw-r--r--tof/sample_shifft~.pd704
1 files changed, 704 insertions, 0 deletions
diff --git a/tof/sample_shifft~.pd b/tof/sample_shifft~.pd
new file mode 100644
index 0000000..964ceb6
--- /dev/null
+++ b/tof/sample_shifft~.pd
@@ -0,0 +1,704 @@
+#N canvas 1165 17 932 773 10;
+#X obj 39 -13 inlet;
+#X obj 67 646 outlet~;
+#X obj 224 650 outlet~;
+#X obj 76 615 *~;
+#X obj 230 619 *~;
+#X obj 51 56 route bang float;
+#X obj 233 -59 inlet pitch;
+#X obj 429 1 inlet duration;
+#X obj 669 198 s \$0-samplength;
+#X obj 648 226 s \$0-sampstart;
+#X obj 52 396 sig~ 1;
+#N canvas 0 0 450 300 fft_setup 0;
+#N canvas 1078 212 565 454 hann-window 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0-hann 1024 float 0;
+#X coords 0 1 1023 0 300 100 1;
+#X restore 82 311 graph;
+#X obj 378 165 osc~;
+#X obj 378 190 *~ -0.5;
+#X obj 378 214 +~ 0.5;
+#X obj 331 247 tabwrite~ \$0-hann;
+#X obj 38 173 /;
+#X obj 127 142 samplerate~;
+#X obj 177 204 swap;
+#X obj 177 228 /;
+#X obj 49 201 * 1000;
+#X obj 38 115 t f b f;
+#X msg 173 92 resize \$1;
+#X obj 173 116 s \$0-hann;
+#X msg 382 130 0;
+#X obj 330 131 t f b;
+#X text 15 8 calculate Hann window table (variable window size) and
+constants window-hz (fundamental frequency of analysis) \, window-sec
+and window-msec (analysis window size in seconds and msec).;
+#X obj 49 228 s \$0-hann-msec;
+#X obj 38 251 s \$0-hann-sec;
+#X obj 177 252 s \$0-hann-hz;
+#X obj 329 96 r \$0-hann-hz;
+#X obj 37 88 r \$0-hann-size;
+#X connect 1 0 2 0;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 9 0;
+#X connect 5 0 17 0;
+#X connect 6 0 5 1;
+#X connect 6 0 7 1;
+#X connect 7 0 8 0;
+#X connect 7 1 8 1;
+#X connect 8 0 18 0;
+#X connect 9 0 16 0;
+#X connect 10 0 5 0;
+#X connect 10 0 7 0;
+#X connect 10 1 6 0;
+#X connect 10 2 11 0;
+#X connect 11 0 12 0;
+#X connect 13 0 1 1;
+#X connect 14 0 1 0;
+#X connect 14 1 4 0;
+#X connect 14 1 13 0;
+#X connect 19 0 14 0;
+#X connect 20 0 10 0;
+#X restore 150 107 pd hann-window;
+#N canvas 1110 82 1040 686 phase-tables 0;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0prev-imag 4096 float 0;
+#X coords 0 1000 4096 -1000 400 300 1;
+#X restore 169 326 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0prev-real 4096 float 0;
+#X coords 0 500 4096 -500 400 300 1;
+#X restore 168 11 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0prev-imagR 4096 float 0;
+#X coords 0 1000 4096 -1000 400 300 1;
+#X restore 591 327 graph;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0prev-realR 4096 float 0;
+#X coords 0 500 4096 -500 400 300 1;
+#X restore 590 12 graph;
+#X restore 151 80 pd phase-tables;
+#X obj 58 80 loadbang;
+#X msg 58 105 1024;
+#X obj 57 133 s \$0-hann-size;
+#X msg 99 103 4096;
+#X connect 2 0 3 0;
+#X connect 3 0 4 0;
+#X connect 5 0 4 0;
+#X restore 215 457 pd fft_setup;
+#N canvas 1376 362 840 564 fft 0;
+#X obj 550 236 block~;
+#X msg 550 211 set \$1 4;
+#X text 511 152 'set' message to block;
+#X text 514 169 allows variable size;
+#X obj 551 187 r \$0-hann-size;
+#N canvas 1202 86 1270 824 read-windows 0;
+#X obj 10 769 *~;
+#X obj 298 773 *~;
+#X obj 11 795 outlet~;
+#X obj 298 798 outlet~;
+#X obj 321 731 tabreceive~ \$0-hann;
+#X obj 11 660 -~;
+#X text 221 525 "back" window 1/4 cycle behind "front" one;
+#X obj 314 235 r \$0-hann-size;
+#X obj 298 706 tabread4~;
+#X obj 10 714 tabread4~;
+#X obj 97 338 * 4;
+#X obj -30 432 *~ 1;
+#X obj -45 337 samphold~;
+#X obj 97 371 phasor~;
+#X obj 100 403 -~ 0.5;
+#X obj 27 582 +~;
+#X obj -8 381 r \$0-samplength;
+#X obj 150 98 inlet~ pitch;
+#X obj -44 95 inlet~ loc;
+#X obj 169 412 *~ 1;
+#X obj 81 541 *~;
+#X obj 114 477 samphold~;
+#X obj 155 617 samphold~;
+#X obj 193 505 / 4;
+#X obj 154 578 *~ 1;
+#X obj -44 246 wrap~;
+#X obj 295 275 t f f f;
+#X obj 753 711 tabread4~;
+#X obj 468 707 tabread4~;
+#X obj 466 773 *~;
+#X obj 754 777 *~;
+#X obj 466 799 outlet~;
+#X obj 753 802 outlet~;
+#X obj -2 461 r \$0-sampstart;
+#X obj -22 492 +~ 0;
+#X obj 81 219 t b f;
+#X obj 59 269 samplerate~;
+#X obj 97 305 /;
+#X obj 735 29 inlet tables;
+#X obj 735 339 unpack s s;
+#X msg 640 433 set \$1;
+#X msg 800 434 set \$1;
+#X connect 0 0 2 0;
+#X connect 1 0 3 0;
+#X connect 4 0 1 1;
+#X connect 4 0 0 1;
+#X connect 4 0 29 1;
+#X connect 4 0 30 1;
+#X connect 5 0 9 0;
+#X connect 5 0 28 0;
+#X connect 7 0 26 0;
+#X connect 8 0 1 0;
+#X connect 9 0 0 0;
+#X connect 10 0 13 0;
+#X connect 11 0 34 0;
+#X connect 12 0 11 0;
+#X connect 13 0 14 0;
+#X connect 13 0 12 1;
+#X connect 13 0 21 1;
+#X connect 13 0 22 1;
+#X connect 14 0 20 0;
+#X connect 15 0 5 0;
+#X connect 15 0 8 0;
+#X connect 15 0 27 0;
+#X connect 16 0 11 1;
+#X connect 17 0 19 0;
+#X connect 17 0 24 0;
+#X connect 18 0 25 0;
+#X connect 19 0 21 0;
+#X connect 20 0 15 1;
+#X connect 21 0 20 1;
+#X connect 22 0 5 1;
+#X connect 23 0 24 1;
+#X connect 24 0 22 0;
+#X connect 25 0 12 0;
+#X connect 26 0 35 0;
+#X connect 26 1 19 1;
+#X connect 26 2 23 0;
+#X connect 27 0 30 0;
+#X connect 28 0 29 0;
+#X connect 29 0 31 0;
+#X connect 30 0 32 0;
+#X connect 33 0 34 1;
+#X connect 34 0 15 0;
+#X connect 35 0 36 0;
+#X connect 35 1 37 1;
+#X connect 36 0 37 0;
+#X connect 37 0 10 0;
+#X connect 38 0 39 0;
+#X connect 39 0 40 0;
+#X connect 39 1 41 0;
+#X connect 40 0 9 0;
+#X connect 40 0 8 0;
+#X connect 41 0 27 0;
+#X connect 41 0 28 0;
+#X restore 199 241 pd read-windows;
+#N canvas 1148 0 821 686 fft-shift 0;
+#X obj 51 477 *~;
+#X obj 18 477 *~;
+#X obj 18 499 -~;
+#X obj 167 475 *~;
+#X obj 136 475 *~;
+#X obj 136 497 +~;
+#X obj 109 193 *~;
+#X obj 78 193 *~;
+#X obj 50 193 *~;
+#X obj 19 193 *~;
+#X obj 19 218 +~;
+#X obj 127 379 *~;
+#X obj 20 622 *~;
+#X obj 238 430 rfft~;
+#X obj 108 161 rfft~;
+#X obj 19 564 rifft~;
+#X obj 21 646 outlet~;
+#X obj 97 379 *~;
+#X obj 97 401 +~;
+#X obj 124 218 -~;
+#X obj 18 431 *~;
+#X obj 51 432 *~;
+#X obj 19 349 +~ 1e-15;
+#X obj 19 598 *~;
+#X obj 52 598 tabreceive~ \$0-hann;
+#X obj 127 643 expr 2/(3*$f1);
+#X obj 97 425 q8_rsqrt~;
+#X text 272 5 recall previous output amplitude. Its phase will be added
+to the phase difference we measure from two windows in the the recorded
+sound.;
+#X obj 121 69 *~;
+#X obj 89 69 *~;
+#X obj 89 91 +~;
+#X obj 159 94 q8_rsqrt~;
+#X obj 159 71 +~ 1e-20;
+#X obj 73 119 *~;
+#X obj 19 118 *~;
+#X obj 29 245 lrshift~ 1;
+#X obj 24 269 lrshift~ -1;
+#X obj 141 245 lrshift~ 1;
+#X obj 133 269 lrshift~ -1;
+#X obj 19 325 +~;
+#X obj 125 331 +~;
+#X text 247 66 divide by the magnitude to make a unit-magnitude complex
+amplitude (phase only). The 1e-20 is to prevent overflows. q8_rsqrt~
+is reciprocal square root.;
+#X text 247 165 Take FT of the window in back. Multiply its conjugate
+by the normalized previous output. The result has the magnitude of
+the input sound and phase (previous output phase) minus (back window
+phase).;
+#X text 249 370 Normalize again \, this time taking care to salt each
+channel with 1e-15 so that we get a unit complex number even if everything
+was zero heretofore.;
+#X text 288 427 Now take the FT of the forward window and multiply
+it by the unit complex number from above. The magnitude will be that
+of the forward window and the phase will be the previous output phase
+plus the phase difference between the two analysis windows -- except
+that if "lock" is on \, they will be modified to agree progressively
+better with the inter-channel phase relationships of the input.;
+#X text 249 242 If "lock" is on \, encourage neighboring channels to
+stay in phase by adding the two neighboring complex amplitudes. The
+result will tend toward the channel with the strongest amplitude. If
+the phase relationships between channels in the output and those in
+the input are in parallel \, then neighboring channels of the quotient
+will all have the same phase and this will not change any phases. (lrshift
+shifts the signal to the left or right depending on its argument.)
+;
+#X text 259 126 Read two windows \, one 1/4 length behind the other
+\, of the input sound \, with Hann window function (see inside).;
+#X obj 109 136 inlet~;
+#X obj 237 409 inlet~;
+#X obj 159 312 *~ 1;
+#X obj 35 300 *~ 1;
+#X obj 137 543 tabsend~ \$0prev-imag;
+#X obj 136 567 tabsend~ \$0prev-real;
+#X obj 127 622 r \$0-hann-size;
+#X obj 20 8 tabreceive~ \$0prev-real;
+#X obj 73 29 tabreceive~ \$0prev-imag;
+#X connect 0 0 2 1;
+#X connect 1 0 2 0;
+#X connect 2 0 15 0;
+#X connect 2 0 52 0;
+#X connect 3 0 5 1;
+#X connect 4 0 5 0;
+#X connect 5 0 15 1;
+#X connect 5 0 51 0;
+#X connect 6 0 19 1;
+#X connect 7 0 19 0;
+#X connect 8 0 10 1;
+#X connect 9 0 10 0;
+#X connect 10 0 36 0;
+#X connect 10 0 35 0;
+#X connect 10 0 39 0;
+#X connect 11 0 18 1;
+#X connect 12 0 16 0;
+#X connect 13 0 1 1;
+#X connect 13 0 3 1;
+#X connect 13 1 0 1;
+#X connect 13 1 4 1;
+#X connect 14 0 9 1;
+#X connect 14 0 7 1;
+#X connect 14 1 6 1;
+#X connect 14 1 8 1;
+#X connect 15 0 23 0;
+#X connect 17 0 18 0;
+#X connect 18 0 26 0;
+#X connect 19 0 37 0;
+#X connect 19 0 38 0;
+#X connect 19 0 40 0;
+#X connect 20 0 1 0;
+#X connect 20 0 4 0;
+#X connect 21 0 0 0;
+#X connect 21 0 3 0;
+#X connect 22 0 17 1;
+#X connect 22 0 17 0;
+#X connect 22 0 20 0;
+#X connect 23 0 12 0;
+#X connect 24 0 23 1;
+#X connect 25 0 12 1;
+#X connect 26 0 20 1;
+#X connect 26 0 21 1;
+#X connect 28 0 30 1;
+#X connect 29 0 30 0;
+#X connect 30 0 32 0;
+#X connect 31 0 33 1;
+#X connect 31 0 34 1;
+#X connect 32 0 31 0;
+#X connect 33 0 8 0;
+#X connect 33 0 7 0;
+#X connect 34 0 9 0;
+#X connect 34 0 6 0;
+#X connect 35 0 50 0;
+#X connect 36 0 50 0;
+#X connect 37 0 49 0;
+#X connect 38 0 49 0;
+#X connect 39 0 22 0;
+#X connect 40 0 11 0;
+#X connect 40 0 11 1;
+#X connect 40 0 21 0;
+#X connect 47 0 14 0;
+#X connect 48 0 13 0;
+#X connect 49 0 40 1;
+#X connect 50 0 39 1;
+#X connect 53 0 25 0;
+#X connect 54 0 29 1;
+#X connect 54 0 29 0;
+#X connect 54 0 34 0;
+#X connect 55 0 28 1;
+#X connect 55 0 28 0;
+#X connect 55 0 33 0;
+#X restore 196 286 pd fft-shift;
+#X obj 199 330 outlet~;
+#X obj 100 106 inlet~;
+#X obj 221 115 inlet~;
+#N canvas 1148 0 821 686 fft-shift 0;
+#X obj 51 477 *~;
+#X obj 18 477 *~;
+#X obj 18 499 -~;
+#X obj 167 475 *~;
+#X obj 136 475 *~;
+#X obj 136 497 +~;
+#X obj 109 193 *~;
+#X obj 78 193 *~;
+#X obj 50 193 *~;
+#X obj 19 193 *~;
+#X obj 19 218 +~;
+#X obj 127 379 *~;
+#X obj 20 622 *~;
+#X obj 238 430 rfft~;
+#X obj 108 161 rfft~;
+#X obj 19 564 rifft~;
+#X obj 21 646 outlet~;
+#X obj 97 379 *~;
+#X obj 97 401 +~;
+#X obj 124 218 -~;
+#X obj 18 431 *~;
+#X obj 51 432 *~;
+#X obj 19 349 +~ 1e-15;
+#X obj 19 598 *~;
+#X obj 52 598 tabreceive~ \$0-hann;
+#X obj 127 643 expr 2/(3*$f1);
+#X obj 97 425 q8_rsqrt~;
+#X text 272 5 recall previous output amplitude. Its phase will be added
+to the phase difference we measure from two windows in the the recorded
+sound.;
+#X obj 121 69 *~;
+#X obj 89 69 *~;
+#X obj 89 91 +~;
+#X obj 159 94 q8_rsqrt~;
+#X obj 159 71 +~ 1e-20;
+#X obj 73 119 *~;
+#X obj 19 118 *~;
+#X obj 29 245 lrshift~ 1;
+#X obj 24 269 lrshift~ -1;
+#X obj 141 245 lrshift~ 1;
+#X obj 133 269 lrshift~ -1;
+#X obj 19 325 +~;
+#X obj 125 331 +~;
+#X text 247 66 divide by the magnitude to make a unit-magnitude complex
+amplitude (phase only). The 1e-20 is to prevent overflows. q8_rsqrt~
+is reciprocal square root.;
+#X text 247 165 Take FT of the window in back. Multiply its conjugate
+by the normalized previous output. The result has the magnitude of
+the input sound and phase (previous output phase) minus (back window
+phase).;
+#X text 249 370 Normalize again \, this time taking care to salt each
+channel with 1e-15 so that we get a unit complex number even if everything
+was zero heretofore.;
+#X text 288 427 Now take the FT of the forward window and multiply
+it by the unit complex number from above. The magnitude will be that
+of the forward window and the phase will be the previous output phase
+plus the phase difference between the two analysis windows -- except
+that if "lock" is on \, they will be modified to agree progressively
+better with the inter-channel phase relationships of the input.;
+#X text 249 242 If "lock" is on \, encourage neighboring channels to
+stay in phase by adding the two neighboring complex amplitudes. The
+result will tend toward the channel with the strongest amplitude. If
+the phase relationships between channels in the output and those in
+the input are in parallel \, then neighboring channels of the quotient
+will all have the same phase and this will not change any phases. (lrshift
+shifts the signal to the left or right depending on its argument.)
+;
+#X text 259 126 Read two windows \, one 1/4 length behind the other
+\, of the input sound \, with Hann window function (see inside).;
+#X obj 109 136 inlet~;
+#X obj 237 409 inlet~;
+#X obj 159 312 *~ 1;
+#X obj 35 300 *~ 1;
+#X obj 127 622 r \$0-hann-size;
+#X obj 137 543 tabsend~ \$0prev-imagR;
+#X obj 136 567 tabsend~ \$0prev-realR;
+#X obj 20 8 tabreceive~ \$0prev-realR;
+#X obj 73 29 tabreceive~ \$0prev-imagR;
+#X connect 0 0 2 1;
+#X connect 1 0 2 0;
+#X connect 2 0 15 0;
+#X connect 2 0 53 0;
+#X connect 3 0 5 1;
+#X connect 4 0 5 0;
+#X connect 5 0 15 1;
+#X connect 5 0 52 0;
+#X connect 6 0 19 1;
+#X connect 7 0 19 0;
+#X connect 8 0 10 1;
+#X connect 9 0 10 0;
+#X connect 10 0 36 0;
+#X connect 10 0 35 0;
+#X connect 10 0 39 0;
+#X connect 11 0 18 1;
+#X connect 12 0 16 0;
+#X connect 13 0 1 1;
+#X connect 13 0 3 1;
+#X connect 13 1 0 1;
+#X connect 13 1 4 1;
+#X connect 14 0 9 1;
+#X connect 14 0 7 1;
+#X connect 14 1 6 1;
+#X connect 14 1 8 1;
+#X connect 15 0 23 0;
+#X connect 17 0 18 0;
+#X connect 18 0 26 0;
+#X connect 19 0 37 0;
+#X connect 19 0 38 0;
+#X connect 19 0 40 0;
+#X connect 20 0 1 0;
+#X connect 20 0 4 0;
+#X connect 21 0 0 0;
+#X connect 21 0 3 0;
+#X connect 22 0 17 1;
+#X connect 22 0 17 0;
+#X connect 22 0 20 0;
+#X connect 23 0 12 0;
+#X connect 24 0 23 1;
+#X connect 25 0 12 1;
+#X connect 26 0 20 1;
+#X connect 26 0 21 1;
+#X connect 28 0 30 1;
+#X connect 29 0 30 0;
+#X connect 30 0 32 0;
+#X connect 31 0 33 1;
+#X connect 31 0 34 1;
+#X connect 32 0 31 0;
+#X connect 33 0 8 0;
+#X connect 33 0 7 0;
+#X connect 34 0 9 0;
+#X connect 34 0 6 0;
+#X connect 35 0 50 0;
+#X connect 36 0 50 0;
+#X connect 37 0 49 0;
+#X connect 38 0 49 0;
+#X connect 39 0 22 0;
+#X connect 40 0 11 0;
+#X connect 40 0 11 1;
+#X connect 40 0 21 0;
+#X connect 47 0 14 0;
+#X connect 48 0 13 0;
+#X connect 49 0 40 1;
+#X connect 50 0 39 1;
+#X connect 51 0 25 0;
+#X connect 54 0 29 1;
+#X connect 54 0 29 0;
+#X connect 54 0 34 0;
+#X connect 55 0 28 1;
+#X connect 55 0 28 0;
+#X connect 55 0 33 0;
+#X restore 299 285 pd fft-shift;
+#X obj 298 326 outlet~;
+#X obj 319 99 inlet tables;
+#X connect 1 0 0 0;
+#X connect 4 0 1 0;
+#X connect 5 0 6 0;
+#X connect 5 1 6 1;
+#X connect 5 2 10 0;
+#X connect 5 3 10 1;
+#X connect 6 0 7 0;
+#X connect 8 0 5 0;
+#X connect 9 0 5 1;
+#X connect 10 0 11 0;
+#X connect 12 0 5 2;
+#X restore 16 460 pd fft;
+#N canvas 0 0 842 452 parse_sample 0;
+#X obj 392 336 outlet end;
+#X obj 493 335 outlet start;
+#X obj 600 336 outlet length;
+#X obj 265 336 outlet tables;
+#X obj 127 338 outlet base_freq;
+#N canvas 0 0 450 300 find_freq 0;
+#X obj 83 241 outlet;
+#N canvas 330 268 450 300 smpToFreq 0;
+#X obj 41 35 inlet;
+#X obj 135 179 samplerate~;
+#X obj 65 346 outlet;
+#X obj 41 67 sel 0;
+#X msg 46 154 0;
+#X obj 126 104 t b f;
+#X obj 132 281 /;
+#X connect 0 0 3 0;
+#X connect 1 0 6 0;
+#X connect 3 0 4 0;
+#X connect 3 1 5 0;
+#X connect 4 0 2 0;
+#X connect 5 0 1 0;
+#X connect 5 1 6 1;
+#X connect 6 0 2 0;
+#X restore 249 100 pd smpToFreq;
+#X obj 120 96 samplerate~;
+#X obj 87 67 t f b;
+#X obj 80 169 *;
+#X obj 78 119 /;
+#X obj 269 12 inlet length;
+#X obj 72 18 inlet samples;
+#X connect 1 0 4 1;
+#X connect 2 0 5 1;
+#X connect 3 0 5 0;
+#X connect 3 1 2 0;
+#X connect 4 0 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 1 0;
+#X connect 7 0 3 0;
+#X restore 192 201 pd find_freq;
+#X obj 356 160 -;
+#X obj 277 72 sample_unpack;
+#X obj 231 252 zexy/demultiplex;
+#X obj 315 223 > 1;
+#X msg 210 277 list 0-\$1 0-\$1;
+#X msg 326 275 list 0-\$1 1-\$1;
+#X obj 218 5 inlet;
+#X obj 455 3 loadbang;
+#X obj 455 35 tof/argument 1;
+#X msg 459 66 sample \$1;
+#X connect 5 0 4 0;
+#X connect 6 0 5 1;
+#X connect 6 0 2 0;
+#X connect 7 0 5 0;
+#X connect 7 2 8 0;
+#X connect 7 3 9 0;
+#X connect 7 4 6 0;
+#X connect 7 4 0 0;
+#X connect 7 5 6 1;
+#X connect 7 5 1 0;
+#X connect 8 0 10 0;
+#X connect 8 1 11 0;
+#X connect 9 0 8 1;
+#X connect 10 0 3 0;
+#X connect 11 0 3 0;
+#X connect 12 0 7 0;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 7 0;
+#X restore 579 166 pd parse_sample;
+#N canvas 0 0 597 611 speed 0;
+#X obj 92 506 outlet;
+#X obj 278 22 inlet default;
+#X obj 43 16 inlet user;
+#X obj 93 75 route bang;
+#X obj 185 358 f;
+#X obj 154 124 /;
+#X msg 148 102 1000 \$1;
+#X obj 245 354 spigot 1;
+#X obj 125 255 t b b;
+#X msg 243 289 1;
+#X obj 154 159 t f b;
+#X msg 196 198 0;
+#X connect 1 0 7 0;
+#X connect 1 0 4 1;
+#X connect 2 0 3 0;
+#X connect 3 0 8 0;
+#X connect 3 1 6 0;
+#X connect 4 0 0 0;
+#X connect 5 0 10 0;
+#X connect 6 0 5 0;
+#X connect 7 0 0 0;
+#X connect 8 0 4 0;
+#X connect 8 1 9 0;
+#X connect 9 0 7 1;
+#X connect 10 0 0 0;
+#X connect 10 1 11 0;
+#X connect 11 0 7 1;
+#X restore 443 79 pd speed;
+#N canvas 0 0 892 551 player 0;
+#X obj 702 496 outlet get_sample;
+#X obj 91 29 inlet bang;
+#X obj 253 38 inlet float;
+#X obj 388 34 inlet pitch;
+#X obj 85 501 outlet~ phase;
+#X msg 172 265 0;
+#X obj 80 318 tof/phasorshot~;
+#X obj 75 249 sig~ 1;
+#X msg 310 229 1;
+#X msg 267 232 0;
+#X msg 501 440 1;
+#X msg 437 434 0;
+#X obj 350 144 sel 0;
+#N canvas 0 0 450 300 start_phase 0;
+#X obj 76 249 outlet;
+#X obj 76 115 f;
+#X obj 244 26 inlet speed;
+#X obj 68 28 inlet bang;
+#X obj 74 145 < 0;
+#X connect 1 0 4 0;
+#X connect 2 0 1 1;
+#X connect 3 0 1 0;
+#X connect 4 0 0 0;
+#X restore 132 200 pd start_phase;
+#X obj 271 365 spigot;
+#X obj 377 395 t b b;
+#X msg 380 430 0;
+#X obj 283 310 == 0;
+#X obj 254 266 t f f;
+#X obj 94 107 t b b b;
+#X obj 378 178 t b b b;
+#X obj 519 292 t b b;
+#X obj 561 38 inlet speed;
+#X obj 416 516 line~;
+#X msg 416 490 \$1 5;
+#X obj 555 510 outlet~ output;
+#X connect 1 0 19 0;
+#X connect 2 0 12 0;
+#X connect 3 0 13 1;
+#X connect 5 0 6 1;
+#X connect 6 0 4 0;
+#X connect 6 1 14 0;
+#X connect 6 2 14 0;
+#X connect 7 0 6 0;
+#X connect 8 0 18 0;
+#X connect 9 0 18 0;
+#X connect 10 0 24 0;
+#X connect 11 0 24 0;
+#X connect 12 0 11 0;
+#X connect 12 1 20 0;
+#X connect 13 0 6 1;
+#X connect 14 0 15 0;
+#X connect 15 0 16 0;
+#X connect 15 1 11 0;
+#X connect 16 0 14 1;
+#X connect 16 0 24 0;
+#X connect 17 0 14 1;
+#X connect 18 0 6 2;
+#X connect 18 1 17 0;
+#X connect 19 0 13 0;
+#X connect 19 1 9 0;
+#X connect 19 2 21 0;
+#X connect 20 0 5 0;
+#X connect 20 1 8 0;
+#X connect 20 2 21 0;
+#X connect 21 0 10 0;
+#X connect 21 1 0 0;
+#X connect 22 0 7 0;
+#X connect 23 0 25 0;
+#X connect 24 0 23 0;
+#X restore 75 290 pd player;
+#X connect 0 0 5 0;
+#X connect 3 0 1 0;
+#X connect 4 0 2 0;
+#X connect 5 0 15 0;
+#X connect 5 1 15 1;
+#X connect 5 2 13 0;
+#X connect 6 0 10 0;
+#X connect 6 0 15 2;
+#X connect 7 0 14 0;
+#X connect 10 0 12 1;
+#X connect 12 0 3 0;
+#X connect 12 1 4 0;
+#X connect 13 0 14 1;
+#X connect 13 1 12 2;
+#X connect 13 3 9 0;
+#X connect 13 4 8 0;
+#X connect 14 0 15 3;
+#X connect 15 0 12 0;
+#X connect 15 1 3 1;
+#X connect 15 1 4 1;