aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas O Fredericks <mrtof@users.sourceforge.net>2010-08-02 21:48:43 +0000
committerThomas O Fredericks <mrtof@users.sourceforge.net>2010-08-02 21:48:43 +0000
commit5db845cc6d22d7a38654436b841a4358b31db466 (patch)
tree30202beba8904170a6457fdaa0c803273c12a551
parent5285f098b0e14c73c1d451be6eadd9acab3adccd (diff)
Fixed and upgraded my sample abstractions
svn path=/trunk/externals/tof/; revision=13739
-rw-r--r--tof/sample-help.pd62
-rw-r--r--tof/sample.pd36
-rw-r--r--tof/sample_granule~-help.pd52
-rw-r--r--tof/sample_granule~.pd253
-rw-r--r--tof/sample_play~-help.pd44
-rw-r--r--tof/sample_play~.pd610
-rw-r--r--tof/sample_record~-help.pd18
-rw-r--r--tof/sample_record~.pd102
-rw-r--r--tof/sample_shifft~-help.pd47
-rw-r--r--tof/sample_shifft~.pd287
-rw-r--r--tof/sample_unpack.pd6
11 files changed, 1026 insertions, 491 deletions
diff --git a/tof/sample-help.pd b/tof/sample-help.pd
index a95eab8..e7871f6 100644
--- a/tof/sample-help.pd
+++ b/tof/sample-help.pd
@@ -1,26 +1,44 @@
-#N canvas 1173 49 686 393 10;
-#X msg 47 142 read \$1;
-#X obj 47 116 openpanel;
-#X obj 47 93 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+#N canvas 259 224 683 625 10;
+#X obj 47 141 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
-#X text 126 115 Inlet 1 \, read symbol: sound file to read into memory
-;
#X text 44 17 Description: Loads a sound file (wav) as a sample;
-#X text 51 249 See also:;
#X text 45 34 Tags: File Sound Table Sample;
-#X text 222 175 Argument 1 \, symbol: Sample name;
-#X text 223 192 (Argument 2 \, symbol): Sound file to read into memory
+#X obj 84 559 tof/sample_unpack;
+#X text 51 66 Inlet 1;
+#X text 325 160 symbol: Sample name;
+#X text 285 146 Argument 1;
+#X text 69 79 read symbol: Read sound file into the sample's tables
+;
+#X text 281 189 Argument 2 (optional):;
+#X text 324 206 symbol: Sound file to read into the sample's tables
when created;
-#X text 224 222 (Argument 2 \, float): Set a default length to the
-table;
-#X text 281 316 The following example creates a mono (1 channel) sample
-with a 10 second table (at a sampling rate of 44100).;
-#X text 225 241 (Argument 3 \, float): Set a default number of channels
-\, either 1 or 2;
-#X obj 47 177 tof/sample test mono0.wav;
-#X obj 73 272 tof/sample_play~;
-#X obj 72 295 tof/sample_unpack;
-#X obj 283 350 tof/sample recording 441000 1;
-#X connect 0 0 12 0;
-#X connect 1 0 0 0;
-#X connect 2 0 1 0;
+#X text 323 236 float: Set the default length of the sample's tables
+;
+#X text 278 260 Argument 3 (optional):;
+#X text 319 276 float: Set a default number of channels \, either 1
+or 2;
+#X text 51 307 The following example creates a mono (1 channel) sample
+with a table size of 441000 (10 seconds at 44100hz);
+#X text 62 389 Sample playback:;
+#X text 56 533 Sample development:;
+#X obj 84 579 tof/sample_packel;
+#X text 327 398 Sample record:;
+#X obj 31 200 cnv 15 230 20 empty empty empty 20 12 0 14 -260058 -66577
+0;
+#X text 35 202 Click(open) the sample to view info;
+#X msg 73 141 read amen.wav;
+#X obj 47 177 tof/sample test amen.wav;
+#X text 71 95 bang: Display open panel;
+#X obj 79 505 tof/sample_shifft~;
+#X obj 80 481 tof/sample_granule~;
+#X obj 53 341 tof/sample empty 441000 1;
+#X obj 350 419 tof/sample_record~;
+#X obj 80 450 dac~;
+#X obj 80 428 tof/sample_play~ test;
+#X obj 80 410 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X connect 0 0 21 0;
+#X connect 20 0 21 0;
+#X connect 28 0 27 0;
+#X connect 28 1 27 1;
+#X connect 29 0 28 0;
diff --git a/tof/sample.pd b/tof/sample.pd
index 51c3a62..0c8f9b9 100644
--- a/tof/sample.pd
+++ b/tof/sample.pd
@@ -1,5 +1,5 @@
-#N canvas 1234 378 467 220 10;
-#N canvas 1257 168 871 665 guts 0;
+#N canvas 1213 378 467 220 10;
+#N canvas 809 168 871 665 guts 0;
#X obj 182 257 soundfiler;
#X msg 139 232 read -resize \$1 0-\$2 1-\$2;
#X obj 138 180 list append \$1;
@@ -84,15 +84,17 @@
#N canvas 151 271 568 355 file 0;
#X restore 659 507 pd file;
#X obj 100 68 tof/path;
-#X obj 25 5 route return read;
#X obj 88 33 cyclone/tosymbol;
+#X obj 25 5 route return read bang;
+#X obj 170 -34 openpanel;
+#X msg 176 -9 read \$1;
#X connect 0 0 41 4;
#X connect 0 0 41 6;
#X connect 1 0 0 0;
#X connect 2 0 14 0;
#X connect 3 0 6 0;
-#X connect 4 0 47 0;
-#X connect 5 0 47 0;
+#X connect 4 0 48 0;
+#X connect 5 0 48 0;
#X connect 6 0 17 0;
#X connect 6 1 2 0;
#X connect 6 1 41 1;
@@ -150,10 +152,13 @@
#X connect 43 5 37 0;
#X connect 43 6 38 0;
#X connect 46 0 8 0;
-#X connect 47 0 11 0;
-#X connect 47 1 48 0;
-#X connect 47 2 39 0;
-#X connect 48 0 46 0;
+#X connect 47 0 46 0;
+#X connect 48 0 11 0;
+#X connect 48 1 47 0;
+#X connect 48 2 49 0;
+#X connect 48 3 39 0;
+#X connect 49 0 50 0;
+#X connect 50 0 48 0;
#X restore 23 -20 pd guts;
#X obj 23 -45 inlet;
#X text 302 -15 Tables (click to view);
@@ -163,15 +168,20 @@
#X floatatom 42 71 5 0 0 1 channels - -;
#X obj 337 8 table 0-\$1;
#X obj 337 28 table 1-\$1;
-#X text 142 -20 Information;
#X floatatom 55 27 8 0 0 1 start - -;
#X floatatom 49 49 8 0 0 1 end - -;
#X symbolatom 36 93 30 0 0 1 basename - -;
+#X obj 71 -44 bng 15 250 50 0 empty empty Open 17 7 0 10 -4034 -1 -1
+;
+#X obj 171 -20 cnv 15 100 20 empty empty empty 20 12 0 14 -260097 -66577
+0;
+#X text 185 -19 Information;
#X connect 0 0 3 0;
#X connect 0 1 4 0;
-#X connect 0 2 12 0;
+#X connect 0 2 11 0;
#X connect 0 3 6 0;
-#X connect 0 4 11 0;
-#X connect 0 5 10 0;
+#X connect 0 4 10 0;
+#X connect 0 5 9 0;
#X connect 0 6 5 0;
#X connect 1 0 0 0;
+#X connect 12 0 0 0;
diff --git a/tof/sample_granule~-help.pd b/tof/sample_granule~-help.pd
index 85f89f6..a2a766c 100644
--- a/tof/sample_granule~-help.pd
+++ b/tof/sample_granule~-help.pd
@@ -1,5 +1,5 @@
-#N canvas 1098 16 788 643 10;
-#X obj 419 105 tof/sample smpgranu amen.wav;
+#N canvas 197 131 788 643 10;
+#X obj 447 62 tof/sample smpgranu amen.wav;
#X obj 25 129 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 41 164 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
@@ -7,9 +7,8 @@
#X floatatom 185 401 5 0 0 0 - - -;
#X text 45 128 Inlet 1 \, bang: Play sample once;
#X text 60 161 Inlet 1 \, float: Start/stop playing looped sample;
-#X text 223 399 Inlet 2 \, float: Pitch (1=normal);
#X text 27 63 Tags: Sound Sample Play;
-#X obj 100 549 dac~;
+#X obj 72 552 dac~;
#X text 29 32 Description: Pitchshifts or timestretches a sample with
the granular method;
#X text 166 191 Inlet 1 \, grain float: Configure grain length (# of
@@ -18,24 +17,31 @@ samples);
#X msg 77 214 grain 7056;
#X msg 93 238 grain 1764;
#X obj 46 500 sample_granule~ smpgranu;
-#X obj 437 51 openpanel;
-#X msg 441 78 read \$1;
#X obj 445 26 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
-#X text 214 268 Inlet 1 \, duration float: Set duration in ms;
-#X text 206 297 Inlet 1 \, duration: Reset the duration;
-#X msg 136 296 duration;
-#X msg 118 270 duration 10000;
-#X connect 1 0 14 0;
-#X connect 2 0 14 0;
-#X connect 3 0 14 1;
-#X connect 11 0 14 0;
-#X connect 12 0 14 0;
-#X connect 13 0 14 0;
-#X connect 14 0 8 0;
-#X connect 14 1 8 1;
-#X connect 15 0 16 0;
-#X connect 16 0 0 0;
-#X connect 17 0 15 0;
-#X connect 20 0 14 0;
-#X connect 21 0 14 0;
+#X floatatom 242 439 5 0 0 0 - - -;
+#X text 280 438 Inlet 3 \, float: Duration in milliseconds;
+#X obj 246 471 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 281 469 Inlet 3 \, bang: Reset to original duration;
+#X text 223 399 Inlet 2 \, float: Pitch (1=original pitch);
+#X obj 281 530 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 218 549 cyclone/Snapshot~ 100;
+#X floatatom 219 571 5 0 0 0 - - -;
+#X text 256 572 Outlet 3 \, signal: progress;
+#X text 307 527 Outlet 4 \, bang: done;
+#X connect 1 0 13 0;
+#X connect 2 0 13 0;
+#X connect 3 0 13 1;
+#X connect 10 0 13 0;
+#X connect 11 0 13 0;
+#X connect 12 0 13 0;
+#X connect 13 0 7 0;
+#X connect 13 1 7 1;
+#X connect 13 2 21 0;
+#X connect 13 3 20 0;
+#X connect 14 0 0 0;
+#X connect 15 0 13 2;
+#X connect 17 0 13 2;
+#X connect 21 0 22 0;
diff --git a/tof/sample_granule~.pd b/tof/sample_granule~.pd
index acadf44..beb8736 100644
--- a/tof/sample_granule~.pd
+++ b/tof/sample_granule~.pd
@@ -1,4 +1,4 @@
-#N canvas 1105 175 1039 766 10;
+#N canvas 240 136 1039 766 10;
#X obj 49 -3 inlet;
#X obj 77 656 outlet~;
#X obj 234 660 outlet~;
@@ -189,13 +189,13 @@
#X obj 583 386 s \$0-sampstart;
#X obj 676 386 s \$0-samplength;
#X obj 500 385 s \$0-sampend;
-#N canvas 0 0 842 452 parse_sample 0;
+#N canvas 0 22 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;
+#N canvas 0 22 450 300 find_freq 0;
#X obj 83 241 outlet;
#N canvas 330 268 450 300 smpToFreq 0;
#X obj 41 35 inlet;
@@ -236,9 +236,7 @@
#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 obj 618 41 inlet;
#X connect 5 0 4 0;
#X connect 6 0 5 1;
#X connect 6 0 2 0;
@@ -255,83 +253,9 @@
#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 connect 13 0 7 1;
#X restore 483 323 pd parse_sample;
-#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 144 208 pd player;
-#N canvas 0 0 597 611 speed 0;
+#N canvas 0 22 597 611 speed 0;
#X obj 92 506 outlet;
#X obj 278 22 inlet default;
#X obj 43 16 inlet user;
@@ -360,7 +284,7 @@
#X connect 10 1 11 0;
#X connect 11 0 7 1;
#X restore 378 165 pd speed;
-#N canvas 0 0 787 526 hanning 0;
+#N canvas 0 22 787 526 hanning 0;
#X obj 325 180 samplerate~;
#X obj 325 207 * 0.016;
#X obj 326 230 int;
@@ -399,28 +323,161 @@
#X connect 16 4 15 0;
#X restore 617 98 pd hanning;
#X obj 617 57 loadbang;
-#X obj 61 66 route bang float grain duration;
-#X connect 0 0 16 0;
+#X obj 441 -34 inlet duration;
+#X obj 692 194 loadbang;
+#X obj 692 226 tof/argument 1;
+#X msg 696 257 sample \$1;
+#X obj 61 66 route bang float grain;
+#X obj 402 661 outlet~ progress;
+#X obj 592 658 outlet done;
+#N canvas 326 193 914 687 player 0;
+#X obj 91 29 inlet bang;
+#X obj 253 38 inlet float;
+#X obj 388 34 inlet pitch;
+#X obj 87 655 outlet~ phase;
+#X msg 172 265 0;
+#X obj 80 318 tof/phasorshot~;
+#X msg 310 229 1;
+#X msg 267 232 0;
+#X msg 528 383 1;
+#X msg 358 362 0;
+#X obj 350 144 sel 0;
+#N canvas 0 22 450 300 start_phase 0;
+#X obj 76 249 outlet;
+#X obj 244 26 inlet speed;
+#X obj 68 28 inlet bang;
+#X obj 74 145 < 0;
+#X obj 76 115 f 1;
+#X connect 1 0 4 1;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 3 0;
+#X restore 132 200 pd start_phase;
+#X obj 236 380 spigot;
+#X obj 283 310 == 0;
+#X obj 254 266 t f f;
+#X obj 561 38 inlet speed;
+#X obj 294 587 line~;
+#X msg 295 561 \$1 5;
+#X obj 315 662 outlet~ volume;
+#X obj 667 661 outlet done;
+#X obj 363 600 cyclone/trapezoid~;
+#X obj 602 188 samplerate~;
+#X obj 631 137 t b f;
+#X obj 649 233 /;
+#X obj 603 85 sel 0;
+#X obj 631 113 abs;
+#X obj 654 291 /;
+#X obj 665 336 t f f;
+#X msg 709 368 1 \$1;
+#X obj 716 394 -;
+#X obj 640 381 sig~ 0.0015;
+#X obj 717 440 sig~ 0.9985;
+#X obj 315 631 *~;
+#X obj 544 657 outlet~ progress;
+#X obj 378 178 t b b b;
+#X obj 94 107 t b b b;
+#X obj 72 211 f 0;
+#X obj 75 249 sig~ 0;
+#X obj 354 336 delay 5;
+#X msg 450 289 stop;
+#X obj 380 287 t b b;
+#X msg 480 387 0;
+#X msg 360 560 0;
+#X obj 254 414 t b b b;
+#X msg 345 416 0;
+#X obj 803 646 outlet get;
+#X obj 432 243 t b b b b;
+#X msg 652 267 256 \$1;
+#X connect 0 0 35 0;
+#X connect 1 0 10 0;
+#X connect 2 0 11 1;
+#X connect 4 0 5 1;
+#X connect 5 0 3 0;
+#X connect 5 0 20 0;
+#X connect 5 0 33 0;
+#X connect 5 1 12 0;
+#X connect 5 2 12 0;
+#X connect 6 0 14 0;
+#X connect 7 0 14 0;
+#X connect 8 0 17 0;
+#X connect 9 0 37 0;
+#X connect 10 0 40 0;
+#X connect 10 1 34 0;
+#X connect 11 0 5 1;
+#X connect 12 0 43 0;
+#X connect 13 0 12 1;
+#X connect 14 0 5 2;
+#X connect 14 1 13 0;
+#X connect 15 0 24 0;
+#X connect 15 0 36 0;
+#X connect 16 0 32 0;
+#X connect 17 0 16 0;
+#X connect 20 0 32 1;
+#X connect 21 0 23 0;
+#X connect 22 0 21 0;
+#X connect 22 1 23 1;
+#X connect 23 0 47 0;
+#X connect 24 1 25 0;
+#X connect 25 0 22 0;
+#X connect 26 0 27 0;
+#X connect 27 0 30 0;
+#X connect 27 1 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 31 0;
+#X connect 30 0 20 1;
+#X connect 31 0 20 2;
+#X connect 32 0 18 0;
+#X connect 34 0 4 0;
+#X connect 34 1 6 0;
+#X connect 34 2 46 0;
+#X connect 35 0 11 0;
+#X connect 35 1 7 0;
+#X connect 35 2 46 0;
+#X connect 36 0 37 0;
+#X connect 37 0 5 0;
+#X connect 38 0 9 0;
+#X connect 39 0 38 0;
+#X connect 40 0 38 0;
+#X connect 40 1 41 0;
+#X connect 41 0 17 0;
+#X connect 42 0 16 0;
+#X connect 43 0 19 0;
+#X connect 43 1 42 0;
+#X connect 43 2 44 0;
+#X connect 44 0 37 0;
+#X connect 46 0 36 0;
+#X connect 46 1 39 0;
+#X connect 46 2 8 0;
+#X connect 46 3 45 0;
+#X connect 47 0 26 0;
+#X restore 173 235 pd player;
+#X connect 0 0 19 0;
#X connect 3 0 1 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
-#X connect 5 0 12 2;
+#X connect 5 0 22 2;
#X connect 6 0 7 1;
#X connect 7 0 3 0;
#X connect 7 1 4 0;
-#X connect 11 0 13 1;
+#X connect 11 0 12 1;
#X connect 11 1 7 2;
#X connect 11 2 10 0;
#X connect 11 3 8 0;
#X connect 11 4 9 0;
-#X connect 12 0 7 0;
-#X connect 12 1 4 1;
-#X connect 12 1 3 1;
-#X connect 12 2 11 0;
-#X connect 13 0 12 3;
-#X connect 15 0 14 0;
-#X connect 16 0 12 0;
-#X connect 16 1 12 1;
-#X connect 16 2 7 3;
-#X connect 16 3 13 0;
-#X connect 16 4 11 0;
+#X connect 12 0 22 3;
+#X connect 14 0 13 0;
+#X connect 15 0 12 0;
+#X connect 16 0 17 0;
+#X connect 17 0 18 0;
+#X connect 18 0 11 1;
+#X connect 19 0 22 0;
+#X connect 19 1 22 1;
+#X connect 19 2 7 3;
+#X connect 19 3 11 1;
+#X connect 22 0 7 0;
+#X connect 22 1 3 1;
+#X connect 22 1 4 1;
+#X connect 22 2 20 0;
+#X connect 22 3 21 0;
+#X connect 22 4 11 0;
diff --git a/tof/sample_play~-help.pd b/tof/sample_play~-help.pd
index 6250c6e..673748c 100644
--- a/tof/sample_play~-help.pd
+++ b/tof/sample_play~-help.pd
@@ -1,31 +1,39 @@
-#N canvas 356 215 502 410 10;
-#X obj 58 283 dac~;
+#N canvas 1124 102 553 386 10;
+#X obj 61 317 dac~;
#X obj 59 96 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 78 123 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
-#X floatatom 171 194 5 0 0 0 - - -;
+#X floatatom 133 183 5 0 0 0 - - -;
#X text 13 -28 Description: Plays a sample;
#X text 14 -8 Tags: Sound Table Sample;
#X text 85 94 Inlet 1 \, bang: play sample once;
#X text 95 120 Inlet 1 \, float: stop/play sample in a loop;
#X text 178 146 Inlet 1 \, sample symbol: set sample;
#X msg 96 146 sample smppl;
-#X text 209 194 Inlet 2 \, float: set playback speed;
-#X text 121 271 Outlet 1 \, signal: left channel audio output;
-#X text 120 285 Outlet 2 \, signal: right channel audio output;
-#X obj 279 10 openpanel;
-#X msg 279 31 read \$1;
+#X text 96 328 Outlet 1 \, signal: left channel audio output;
+#X text 97 316 Outlet 2 \, signal: right channel audio output;
#X obj 279 -12 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
-#X obj 279 54 tof/sample smppl amen.wav;
+#X obj 279 12 tof/sample smppl amen.wav;
+#X obj 207 247 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 170 180 set playback speed;
+#X floatatom 190 203 5 0 0 0 - - -;
+#X text 227 200 set duration (in ms);
+#X obj 144 266 cyclone/Snapshot~ 100;
+#X floatatom 145 288 5 0 0 0 - - -;
#X obj 59 229 tof/sample_play~ smppl;
-#X connect 1 0 17 0;
-#X connect 2 0 17 0;
-#X connect 3 0 17 1;
-#X connect 9 0 17 0;
-#X connect 13 0 14 0;
-#X connect 14 0 16 0;
-#X connect 15 0 13 0;
-#X connect 17 0 0 0;
-#X connect 17 1 0 1;
+#X text 180 290 Outlet 3 \, signal: progress;
+#X text 234 245 Outlet 4 \, bang: done;
+#X connect 1 0 20 0;
+#X connect 2 0 20 0;
+#X connect 3 0 20 1;
+#X connect 9 0 20 0;
+#X connect 12 0 13 0;
+#X connect 16 0 20 2;
+#X connect 18 0 19 0;
+#X connect 20 0 0 0;
+#X connect 20 1 0 1;
+#X connect 20 2 18 0;
+#X connect 20 3 14 0;
diff --git a/tof/sample_play~.pd b/tof/sample_play~.pd
index e427175..291bc98 100644
--- a/tof/sample_play~.pd
+++ b/tof/sample_play~.pd
@@ -1,30 +1,31 @@
-#N canvas 135 24 729 684 10;
+#N canvas 807 227 873 718 10;
#X obj 29 -23 inlet;
-#X obj 71 321 *~ 0;
-#X obj 260 598 outlet~;
-#X obj 51 502 tabread4~;
-#X obj 417 602 outlet~;
-#X obj 219 512 tabread4~;
-#X obj 223 565 *~;
-#X obj 343 556 *~;
-#X obj 132 401 +~ 0;
-#X obj 41 46 route bang float;
#X obj 231 -20 inlet pitch;
-#N canvas 0 0 892 551 player 0;
-#X obj 702 496 outlet get_sample;
+#X obj 121 625 outlet~ left;
+#X obj 283 628 outlet~ right;
+#X obj 428 623 outlet~ progress;
+#X obj 578 624 outlet done;
+#X obj 46 247 zexy/demultiplex;
+#N canvas 410 272 871 601 voice 0;
+#X obj 123 203 *~ 0;
+#X obj 106 373 tabread4~;
+#X obj 274 383 tabread4~;
+#X obj 101 434 *~;
+#X obj 221 425 *~;
+#X obj 124 258 +~ 0;
+#N canvas 326 193 914 687 player 0;
#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 obj 87 655 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 msg 528 383 1;
+#X msg 358 362 0;
#X obj 350 144 sel 0;
-#N canvas 0 0 450 300 start_phase 0;
+#N canvas 0 22 450 300 start_phase 0;
#X obj 76 249 outlet;
#X obj 244 26 inlet speed;
#X obj 68 28 inlet bang;
@@ -35,60 +36,196 @@
#X connect 3 0 0 0;
#X connect 4 0 3 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 236 380 spigot;
#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 70 220 pd player;
-#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 294 587 line~;
+#X msg 295 561 \$1 5;
+#X obj 315 662 outlet~ volume;
+#X obj 667 661 outlet done;
+#X obj 363 600 cyclone/trapezoid~;
+#X obj 602 188 samplerate~;
+#X obj 631 137 t b f;
+#X obj 649 233 /;
+#X obj 603 85 sel 0;
+#X obj 631 113 abs;
+#X obj 654 291 /;
+#X obj 665 336 t f f;
+#X msg 709 368 1 \$1;
+#X obj 716 394 -;
+#X obj 640 381 sig~ 0.0015;
+#X obj 717 440 sig~ 0.9985;
+#X obj 315 631 *~;
+#X obj 544 657 outlet~ progress;
+#X obj 378 178 t b b b;
+#X obj 94 107 t b b b;
+#X obj 72 211 f 0;
+#X obj 75 249 sig~ 0;
+#X obj 354 336 delay 5;
+#X obj 432 243 t b b b;
+#X msg 450 289 stop;
+#X obj 380 287 t b b;
+#X msg 480 387 0;
+#X msg 360 560 0;
+#X obj 254 414 t b b b;
+#X msg 345 416 0;
+#X msg 651 267 256 \$1;
+#X connect 0 0 35 0;
+#X connect 1 0 10 0;
+#X connect 2 0 11 1;
+#X connect 4 0 5 1;
+#X connect 5 0 3 0;
+#X connect 5 0 20 0;
+#X connect 5 0 33 0;
+#X connect 5 1 12 0;
+#X connect 5 2 12 0;
+#X connect 6 0 14 0;
+#X connect 7 0 14 0;
+#X connect 8 0 17 0;
+#X connect 9 0 37 0;
+#X connect 10 0 41 0;
+#X connect 10 1 34 0;
+#X connect 11 0 5 1;
+#X connect 12 0 44 0;
+#X connect 13 0 12 1;
+#X connect 14 0 5 2;
+#X connect 14 1 13 0;
+#X connect 15 0 24 0;
+#X connect 15 0 36 0;
+#X connect 16 0 32 0;
+#X connect 17 0 16 0;
+#X connect 20 0 32 1;
+#X connect 21 0 23 0;
+#X connect 22 0 21 0;
+#X connect 22 1 23 1;
+#X connect 23 0 46 0;
+#X connect 24 1 25 0;
+#X connect 25 0 22 0;
+#X connect 26 0 27 0;
+#X connect 27 0 30 0;
+#X connect 27 1 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 31 0;
+#X connect 30 0 20 1;
+#X connect 31 0 20 2;
+#X connect 32 0 18 0;
+#X connect 34 0 4 0;
+#X connect 34 1 6 0;
+#X connect 34 2 39 0;
+#X connect 35 0 11 0;
+#X connect 35 1 7 0;
+#X connect 35 2 39 0;
+#X connect 36 0 37 0;
+#X connect 37 0 5 0;
+#X connect 38 0 9 0;
+#X connect 39 0 36 0;
+#X connect 39 1 40 0;
+#X connect 39 2 8 0;
+#X connect 40 0 38 0;
+#X connect 41 0 38 0;
+#X connect 41 1 42 0;
+#X connect 42 0 17 0;
+#X connect 43 0 16 0;
+#X connect 44 0 19 0;
+#X connect 44 1 43 0;
+#X connect 44 2 45 0;
+#X connect 45 0 37 0;
+#X connect 46 0 26 0;
+#X restore 149 146 pd player;
+#X msg 361 290 set \$1;
+#X msg 426 295 set \$1;
+#X obj 96 489 outlet~ left;
+#X obj 258 492 outlet~ right;
+#X obj 89 11 inlet;
+#X obj 106 49 route bang float;
+#X obj 371 499 outlet~ progress;
+#X obj 497 498 outlet done;
+#X obj 263 -119 inlet pitch;
+#X obj 272 4 *;
+#X obj 566 24 inlet data;
+#X text 651 22 freq table-L table-R end start length;
+#X obj 562 85 unpack f s s f f f;
+#X obj 329 -27 t b f;
+#X obj 265 -67 f 1;
+#X obj 430 -117 inlet dur;
+#X obj 272 23 spigot 1;
+#X obj 430 -85 route bang;
+#X obj 427 -58 t b b;
+#X msg 452 -33 1;
+#X obj 491 -59 t f b;
+#X msg 523 -33 0;
+#X msg 485 0 1000 \$1;
+#X obj 485 21 /;
+#X obj 285 67 t f f;
+#X obj 267 -94 t f b;
+#X msg 324 -91 1;
+#X connect 0 0 5 0;
+#X connect 1 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 9 0;
+#X connect 4 0 10 0;
+#X connect 5 0 1 0;
+#X connect 5 0 2 0;
+#X connect 6 0 0 0;
+#X connect 6 1 3 1;
+#X connect 6 1 4 1;
+#X connect 6 2 13 0;
+#X connect 6 3 14 0;
+#X connect 7 0 1 0;
+#X connect 8 0 2 0;
+#X connect 11 0 12 0;
+#X connect 12 0 6 0;
+#X connect 12 1 6 1;
+#X connect 15 0 32 0;
+#X connect 16 0 23 0;
+#X connect 17 0 19 0;
+#X connect 19 0 20 0;
+#X connect 19 1 7 0;
+#X connect 19 2 8 0;
+#X connect 19 4 5 1;
+#X connect 19 5 0 1;
+#X connect 20 0 21 0;
+#X connect 20 1 16 1;
+#X connect 21 0 16 0;
+#X connect 21 0 6 2;
+#X connect 22 0 24 0;
+#X connect 23 0 6 3;
+#X connect 24 0 25 0;
+#X connect 24 1 27 0;
+#X connect 25 0 21 0;
+#X connect 25 1 26 0;
+#X connect 26 0 23 1;
+#X connect 27 0 29 0;
+#X connect 27 1 28 0;
+#X connect 28 0 23 1;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 31 0 6 2;
+#X connect 31 1 6 3;
+#X connect 32 0 21 0;
+#X connect 32 1 33 0;
+#X connect 33 0 23 1;
+#X restore 74 383 pd voice;
+#X obj 430 580 zexy/multiplex~;
+#X obj 580 583 zexy/multiplex;
+#X obj 41 31 route bang float;
+#X obj 56 94 sel 0;
+#X msg 81 221 0;
+#X obj 77 187 s \$0voice;
+#X obj 75 166 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
+1;
+#X obj 138 224 r \$0voice;
+#X obj 513 554 r \$0voice;
+#X obj 664 557 r \$0voice;
+#X obj 410 258 zexy/demultiplex;
+#X obj 502 235 r \$0voice;
+#X obj 504 60 loadbang;
+#X obj 504 92 tof/argument 1;
+#X msg 508 123 sample \$1;
+#X obj 42 136 t a b b b;
+#N canvas 86 54 893 581 sample_get_stereo 0;
+#N canvas 0 22 450 300 find_freq 0;
#X obj 83 241 outlet;
#N canvas 330 268 450 300 smpToFreq 0;
#X obj 41 35 inlet;
@@ -121,69 +258,280 @@
#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 restore 144 253 pd find_freq;
+#X obj 386 180 -;
+#X obj 307 116 sample_unpack;
+#X obj 298 292 zexy/demultiplex;
+#X obj 352 254 > 1;
+#X obj 312 509 outlet data;
+#X text 308 533 freq table-L table-R end start length;
+#X obj 308 468 pack f s s f f f;
+#X msg 301 357 symbol 0-\$1;
+#X msg 557 347 symbol 1-\$1;
+#X msg 399 353 symbol 0-\$1;
+#X obj 357 10 inlet sample;
+#X obj 129 19 inlet get;
+#X connect 0 0 7 0;
+#X connect 1 0 0 1;
+#X connect 1 0 7 5;
+#X connect 2 0 0 0;
+#X connect 2 2 3 0;
+#X connect 2 3 4 0;
+#X connect 2 4 1 0;
+#X connect 2 4 7 3;
+#X connect 2 5 1 1;
+#X connect 2 5 7 4;
+#X connect 3 0 8 0;
+#X connect 3 0 10 0;
+#X connect 3 1 9 0;
+#X connect 3 1 8 0;
+#X connect 4 0 3 1;
#X connect 7 0 5 0;
+#X connect 8 0 7 1;
+#X connect 9 0 7 2;
+#X connect 10 0 7 2;
+#X connect 11 0 2 1;
+#X connect 12 0 2 0;
+#X restore 408 213 pd sample_get_stereo;
+#X obj 453 -18 inlet duration;
+#N canvas 410 272 871 601 voice 0;
+#X obj 123 203 *~ 0;
+#X obj 106 373 tabread4~;
+#X obj 274 383 tabread4~;
+#X obj 101 434 *~;
+#X obj 221 425 *~;
+#X obj 124 258 +~ 0;
+#N canvas 326 193 914 687 player 0;
+#X obj 91 29 inlet bang;
+#X obj 253 38 inlet float;
+#X obj 388 34 inlet pitch;
+#X obj 87 655 outlet~ phase;
+#X msg 172 265 0;
+#X obj 80 318 tof/phasorshot~;
+#X msg 310 229 1;
+#X msg 267 232 0;
+#X msg 528 383 1;
+#X msg 358 362 0;
+#X obj 350 144 sel 0;
+#N canvas 0 22 450 300 start_phase 0;
+#X obj 76 249 outlet;
+#X obj 244 26 inlet speed;
+#X obj 68 28 inlet bang;
+#X obj 74 145 < 0;
+#X obj 76 115 f 1;
+#X connect 1 0 4 1;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 3 0;
+#X restore 132 200 pd start_phase;
+#X obj 236 380 spigot;
+#X obj 283 310 == 0;
+#X obj 254 266 t f f;
+#X obj 561 38 inlet speed;
+#X obj 294 587 line~;
+#X msg 295 561 \$1 5;
+#X obj 315 662 outlet~ volume;
+#X obj 667 661 outlet done;
+#X obj 363 600 cyclone/trapezoid~;
+#X obj 602 188 samplerate~;
+#X obj 631 137 t b f;
+#X obj 649 233 /;
+#X obj 603 85 sel 0;
+#X obj 631 113 abs;
+#X obj 654 291 /;
+#X obj 665 336 t f f;
+#X msg 709 368 1 \$1;
+#X obj 716 394 -;
+#X obj 640 381 sig~ 0.0015;
+#X obj 717 440 sig~ 0.9985;
+#X obj 315 631 *~;
+#X obj 544 657 outlet~ progress;
+#X obj 378 178 t b b b;
+#X obj 94 107 t b b b;
+#X obj 72 211 f 0;
+#X obj 75 249 sig~ 0;
+#X obj 354 336 delay 5;
+#X obj 432 243 t b b b;
+#X msg 450 289 stop;
+#X obj 380 287 t b b;
+#X msg 480 387 0;
+#X msg 360 560 0;
+#X obj 254 414 t b b b;
+#X msg 345 416 0;
+#X msg 675 85 1.21314;
+#X msg 651 267 256 \$1;
+#X connect 0 0 35 0;
+#X connect 1 0 10 0;
+#X connect 2 0 11 1;
+#X connect 4 0 5 1;
+#X connect 5 0 3 0;
+#X connect 5 0 20 0;
+#X connect 5 0 33 0;
+#X connect 5 1 12 0;
+#X connect 5 2 12 0;
+#X connect 6 0 14 0;
+#X connect 7 0 14 0;
+#X connect 8 0 17 0;
+#X connect 9 0 37 0;
+#X connect 10 0 41 0;
+#X connect 10 1 34 0;
+#X connect 11 0 5 1;
+#X connect 12 0 44 0;
+#X connect 13 0 12 1;
+#X connect 14 0 5 2;
+#X connect 14 1 13 0;
+#X connect 15 0 24 0;
+#X connect 15 0 36 0;
+#X connect 16 0 32 0;
+#X connect 17 0 16 0;
+#X connect 20 0 32 1;
+#X connect 21 0 23 0;
+#X connect 22 0 21 0;
+#X connect 22 1 23 1;
+#X connect 23 0 47 0;
+#X connect 24 1 25 0;
+#X connect 25 0 22 0;
+#X connect 26 0 27 0;
+#X connect 27 0 30 0;
+#X connect 27 1 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 31 0;
+#X connect 30 0 20 1;
+#X connect 31 0 20 2;
+#X connect 32 0 18 0;
+#X connect 34 0 4 0;
+#X connect 34 1 6 0;
+#X connect 34 2 39 0;
+#X connect 35 0 11 0;
+#X connect 35 1 7 0;
+#X connect 35 2 39 0;
+#X connect 36 0 37 0;
+#X connect 37 0 5 0;
+#X connect 38 0 9 0;
+#X connect 39 0 36 0;
+#X connect 39 1 40 0;
+#X connect 39 2 8 0;
+#X connect 40 0 38 0;
+#X connect 41 0 38 0;
+#X connect 41 1 42 0;
+#X connect 42 0 17 0;
+#X connect 43 0 16 0;
+#X connect 44 0 19 0;
+#X connect 44 1 43 0;
+#X connect 44 2 45 0;
+#X connect 45 0 37 0;
+#X connect 46 0 25 0;
+#X connect 47 0 26 0;
+#X restore 149 146 pd player;
+#X msg 361 290 set \$1;
+#X msg 426 295 set \$1;
+#X obj 96 489 outlet~ left;
+#X obj 258 492 outlet~ right;
+#X obj 89 11 inlet;
+#X obj 106 49 route bang float;
+#X obj 371 499 outlet~ progress;
+#X obj 497 498 outlet done;
+#X obj 263 -119 inlet pitch;
+#X obj 272 4 *;
+#X obj 566 24 inlet data;
+#X text 651 22 freq table-L table-R end start length;
+#X obj 562 85 unpack f s s f f f;
+#X obj 329 -27 t b f;
+#X obj 265 -67 f 1;
+#X obj 430 -117 inlet dur;
+#X obj 272 23 spigot 1;
+#X obj 430 -85 route bang;
+#X obj 427 -58 t b b;
+#X msg 452 -33 1;
+#X obj 491 -59 t f b;
+#X msg 523 -33 0;
+#X msg 485 0 1000 \$1;
+#X obj 485 21 /;
+#X obj 285 67 t f f;
+#X obj 267 -94 t f b;
+#X msg 324 -91 1;
+#X connect 0 0 5 0;
+#X connect 1 0 3 0;
+#X connect 2 0 4 0;
+#X connect 3 0 9 0;
+#X connect 4 0 10 0;
+#X connect 5 0 1 0;
+#X connect 5 0 2 0;
+#X connect 6 0 0 0;
+#X connect 6 1 3 1;
+#X connect 6 1 4 1;
+#X connect 6 2 13 0;
+#X connect 6 3 14 0;
+#X connect 7 0 1 0;
+#X connect 8 0 2 0;
+#X connect 11 0 12 0;
+#X connect 12 0 6 0;
+#X connect 12 1 6 1;
+#X connect 15 0 32 0;
+#X connect 16 0 23 0;
+#X connect 17 0 19 0;
+#X connect 19 0 20 0;
+#X connect 19 1 7 0;
+#X connect 19 2 8 0;
+#X connect 19 4 5 1;
+#X connect 19 5 0 1;
+#X connect 20 0 21 0;
+#X connect 20 1 16 1;
+#X connect 21 0 16 0;
+#X connect 21 0 6 2;
+#X connect 22 0 24 0;
+#X connect 23 0 6 3;
+#X connect 24 0 25 0;
+#X connect 24 1 27 0;
+#X connect 25 0 21 0;
+#X connect 25 1 26 0;
+#X connect 26 0 23 1;
+#X connect 27 0 29 0;
+#X connect 27 1 28 0;
+#X connect 28 0 23 1;
+#X connect 29 0 30 0;
+#X connect 30 0 31 0;
+#X connect 31 0 6 2;
+#X connect 31 1 6 3;
+#X connect 32 0 21 0;
+#X connect 32 1 33 0;
+#X connect 33 0 23 1;
+#X restore 385 401 pd voice;
+#X connect 0 0 10 0;
+#X connect 1 0 7 1;
+#X connect 1 0 26 1;
+#X connect 6 0 7 0;
+#X connect 6 1 26 0;
+#X connect 7 0 2 0;
+#X connect 7 1 3 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 309 212 pd parse_sample;
-#X obj 163 199 *;
-#X obj 311 390 unpack s s;
-#X msg 306 419 set \$1;
-#X msg 371 424 set \$1;
-#X obj 167 143 f 1;
-#X obj 190 167 t b f;
-#X connect 0 0 9 0;
-#X connect 1 0 8 0;
-#X connect 3 0 6 0;
-#X connect 5 0 7 0;
-#X connect 6 0 2 0;
-#X connect 7 0 4 0;
-#X connect 8 0 3 0;
-#X connect 8 0 5 0;
-#X connect 9 0 11 0;
-#X connect 9 1 11 1;
-#X connect 9 2 12 0;
-#X connect 10 0 11 2;
-#X connect 10 0 17 0;
-#X connect 11 0 1 0;
-#X connect 11 1 6 1;
-#X connect 11 1 7 1;
-#X connect 11 2 12 0;
-#X connect 12 0 18 0;
-#X connect 12 1 14 0;
-#X connect 12 3 8 1;
-#X connect 12 4 1 1;
-#X connect 13 0 11 3;
-#X connect 14 0 15 0;
-#X connect 14 1 16 0;
-#X connect 15 0 3 0;
-#X connect 16 0 5 0;
-#X connect 17 0 13 0;
-#X connect 18 0 17 0;
-#X connect 18 1 13 1;
+#X connect 8 0 4 0;
+#X connect 9 0 5 0;
+#X connect 10 0 23 0;
+#X connect 10 1 11 0;
+#X connect 10 2 24 1;
+#X connect 11 0 12 0;
+#X connect 11 1 23 0;
+#X connect 12 0 6 0;
+#X connect 14 0 13 0;
+#X connect 15 0 6 1;
+#X connect 16 0 8 0;
+#X connect 17 0 9 2;
+#X connect 18 0 7 3;
+#X connect 18 1 26 3;
+#X connect 19 0 18 1;
+#X connect 20 0 21 0;
+#X connect 21 0 22 0;
+#X connect 22 0 24 1;
+#X connect 23 0 6 0;
+#X connect 23 1 24 0;
+#X connect 23 2 14 0;
+#X connect 23 3 12 0;
+#X connect 24 0 18 0;
+#X connect 25 0 7 2;
+#X connect 25 0 26 2;
+#X connect 26 0 2 0;
+#X connect 26 1 3 0;
+#X connect 26 2 8 1;
+#X connect 26 3 9 1;
diff --git a/tof/sample_record~-help.pd b/tof/sample_record~-help.pd
index f536dc2..e317188 100644
--- a/tof/sample_record~-help.pd
+++ b/tof/sample_record~-help.pd
@@ -1,4 +1,4 @@
-#N canvas 1134 242 766 482 10;
+#N canvas 794 230 766 482 10;
#X text 227 253 Argument 1 \, symbol: the name of the sample to record
to;
#X text 44 4 Description: Records into samples;
@@ -7,7 +7,6 @@ to;
#X obj 206 176 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X text 239 44 A 10 second mono sample (at a samplerate of 44100);
-#X obj 239 65 tof/sample recording 441000 1;
#X obj 75 331 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X obj 74 416 dac~;
@@ -19,13 +18,14 @@ to;
#X text 332 213 Inlet 3 \, sample symbol: set the sample;
#X text 231 171 Inlet 3 \, float: turn recording on/off. The maximum
recording length is limited by the size of the sample;
-#X obj 74 374 tof/sample_play~ recording;
-#X obj 65 253 sample_record~ recording;
#X text 130 329 Play or loop the recording;
+#X obj 242 66 tof/sample recording 441000 1;
+#X obj 65 253 sample_record~ recording;
+#X obj 75 373 tof/sample_play~ recording;
#X connect 3 0 16 0;
#X connect 4 0 16 2;
-#X connect 7 0 15 0;
-#X connect 9 0 15 0;
-#X connect 10 0 16 2;
-#X connect 15 0 8 0;
-#X connect 15 1 8 1;
+#X connect 6 0 17 0;
+#X connect 8 0 17 0;
+#X connect 9 0 16 2;
+#X connect 17 0 7 0;
+#X connect 17 1 7 1;
diff --git a/tof/sample_record~.pd b/tof/sample_record~.pd
index f738aa8..87454b8 100644
--- a/tof/sample_record~.pd
+++ b/tof/sample_record~.pd
@@ -1,52 +1,68 @@
-#N canvas 1154 129 1026 720 10;
+#N canvas 654 129 1026 720 10;
#X obj 47 58 inlet~;
#X obj 142 53 inlet~;
#X obj 295 30 inlet off/on;
-#X obj 431 53 loadbang;
-#X obj 436 100 symbol \$1;
-#X msg 433 130 sample \$1;
-#X obj 122 398 cyclone/record~;
-#X obj 321 235 spigot;
+#X obj 456 51 loadbang;
+#X obj 461 98 symbol \$1;
+#X msg 483 125 sample \$1;
+#X obj 269 351 spigot;
#X obj 579 209 > 1;
-#X msg 417 289 set 0-\$1;
-#X msg 553 286 set 1-\$1;
-#X obj 122 436 snapshot~;
-#X obj 438 511 f;
-#X obj 258 178 sel 0;
-#X obj 239 142 t f f;
-#X obj 123 464 sel -1;
-#X obj 249 398 cyclone/record~;
+#X msg 462 284 set 0-\$1;
+#X msg 598 281 set 1-\$1;
#X obj 295 644 tof/sample_packel;
#X msg 300 596 start 0 \, end \$1;
#X obj 305 65 route sample;
-#X obj 480 158 tof/sample_unpack;
-#X obj 285 203 b;
-#X connect 0 0 6 0;
-#X connect 1 0 16 0;
-#X connect 2 0 19 0;
+#X obj 498 158 tof/sample_unpack;
+#X obj 121 402 tabwrite~;
+#X obj 262 402 tabwrite~;
+#X msg 182 295 stop;
+#X obj 252 485 timer;
+#X obj 355 538 min;
+#X obj 110 244 t b b;
+#X obj 109 215 sel 0;
+#X obj 157 244 t b b b;
+#N canvas 0 22 450 300 msToSmp 0;
+#X obj 142 120 samplerate~;
+#X obj 145 146 / 1000;
+#X obj 62 214 * 44.1;
+#X obj 62 93 t f b;
+#X obj 63 37 inlet;
+#X obj 60 256 outlet;
+#X connect 0 0 1 0;
+#X connect 1 0 2 1;
+#X connect 2 0 5 0;
+#X connect 3 0 2 0;
+#X connect 3 1 0 0;
+#X connect 4 0 3 0;
+#X restore 258 515 pd msToSmp;
+#X connect 0 0 14 0;
+#X connect 1 0 15 0;
+#X connect 2 0 12 0;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
-#X connect 5 0 17 1;
-#X connect 5 0 20 0;
-#X connect 6 0 11 0;
-#X connect 7 0 16 0;
-#X connect 8 0 7 1;
-#X connect 9 0 6 0;
-#X connect 10 0 16 0;
-#X connect 11 0 15 0;
-#X connect 12 0 18 0;
-#X connect 13 0 11 0;
-#X connect 13 1 21 0;
-#X connect 14 0 6 0;
-#X connect 14 1 13 0;
-#X connect 15 0 12 0;
-#X connect 15 1 18 0;
-#X connect 18 0 17 0;
-#X connect 19 0 4 0;
-#X connect 19 1 14 0;
-#X connect 19 1 7 0;
-#X connect 20 2 9 0;
-#X connect 20 2 10 0;
-#X connect 20 3 8 0;
-#X connect 20 6 12 1;
-#X connect 21 0 4 0;
+#X connect 5 0 10 1;
+#X connect 5 0 13 0;
+#X connect 6 0 15 0;
+#X connect 7 0 6 1;
+#X connect 8 0 14 0;
+#X connect 9 0 15 0;
+#X connect 11 0 10 0;
+#X connect 12 0 4 0;
+#X connect 12 1 20 0;
+#X connect 13 2 8 0;
+#X connect 13 2 9 0;
+#X connect 13 3 7 0;
+#X connect 13 6 18 1;
+#X connect 16 0 6 0;
+#X connect 16 0 14 0;
+#X connect 17 0 22 0;
+#X connect 18 0 11 0;
+#X connect 19 0 16 0;
+#X connect 19 1 17 1;
+#X connect 20 0 19 0;
+#X connect 20 1 21 0;
+#X connect 21 0 14 0;
+#X connect 21 0 6 0;
+#X connect 21 1 4 0;
+#X connect 21 2 17 0;
+#X connect 22 0 18 0;
diff --git a/tof/sample_shifft~-help.pd b/tof/sample_shifft~-help.pd
index b7d3c4e..91d9f0c 100644
--- a/tof/sample_shifft~-help.pd
+++ b/tof/sample_shifft~-help.pd
@@ -1,26 +1,39 @@
-#N canvas 109 159 710 482 10;
-#X obj 87 407 dac~;
+#N canvas 1793 81 774 691 10;
+#X obj 66 427 dac~;
#X obj 28 181 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
-#X obj 44 216 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
+#X obj 44 216 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
-#X floatatom 175 331 5 0 0 0 - - -;
+#X floatatom 122 250 5 0 0 0 - - -;
#X text 48 180 Inlet 1 \, bang: Play sample once;
#X text 63 213 Inlet 1 \, float: Start/stop playing looped sample;
#X text 34 28 Description: Pitchshifts or timestretches a sample with
the FFT method;
#X text 32 58 Tags: Sound Sample Play;
#X obj 458 120 tof/sample smpfft amen.wav;
-#X text 213 329 Inlet 2 \, float: Pitch (1=normal);
-#X obj 28 372 tof/sample_shifft~ smpfft;
-#X text 171 239 Inlet 1 \, duration float: Set duration in ms;
-#X text 163 268 Inlet 1 \, duration: Reset the duration;
-#X msg 93 267 duration;
-#X msg 75 241 duration 10000;
-#X connect 1 0 10 0;
-#X connect 2 0 10 0;
-#X connect 3 0 10 1;
-#X connect 10 0 0 0;
-#X connect 10 1 0 1;
-#X connect 13 0 10 0;
-#X connect 14 0 10 0;
+#X text 160 248 Inlet 2 \, float: Pitch (1=normal);
+#X obj 457 97 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X floatatom 281 281 5 0 0 0 - - -;
+#X text 319 280 Inlet 3 \, float: Duration in milliseconds;
+#X obj 285 313 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 320 311 Inlet 3 \, bang: Reset to original duration;
+#X obj 196 416 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 133 435 cyclone/Snapshot~ 100;
+#X floatatom 134 457 5 0 0 0 - - -;
+#X obj 38 363 tof/sample_shifft~ smpfft;
+#X text 171 458 Outlet 3 \, signal: progress;
+#X text 225 413 Outlet 4 \, bang: done;
+#X connect 1 0 18 0;
+#X connect 2 0 18 0;
+#X connect 3 0 18 1;
+#X connect 10 0 8 0;
+#X connect 11 0 18 2;
+#X connect 13 0 18 2;
+#X connect 16 0 17 0;
+#X connect 18 0 0 0;
+#X connect 18 1 0 1;
+#X connect 18 2 16 0;
+#X connect 18 3 15 0;
diff --git a/tof/sample_shifft~.pd b/tof/sample_shifft~.pd
index 4a74e75..6c7a0d4 100644
--- a/tof/sample_shifft~.pd
+++ b/tof/sample_shifft~.pd
@@ -1,4 +1,4 @@
-#N canvas 1165 17 932 773 10;
+#N canvas 748 22 932 773 10;
#X obj 39 -13 inlet;
#X obj 67 646 outlet~;
#X obj 224 650 outlet~;
@@ -7,10 +7,10 @@
#X obj 233 -59 inlet pitch;
#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;
+#X obj 103 394 sig~ 1;
+#N canvas 0 22 450 300 fft_setup 0;
#N canvas 1078 212 565 454 hann-window 0;
-#N canvas 0 0 450 300 (subpatch) 0;
+#N canvas 0 22 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;
@@ -60,19 +60,19 @@ and window-msec (analysis window size in seconds and msec).;
#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;
+#N canvas 0 22 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;
+#N canvas 0 22 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;
+#N canvas 0 22 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;
+#N canvas 0 22 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;
@@ -85,13 +85,13 @@ and window-msec (analysis window size in seconds and msec).;
#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;
+#N canvas 840 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;
+#N canvas 410 86 1270 824 read-windows 0;
#X obj 10 769 *~;
#X obj 298 773 *~;
#X obj 11 795 outlet~;
@@ -117,7 +117,6 @@ and window-msec (analysis window size in seconds and msec).;
#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~;
@@ -138,15 +137,15 @@ and window-msec (analysis window size in seconds and msec).;
#X connect 1 0 3 0;
#X connect 4 0 1 1;
#X connect 4 0 0 1;
+#X connect 4 0 28 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 5 0 27 0;
+#X connect 7 0 25 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 11 0 33 0;
#X connect 12 0 11 0;
#X connect 13 0 14 0;
#X connect 13 0 12 1;
@@ -155,40 +154,39 @@ and window-msec (analysis window size in seconds and msec).;
#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 15 0 26 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 18 0 12 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 25 0 34 0;
+#X connect 25 1 19 1;
+#X connect 25 2 23 0;
+#X connect 26 0 29 0;
+#X connect 27 0 28 0;
+#X connect 28 0 30 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 32 0 33 1;
+#X connect 33 0 15 0;
+#X connect 34 0 35 0;
+#X connect 34 1 36 1;
#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 36 0 10 0;
+#X connect 37 0 38 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 connect 38 1 40 0;
+#X connect 39 0 9 0;
+#X connect 39 0 8 0;
+#X connect 40 0 26 0;
+#X connect 40 0 27 0;
#X restore 199 241 pd read-windows;
-#N canvas 1148 0 821 686 fft-shift 0;
+#N canvas 1148 22 821 686 fft-shift 0;
#X obj 51 477 *~;
#X obj 18 477 *~;
#X obj 18 499 -~;
@@ -343,7 +341,7 @@ shifts the signal to the left or right depending on its argument.)
#X obj 199 330 outlet~;
#X obj 100 106 inlet~;
#X obj 221 115 inlet~;
-#N canvas 1148 0 821 686 fft-shift 0;
+#N canvas 859 22 821 686 fft-shift 0;
#X obj 51 477 *~;
#X obj 18 477 *~;
#X obj 18 499 -~;
@@ -509,13 +507,13 @@ shifts the signal to the left or right depending on its argument.)
#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;
+#N canvas 0 22 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;
+#N canvas 0 22 450 300 find_freq 0;
#X obj 83 241 outlet;
#N canvas 330 268 450 300 smpToFreq 0;
#X obj 41 35 inlet;
@@ -555,10 +553,8 @@ shifts the signal to the left or right depending on its argument.)
#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 obj 590 14 inlet sample;
+#X obj 218 5 inlet get;
#X connect 5 0 4 0;
#X connect 6 0 5 1;
#X connect 6 0 2 0;
@@ -574,12 +570,10 @@ shifts the signal to the left or right depending on its argument.)
#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 connect 12 0 7 1;
+#X connect 13 0 7 0;
#X restore 579 166 pd parse_sample;
-#N canvas 0 0 597 611 speed 0;
+#N canvas 0 22 597 611 speed 0;
#X obj 92 506 outlet;
#X obj 278 22 inlet default;
#X obj 43 16 inlet user;
@@ -608,84 +602,140 @@ shifts the signal to the left or right depending on its argument.)
#X connect 10 1 11 0;
#X connect 11 0 7 1;
#X restore 220 161 pd speed;
-#N canvas 0 0 892 551 player 0;
-#X obj 702 496 outlet get_sample;
+#X obj 644 33 loadbang;
+#X obj 644 65 tof/argument 1;
+#X msg 648 96 sample \$1;
+#X obj 432 -49 inlet duration;
+#X obj 58 57 route bang float;
+#N canvas 326 193 914 687 player 0;
#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 obj 87 655 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 msg 528 383 1;
+#X msg 358 362 0;
#X obj 350 144 sel 0;
-#N canvas 0 0 450 300 start_phase 0;
+#N canvas 0 22 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 obj 76 115 f 1;
+#X connect 1 0 4 1;
+#X connect 2 0 4 0;
+#X connect 3 0 0 0;
+#X connect 4 0 3 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 236 380 spigot;
#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 obj 52 56 route bang float duration;
-#X connect 0 0 14 0;
+#X obj 294 587 line~;
+#X msg 295 561 \$1 5;
+#X obj 315 662 outlet~ volume;
+#X obj 667 661 outlet done;
+#X obj 363 600 cyclone/trapezoid~;
+#X obj 602 188 samplerate~;
+#X obj 631 137 t b f;
+#X obj 649 233 /;
+#X obj 603 85 sel 0;
+#X obj 631 113 abs;
+#X obj 654 291 /;
+#X obj 665 336 t f f;
+#X msg 709 368 1 \$1;
+#X obj 716 394 -;
+#X obj 640 381 sig~ 0.0015;
+#X obj 717 440 sig~ 0.9985;
+#X obj 315 631 *~;
+#X obj 544 657 outlet~ progress;
+#X obj 378 178 t b b b;
+#X obj 94 107 t b b b;
+#X obj 72 211 f 0;
+#X obj 75 249 sig~ 0;
+#X obj 354 336 delay 5;
+#X msg 450 289 stop;
+#X obj 380 287 t b b;
+#X msg 480 387 0;
+#X msg 360 560 0;
+#X obj 254 414 t b b b;
+#X msg 345 416 0;
+#X obj 803 646 outlet get;
+#X obj 432 243 t b b b b;
+#X msg 651 267 256 \$1;
+#X connect 0 0 35 0;
+#X connect 1 0 10 0;
+#X connect 2 0 11 1;
+#X connect 4 0 5 1;
+#X connect 5 0 3 0;
+#X connect 5 0 20 0;
+#X connect 5 0 33 0;
+#X connect 5 1 12 0;
+#X connect 5 2 12 0;
+#X connect 6 0 14 0;
+#X connect 7 0 14 0;
+#X connect 8 0 17 0;
+#X connect 9 0 37 0;
+#X connect 10 0 40 0;
+#X connect 10 1 34 0;
+#X connect 11 0 5 1;
+#X connect 12 0 43 0;
+#X connect 13 0 12 1;
+#X connect 14 0 5 2;
+#X connect 14 1 13 0;
+#X connect 15 0 24 0;
+#X connect 15 0 36 0;
+#X connect 16 0 32 0;
+#X connect 17 0 16 0;
+#X connect 20 0 32 1;
+#X connect 21 0 23 0;
+#X connect 22 0 21 0;
+#X connect 22 1 23 1;
+#X connect 23 0 47 0;
+#X connect 24 1 25 0;
+#X connect 25 0 22 0;
+#X connect 26 0 27 0;
+#X connect 27 0 30 0;
+#X connect 27 1 28 0;
+#X connect 28 0 29 0;
+#X connect 29 0 31 0;
+#X connect 30 0 20 1;
+#X connect 31 0 20 2;
+#X connect 32 0 18 0;
+#X connect 34 0 4 0;
+#X connect 34 1 6 0;
+#X connect 34 2 46 0;
+#X connect 35 0 11 0;
+#X connect 35 1 7 0;
+#X connect 35 2 46 0;
+#X connect 36 0 37 0;
+#X connect 37 0 5 0;
+#X connect 38 0 9 0;
+#X connect 39 0 38 0;
+#X connect 40 0 38 0;
+#X connect 40 1 41 0;
+#X connect 41 0 17 0;
+#X connect 42 0 16 0;
+#X connect 43 0 19 0;
+#X connect 43 1 42 0;
+#X connect 43 2 44 0;
+#X connect 44 0 37 0;
+#X connect 46 0 36 0;
+#X connect 46 1 39 0;
+#X connect 46 2 8 0;
+#X connect 46 3 45 0;
+#X connect 47 0 26 0;
+#X restore 169 287 pd player;
+#X obj 392 651 outlet~ progress;
+#X obj 582 648 outlet done;
+#X connect 0 0 17 0;
#X connect 3 0 1 0;
#X connect 4 0 2 0;
#X connect 5 0 8 0;
-#X connect 5 0 13 2;
+#X connect 5 0 18 2;
#X connect 8 0 10 1;
#X connect 10 0 3 0;
#X connect 10 1 4 0;
@@ -693,12 +743,17 @@ shifts the signal to the left or right depending on its argument.)
#X connect 11 1 10 2;
#X connect 11 3 7 0;
#X connect 11 4 6 0;
-#X connect 12 0 13 3;
-#X connect 13 0 10 0;
-#X connect 13 1 3 1;
-#X connect 13 1 4 1;
-#X connect 13 2 11 0;
-#X connect 14 0 13 0;
-#X connect 14 1 13 1;
-#X connect 14 2 12 0;
-#X connect 14 3 11 0;
+#X connect 12 0 18 3;
+#X connect 13 0 14 0;
+#X connect 14 0 15 0;
+#X connect 15 0 11 1;
+#X connect 16 0 12 0;
+#X connect 17 0 18 0;
+#X connect 17 1 18 1;
+#X connect 17 2 11 1;
+#X connect 18 0 10 0;
+#X connect 18 1 3 1;
+#X connect 18 1 4 1;
+#X connect 18 2 19 0;
+#X connect 18 3 20 0;
+#X connect 18 4 11 0;
diff --git a/tof/sample_unpack.pd b/tof/sample_unpack.pd
index 8719d35..f22b446 100644
--- a/tof/sample_unpack.pd
+++ b/tof/sample_unpack.pd
@@ -1,4 +1,4 @@
-#N canvas 1128 207 956 475 10;
+#N canvas 724 207 956 475 10;
#X obj 44 38 inlet;
#X obj 31 213 iemlib/iem_send;
#X obj 41 103 t b a;
@@ -15,6 +15,8 @@
#X obj 44 64 route sample bang;
#X obj 60 285 unpack f s s f f f f;
#X obj 219 432 outlet basename;
+#X obj 253 41 inlet;
+#X obj 253 72 route sample;
#X connect 0 0 13 0;
#X connect 2 0 4 0;
#X connect 2 1 6 0;
@@ -31,3 +33,5 @@
#X connect 14 4 11 0;
#X connect 14 5 12 0;
#X connect 14 6 10 0;
+#X connect 16 0 17 0;
+#X connect 17 0 6 0;