#N canvas 469 38 688 638 12;
#X declare -stdpath ./;
#X floatatom 373 316 4 0 100 0 - - - 0;
#X obj 355 461 +~;
#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 writing to the delay.;
#X connect 0 0 1 0;
#X connect 0 0 2 0;
#X restore 161 450 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 79 247 The dummy 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 161 481 pd delay-reader;
#X obj 143 511 +~;
#X obj 143 545 output~;
#N canvas 521 164 217 214 pulse 0;
#X obj 51 148 outlet~;
#X obj 51 44 phasor~ 50;
#X obj 51 70 *~ 100;
#X obj 51 95 clip~ 0.75 1.25;
#X obj 51 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 161 320 pd pulse;
#X obj 175 405 delwrite~ G05-d1 1000, f 11;
#X obj 373 395 line~;
#X obj 480 331 declare -stdpath ./;
#X obj 373 432 delread4~ G05-d1;
#X text 59 252 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 80;
#X text 59 124 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 80;
#X obj 373 369 pack f 30;
#X obj 355 545 output~;
#X text 292 316 delay ----> in samples, f 11;
#X text 59 72 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 80;
#X text 59 193 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 80;
#X text 64 561 "Right flanger", f 8;
#X text 486 557 "Wrong flanger", f 8;
#X obj 28 25 cnv 5 5 25 empty empty Order\ of\ Execution\ of\ [delwrite~]\ and\ [delread~]/[delread4~] 15 13 0 16 #dfdfdf #202020 0;
#X obj 373 343 / 48;
#X connect 0 0 21 0;
#X connect 1 0 14 0;
#X connect 2 0 3 0;
#X connect 3 0 4 1;
#X connect 4 0 5 0;
#X connect 6 0 1 0;
#X connect 6 0 2 0;
#X connect 6 0 7 0;
#X connect 6 0 4 0;
#X connect 8 0 3 1;
#X connect 8 0 10 0;
#X connect 10 0 1 1;
#X connect 13 0 8 0;
#X connect 21 0 13 0;
