#N canvas 96 137 1205 820 10; #X obj 527 97 phasor~, f 11; #X floatatom 53 70 5 -100 1000 0 - - -, f 5; #X obj 527 147 tabread4~ \$0-tab; #X obj 526 119 *~ 1e+006; #X obj 881 118 samplerate~; #X obj 881 142 / 2; #X obj 870 56 loadbang; #X obj 870 193 tabwrite~ \$0-tab; #X obj 881 166 osc~; #X obj 870 97 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1 -1; #X msg 894 79 \; pd dsp 1; #X obj 869 221 table \$0-tab 1e+006; #X text 863 27 and will take about 20 seconds to fill.; #X text 863 11 *** The table is now 1 million points \,; #X obj 527 69 / 1e+006; #X text 98 68 playback speed \, samples/sec; #X text 602 89 naive way: just; #X text 601 100 run a phasor; #X text 601 112 into tabread4~; #X text 534 46 cycles/sec; #X text 534 36 convert to; #X text 517 219 BAD; #X text 139 149 <- reset phase. 0.5 causes trouble for the "bad" way. ; #X obj 53 19 loadbang; #X msg 53 43 1000; #X obj 53 93 s \$0-speed; #X obj 527 13 r \$0-speed; #X obj 56 175 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144 -1 -1 6350 1; #X obj 53 197 s \$0-playbackpos; #X msg 53 149 0.5; #X msg 89 149 0.01; #X obj 590 70 r \$0-playbackpos; #X obj 15 264 cnv 15 580 500 empty empty this_works 20 12 0 14 -233017 -159808 0; #X obj 607 264 cnv 15 580 500 empty empty this_does_only_when_|pd_send~|_was_created_AFTER_|pd_receive~| 20 12 0 14 -261682 -159808 0; #X obj 252 497 metro 100; #X obj 31 400 phasor~; #X obj 252 527 snapshot~; #X obj 251 426 loadbang; #X msg 252 449 1; #X obj 221 606 +; #X obj 32 574 tabread4~ \$0-tab; #X obj 250 598 f; #X obj 194 582 t f f; #X floatatom 305 623 8 0 0 0 - - -, f 8; #X obj 221 630 t f b; #X obj 254 659 f; #X obj 221 659 -; #X floatatom 300 575 8 0 0 0 - - -, f 8; #X obj 203 686 -; #X obj 252 478 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X obj 32 428 -~ 0.5; #X obj 123 725 + 0.5; #X floatatom 203 713 8 0 0 0 - - -, f 8; #X obj 383 490 samplerate~; #X obj 337 517 /; #X obj 337 490 t f b; #X obj 254 558 +; #X obj 123 703 / 10000; #X obj 32 453 *~ 10000; #X obj 337 541 * 10000; #X text 304 636 new onset is phase plus old onset; #X obj 194 328 * 1e+006; #X text 301 589 extrapolated phase of next sample; #X text 278 660 new onset minus old onset; #X text 266 686 back up phasor output by amount the onset advanced ; #X text 264 699 (approximately zero but not exactly because of; #X text 266 713 truncation error!); #X obj 194 354 t b f; #X text 253 328 convert to samples; #X text 236 354 set both last-onset and previous-onset; #X text 215 376 ... and also reset phasor.; #X text 119 741 convert phase back to range 0-1; #X text 92 440 convert phase to; #X text 92 454 range +/-5000; #X obj 31 374 / 10000; #X text 81 377 cycles/sec; #X text 81 367 convert to; #X text 309 440 in order to change onset to reflect it; #X text 309 424 Each 100 msec \, poll phase of phasor~; #X text 371 510 extrapolate snapshot of phase by one; #X text 370 523 sample to sync with next block; #X text 40 651 GOOD; #X msg 193 379 0; #X obj 31 349 r \$0-speed; #X obj 194 305 r \$0-playbackpos; #X obj 15 282 cnv 15 580 10 empty empty empty 20 12 0 14 -233017 -159808 0; #X obj 607 283 cnv 15 580 10 empty empty empty 20 12 0 14 -261682 -159808 0; #X obj 516 196 dac~; #X obj 526 169 *~; #X obj 558 174 hsl 50 15 0.01 1 1 0 empty empty volume 10 7 0 10 -257985 -1 -1 0 1; #X obj 555 195 - 0.01; #X obj 19 623 dac~; #X obj 32 599 *~; #X obj 61 601 hsl 50 15 0.01 1 1 0 empty empty volume 10 7 0 10 -257985 -1 -1 0 1; #X obj 58 622 - 0.01; #X obj 37 125 del 12000; #X obj 700 193 r \$0-pb-phase; #X obj 664 337 / 10000; #X text 750 338 cycles/sec; #X text 750 328 convert to; #X obj 664 312 r \$0-speed; #X obj 664 362 s \$0-pb-freq; #X floatatom 149 544 5 0 0 0 - - -, f 5; #X text 784 488 <--- try to cut and re-paste this section. crackling re-appears, f 42; #X obj 651 525 dac~; #X obj 664 501 *~; #X obj 693 503 hsl 50 15 0.01 1 1 0 empty empty volume 10 7 0 10 -257985 -1 -1 0 1; #X obj 690 524 - 0.01; #N canvas 180 204 204 137 receive~ 0; #X obj 25 103 outlet~; #X obj 25 79 tabread4~ \$0-tab; #X obj 25 28 receive~ \$0-phasor; #X obj 81 52 r \$0-onset; #X connect 1 0 0 0; #X connect 2 0 1 0; #X connect 3 0 1 1; #X restore 664 480 pd receive~; #X text 781 405 <--- this subpatch must be loaded last !; #N canvas 651 182 1016 625 send~ 0; #X obj 93 526 send~ \$0-phasor; #X obj 92 124 -~ 0.5; #X obj 92 149 *~ 10000; #X floatatom 168 98 5 0 0 0 - - -, f 5; #X floatatom 44 97 5 0 0 0 - - -, f 5; #X obj 63 63 r \$0-pb-freq; #X obj 155 70 r \$0-pb-phase; #X text 153 124 convert phase to; #X text 153 138 range +/-5000; #X obj 278 127 metro 100; #X obj 278 196 snapshot~; #X obj 278 68 loadbang; #X msg 278 88 1; #X obj 278 109 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1 1; #X text 336 82 in order to change onset to reflect it; #X text 336 66 Each 100 msec \, poll phase of phasor~; #X obj 278 218 s \$0-snap; #X obj 446 301 +; #X obj 475 293 f; #X obj 419 277 t f f; #X floatatom 530 318 8 0 0 0 - - -, f 8; #X obj 446 325 t f b; #X obj 479 354 f; #X obj 446 354 -; #X floatatom 525 270 8 0 0 0 - - -, f 8; #X obj 428 381 -; #X obj 383 442 + 0.5; #X floatatom 463 430 8 0 0 0 - - -, f 8; #X obj 782 168 samplerate~; #X obj 736 195 /; #X obj 736 168 t f b; #X obj 479 253 +; #X obj 383 420 / 10000; #X obj 736 219 * 10000; #X text 529 331 new onset is phase plus old onset; #X obj 420 168 * 1e+006; #X text 526 284 extrapolated phase of next sample; #X text 503 355 new onset minus old onset; #X text 491 381 back up phasor output by amount the onset advanced ; #X text 489 394 (approximately zero but not exactly because of; #X text 491 408 truncation error!); #X obj 420 194 t b f; #X text 479 168 convert to samples; #X text 462 194 set both last-onset and previous-onset; #X text 441 216 ... and also reset phasor.; #X text 492 444 convert phase back to range 0-1; #X text 770 188 extrapolate snapshot of phase by one; #X text 769 201 sample to sync with next block; #X msg 419 219 0; #X obj 420 145 r \$0-playbackpos; #X obj 383 465 s \$0-pb-phase; #X obj 736 144 r \$0-pb-freq; #X obj 206 527 s \$0-onset; #X obj 638 147 r \$0-snap; #X floatatom 653 179 5 0 0 0 - - -, f 5; #X text 96 550 "MASTER PHASER" \, sort of ...; #X obj 91 96 phasor~ 0.1; #X connect 1 0 2 0; #X connect 2 0 0 0; #X connect 2 0 10 0; #X connect 5 0 4 0; #X connect 5 0 56 0; #X connect 6 0 3 0; #X connect 6 0 56 1; #X connect 9 0 10 0; #X connect 10 0 16 0; #X connect 11 0 12 0; #X connect 12 0 13 0; #X connect 13 0 9 0; #X connect 17 0 18 0; #X connect 17 0 21 0; #X connect 17 0 20 0; #X connect 17 0 52 0; #X connect 18 0 17 1; #X connect 19 0 25 0; #X connect 19 1 17 0; #X connect 21 0 22 1; #X connect 21 0 23 0; #X connect 21 1 22 0; #X connect 22 0 23 1; #X connect 23 0 25 1; #X connect 25 0 27 0; #X connect 25 0 32 0; #X connect 26 0 50 0; #X connect 28 0 29 1; #X connect 29 0 33 0; #X connect 30 0 29 0; #X connect 30 1 28 0; #X connect 31 0 19 0; #X connect 31 0 24 0; #X connect 32 0 26 0; #X connect 33 0 31 1; #X connect 35 0 41 0; #X connect 41 0 48 0; #X connect 41 1 22 1; #X connect 41 1 17 1; #X connect 48 0 19 0; #X connect 49 0 35 0; #X connect 51 0 30 0; #X connect 53 0 31 0; #X connect 53 0 54 0; #X connect 56 0 1 0; #X restore 663 408 pd send~; #X connect 0 0 3 0; #X connect 1 0 25 0; #X connect 2 0 88 0; #X connect 3 0 2 0; #X connect 4 0 5 0; #X connect 5 0 8 0; #X connect 6 0 9 0; #X connect 6 0 10 0; #X connect 8 0 7 0; #X connect 9 0 4 0; #X connect 9 0 7 0; #X connect 14 0 0 0; #X connect 23 0 24 0; #X connect 23 0 95 0; #X connect 24 0 1 0; #X connect 26 0 14 0; #X connect 27 0 28 0; #X connect 29 0 27 0; #X connect 30 0 27 0; #X connect 31 0 0 1; #X connect 34 0 36 0; #X connect 35 0 50 0; #X connect 36 0 56 0; #X connect 36 0 102 0; #X connect 37 0 38 0; #X connect 38 0 49 0; #X connect 39 0 41 0; #X connect 39 0 44 0; #X connect 39 0 40 1; #X connect 39 0 43 0; #X connect 40 0 92 0; #X connect 41 0 39 1; #X connect 42 0 48 0; #X connect 42 1 39 0; #X connect 44 0 45 1; #X connect 44 0 46 0; #X connect 44 1 45 0; #X connect 45 0 46 1; #X connect 46 0 48 1; #X connect 48 0 52 0; #X connect 48 0 57 0; #X connect 49 0 34 0; #X connect 50 0 58 0; #X connect 51 0 35 1; #X connect 53 0 54 1; #X connect 54 0 59 0; #X connect 55 0 54 0; #X connect 55 1 53 0; #X connect 56 0 42 0; #X connect 56 0 47 0; #X connect 57 0 51 0; #X connect 58 0 36 0; #X connect 58 0 40 0; #X connect 59 0 56 1; #X connect 61 0 67 0; #X connect 67 0 82 0; #X connect 67 1 45 1; #X connect 67 1 39 1; #X connect 74 0 35 0; #X connect 74 0 55 0; #X connect 82 0 42 0; #X connect 83 0 74 0; #X connect 84 0 61 0; #X connect 88 0 87 0; #X connect 88 0 87 1; #X connect 89 0 90 0; #X connect 90 0 88 1; #X connect 92 0 91 0; #X connect 92 0 91 1; #X connect 93 0 94 0; #X connect 94 0 92 1; #X connect 95 0 29 0; #X connect 97 0 101 0; #X connect 100 0 97 0; #X connect 105 0 104 0; #X connect 105 0 104 1; #X connect 106 0 107 0; #X connect 107 0 105 1; #X connect 108 0 105 0;