#N canvas 469 23 503 684 12;
#X declare -stdpath ./;
#X floatatom 325 330 4 0 100 0 - - - 0;
#X obj 307 475 +~;
#N canvas 402 205 350 365 delay-writer 0;
#X obj 71 108 inlet~;
#X obj 71 231 outlet~;
#X obj 102 173 delwrite~ G05-d2 1000;
#X text 136 231 dummy outlet;
#X text 67 33 This subpatch sorts the delay writing before the reading., f 29;
#X text 82 271 The outlet is just needed to connect to the next subpatch to force the correct order., f 28;
#X text 126 146 writting to the delay.;
#X connect 0 0 1 0;
#X connect 0 0 2 0;
#X restore 113 464 pd delay-writer;
#N canvas 319 197 561 348 delay-reader 0;
#X obj 97 77 inlet~;
#X obj 163 195 outlet~;
#X obj 163 78 inlet~;
#X obj 163 123 delread4~ G05-d2;
#X text 53 49 dummy inlet;
#X text 165 49 delay time;
#X text 307 119 This subpatch reads the delay writing before the reading., f 29;
#X text 60 248 The summy inlet is just needed to connect to the previous subpatch to force the correct order., f 33;
#X connect 2 0 3 0;
#X connect 3 0 1 0;
#X restore 113 495 pd delay-reader;
#X obj 95 525 +~;
#X obj 325 357 / 44.1;
#X obj 95 559 output~;
#N canvas 521 164 217 214 pulse 0;
#X obj 52 148 outlet~;
#X obj 51 44 phasor~ 50;
#X obj 51 70 *~ 100;
#X obj 51 95 clip~ 0.75 1.25;
#X obj 52 121 cos~;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 3 0 4 0;
#X connect 4 0 0 0;
#X restore 113 334 pd pulse;
#X obj 127 419 delwrite~ G05-d1 1000, f 11;
#X obj 325 409 line~;
#X obj 328 280 declare -stdpath ./;
#X text 52 7 ORDER OF EXECUTION OF DELWRITE~ AND DELREAD~/DELREAD4~;
#X obj 325 446 delread4~ G05-d1;
#X text 284 645 updated for Pd version 0.52;
#X text 18 229 You can use the same strategy to avoid an unwanted delay of one block in pairs of [send~]/[receive~] \, [tabsend~]/[tabreceive~] or [throw~]/[catch~] objects., f 65;
#X text 18 99 To get them to go off in the correct order \, put the [delwrite~] into a subpatch \, then the [delread4~] and/or [delread4~] objects into another subpatch. The audio connections between these subpatches force the "reader" to be sorted after the "writer". DSP sorting in Pd follows the hierarchy of subpatches., f 65;
#X obj 325 383 pack f 30;
#X obj 307 559 output~;
#X text 244 330 delay ----> in samples, f 11;
#X text 18 37 If you're writing to and reading from a delay line \, you have to get the write sorted before the read or else you may not get less than a block's delay. This patch compares a "wrong" flanger with a "right" one:, f 65;
#X text 18 178 To hear the difference scroll the delay time between 0 and 100 samples. The patch at right doesn't let you get below 64 samples \, but the patch at left can go all the way down to one sample., f 65;
#X text 25 567 "Right flanger", f 8;
#X text 247 569 "Wrong flanger", f 8;
#X connect 0 0 5 0;
#X connect 1 0 17 0;
#X connect 2 0 3 0;
#X connect 3 0 4 1;
#X connect 4 0 6 0;
#X connect 5 0 16 0;
#X connect 7 0 1 0;
#X connect 7 0 2 0;
#X connect 7 0 8 0;
#X connect 7 0 4 0;
#X connect 9 0 3 1;
#X connect 9 0 12 0;
#X connect 12 0 1 1;
#X connect 16 0 9 0;
