[PD] problem with send~ instead of patchcord

oliver oliver at klingt.org
Mon Sep 12 23:36:47 CEST 2016


hi,

i recently ran into a problem that makes me feel i don't quite 
understand PD's dataflow yet.

i refer to PD's example patch

"B16.long-varispeed.pd"

that deals with the problem of long tables and proper playback in 
arbitrary speeds. i admit that i don't fully understand what's going on 
there, but i got it to work with no problem on even very long files by 
just copy/pasting miller's solution ;-)

now here's my problem:

in the example patch, all audio-signal cords are connected directly (to 
snapshot~ and tabread4~). i wanted to do the same thing with 
send~/receive~ pairs in order have a "master phasor" to drive several 
tabread4~ objects in abstractions.

but when i do this i'm getting bad clicks.

i'm pretty sure this has something to do with PD's block size and a 
send~ object obviously being one block behind. am i wrong ?

i'm really trying to get my head around this and understand the nature 
of this problem.
could someone explain what is really going on here technically ?
or probably suggest a solution ?

example patch is attached

best

oliver


-- 
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
/////////////// http://pendler.klingt.org //////////////
\\\\\\\\\\\\\\\ http://oliver.klingt.org  \\\\\\\\\\\\\\
////////////////////////////////////////////////////////
\\\\\\\\ LIVE-BUILDER (music improvisation tool): \\\\\\
////////////// http://tinyurl.com/qaohv35 //////////////
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
-------------- next part --------------
#N canvas 74 113 1203 820 10;
#X obj 527 97 phasor~, f 11;
#X floatatom 23 77 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 74 74 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 514 216 BAD;
#X text 109 156 <- reset phase. 0.5 causes trouble for the "bad" way.
;
#X obj 23 26 loadbang;
#X msg 23 50 1000;
#X obj 23 100 s \$0-speed;
#X obj 527 13 r \$0-speed;
#X obj 26 182 hsl 128 15 0 1 0 0 empty empty empty -2 -8 0 10 -262144
-1 -1 6350 1;
#X obj 23 204 s \$0-playbackpos;
#X msg 23 156 0.5;
#X msg 59 156 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_doesn't_____(same_stuff_but_uses_send~_instead_of_patch_cords)
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 838 493 metro 100;
#X obj 615 356 phasor~;
#X obj 838 523 snapshot~;
#X obj 837 422 loadbang;
#X msg 838 445 1;
#X obj 807 602 +;
#X obj 616 570 tabread4~ \$0-tab;
#X obj 836 594 f;
#X obj 780 578 t f f;
#X floatatom 891 619 8 0 0 0 - - -, f 8;
#X obj 807 626 t f b;
#X obj 840 655 f;
#X obj 807 655 -;
#X floatatom 886 571 8 0 0 0 - - -, f 8;
#X obj 789 682 -;
#X obj 838 474 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 1
1;
#X obj 616 384 -~ 0.5;
#X obj 709 721 + 0.5;
#X floatatom 789 709 8 0 0 0 - - -, f 8;
#X obj 969 486 samplerate~;
#X obj 923 513 /;
#X obj 923 486 t f b;
#X obj 840 554 +;
#X obj 709 699 / 10000;
#X obj 616 409 *~ 10000;
#X obj 923 537 * 10000;
#X text 890 632 new onset is phase plus old onset;
#X obj 780 324 * 1e+006;
#X text 887 585 extrapolated phase of next sample;
#X text 864 656 new onset minus old onset;
#X text 852 682 back up phasor output by amount the onset advanced
;
#X text 850 695 (approximately zero but not exactly because of;
#X text 852 709 truncation error!);
#X obj 780 350 t b f;
#X text 839 324 convert to samples;
#X text 822 350 set both last-onset and previous-onset;
#X text 801 372 ... and also reset phasor.;
#X text 705 737 convert phase back to range 0-1;
#X text 670 397 convert phase to;
#X text 670 411 range +/-5000;
#X obj 615 330 / 10000;
#X text 665 333 cycles/sec;
#X text 665 323 convert to;
#X text 895 436 in order to change onset to reflect it;
#X text 895 420 Each 100 msec \, poll phase of phasor~;
#X text 957 506 extrapolate snapshot of phase by one;
#X text 956 519 sample to sync with next block;
#X msg 779 375 0;
#X obj 615 305 r \$0-speed;
#X obj 780 301 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 615 431 send~ \$0-phasor;
#X obj 616 544 receive~ \$0-phasor;
#X obj 718 493 receive~ \$0-phasor;
#X text 610 645 SHOULD BE GOOD \, BUT CRACKLES;
#X obj 513 193 dac~;
#X obj 526 169 *~;
#X obj 555 171 hsl 50 15 0.01 1 1 0 empty empty volume 10 7 0 10 -257985
-1 -1 0 1;
#X obj 552 192 - 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 611 619 dac~;
#X obj 624 595 *~;
#X obj 653 597 hsl 50 15 0.01 1 1 0 empty empty volume 10 7 0 10 -257985
-1 -1 0 1;
#X obj 650 618 - 0.01;
#X obj 7 132 del 12000;
#X connect 0 0 3 0;
#X connect 1 0 25 0;
#X connect 2 0 142 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 153 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 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 146 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 85 0 87 0;
#X connect 86 0 101 0;
#X connect 87 0 107 0;
#X connect 88 0 89 0;
#X connect 89 0 100 0;
#X connect 90 0 92 0;
#X connect 90 0 95 0;
#X connect 90 0 91 1;
#X connect 90 0 94 0;
#X connect 91 0 150 0;
#X connect 92 0 90 1;
#X connect 93 0 99 0;
#X connect 93 1 90 0;
#X connect 95 0 96 1;
#X connect 95 0 97 0;
#X connect 95 1 96 0;
#X connect 96 0 97 1;
#X connect 97 0 99 1;
#X connect 99 0 103 0;
#X connect 99 0 108 0;
#X connect 100 0 85 0;
#X connect 101 0 109 0;
#X connect 102 0 86 1;
#X connect 104 0 105 1;
#X connect 105 0 110 0;
#X connect 106 0 105 0;
#X connect 106 1 104 0;
#X connect 107 0 93 0;
#X connect 107 0 98 0;
#X connect 108 0 102 0;
#X connect 109 0 137 0;
#X connect 110 0 107 1;
#X connect 112 0 118 0;
#X connect 118 0 132 0;
#X connect 118 1 96 1;
#X connect 118 1 90 1;
#X connect 125 0 86 0;
#X connect 125 0 106 0;
#X connect 132 0 93 0;
#X connect 133 0 125 0;
#X connect 134 0 112 0;
#X connect 138 0 91 0;
#X connect 139 0 87 0;
#X connect 142 0 141 0;
#X connect 142 0 141 1;
#X connect 143 0 144 0;
#X connect 144 0 142 1;
#X connect 146 0 145 0;
#X connect 146 0 145 1;
#X connect 147 0 148 0;
#X connect 148 0 146 1;
#X connect 150 0 149 0;
#X connect 150 0 149 1;
#X connect 151 0 152 0;
#X connect 152 0 150 1;
#X connect 153 0 29 0;


More information about the Pd-list mailing list