#N canvas 331 72 948 577 12;
#X declare -stdpath ./;
#X text 750 224 creation argument: name of delay line, f 18;
#X obj 44 65 delread4~;
#X obj 754 274 vd~;
#X obj 612 231 delread4~ \$0-delay;
#X obj 39 324 delwrite~ \$0-delay 1000;
#X obj 612 199 line~;
#X obj 39 243 osc~ 440;
#X obj 612 268 output~;
#X obj 612 171 pack f 1000;
#X obj 761 151 declare -stdpath ./;
#X msg 63 279 clear;
#X text 214 303 1st argument: name of delay line, f 42;
#X obj 43 15 delwrite~;
#X text 115 15 - writes a signal in a delay line;
#X obj 50 40 delread~;
#X text 115 40 - read a signal from a delay line;
#X text 258 411 1st argument: name of delay line, f 40;
#X obj 85 452 output~;
#X text 597 77 The delay time is always at least one sample and at most the length of the delay line (specified by a corresponding delwrite~)., f 46;
#X text 123 386 input (delay time in ms);
#X msg 49 386 500;
#X text 214 323 2nd argument: length of delay line in msec (the maximum delay time in read objects), f 47;
#X text 119 64 - read from a delay line with 4-point interpolation (for variable delay times), f 40;
#X text 656 198 signal input (variable delay time in ms);
#X obj 491 70 vd~;
#X obj 96 540 fexpr~;
#X text 22 540 see also:;
#X obj 9 526 cnv 1 935 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 7 102 cnv 1 570 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 488 21 <= click;
#N canvas 675 103 575 529 reference 0;
#X obj 8 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 8 133 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 8 167 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 253 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 173 142 NONE, f 45;
#X text 129 175 symbol -;
#X obj 43 22 delwrite~;
#X text 118 66 signal -;
#X text 185 66 signal input into the delay time., f 44;
#X text 125 84 clear -;
#X text 185 84 clear the delay time., f 44;
#X text 197 175 delay line name., f 47;
#X text 136 193 float -;
#X text 197 193 length of delay line in msec (the maximum delay time in read objects)., f 47;
#X obj 8 337 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 8 405 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 8 444 cnv 2 550 2 empty empty ARGUMENTS: 8 12 0 13 #202020 #000000 0;
#X obj 7 501 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 107 454 symbol -;
#X text 175 454 delay line name., f 29;
#X text 114 473 float -;
#X obj 43 305 delread~;
#X text 113 352 float -;
#X obj 113 305 delread4~;
#X text 117 22 - write in a delay line.;
#X text 192 305 - read from a delay line.;
#X text 107 414 signal -;
#X text 173 352 delay time in ms (for [delread~])., f 44;
#X text 106 372 signal -;
#X text 173 372 delay time in ms (for [delread4~])., f 44;
#X text 173 414 delayed signal., f 44;
#X text 175 473 initial delay time in ms for [delread~] (default 0).;
#X text 136 227 float -;
#X text 197 227 set number of channels., f 47;
#X text 48 102 channels <float> -;
#X text 185 102 set number of input channels., f 44;
#X restore 394 21 pd reference;
#X floatatom 39 209 5 0 0 0 - - - 0;
#X msg 85 386 1000;
#X msg 612 144 500;
#X msg 648 144 1000;
#X obj 576 3 cnv 1 1 100 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 406 70 --> a.k.a.:;
#X text 597 12 [delread4~] implements a 4-point interpolating delay tap. The delay in milliseconds of the tap is specified by an incoming signal for variable delay times., f 46;
#X text 784 275 -- old name of;
#X obj 155 541 send~;
#X text 30 112 The [delread~] and [delread4~] objects read from a delay line allocated in a [delwrite~] object with the same name. You can use more than one [delread~] and/or [delread4~] objects for the same [delwrite~] object. If the specified delay time in [delread~]/[delread4~] is longer than the size of the delay line or less than zero it is clipped to the length of the delay line., f 76;
#X text 246 458 Note that in this help file we're using delay names with "\$0" (the patch ID number used to force locality in Pd)., f 40;
#X text 121 188 Usually \, [delread~]/[delread4~] must have the same block size \, overlap and upsampling factors as the corresponding [delwrite~] object \, otherwise you might get unexpected results \, unless you really know what you're doing. This example patch uses the default block size of 64 samples but you can change it with:, f 63;
#X obj 518 269 block~;
#X text 113 280 <-- set all samples of delay line to zero.;
#X text 750 295 [delread4~] ('vd' for 'variable delay'), f 21;
#N canvas 927 170 450 300 Execution-order 0;
#X obj 98 132 ../3.audio.examples/G05.execution.order;
#X text 39 46 In case [delwrite~] runs later in the DSP loop than the [delread~] or [delread4~] objects \, the delay is constrained below by one vector length (usually 64 samples.) Open the file below as an example on how to control this to obtain very short delays., f 51;
#X text 59 165 See also other examples in the "G" section for more fun with delays \, such as feedback delays., f 46;
#X restore 777 420 pd Execution-order;
#X text 604 346 Above we have the delay time ramping from one value to another during 1 second \, which alters the pitch for this period., f 41;
#X text 674 419 Important -->;
#N canvas 500 250 759 503 multichannel 0;
#X obj 68 440 snapshot~;
#X obj 91 402 metro 250;
#X obj 91 373 loadbang;
#X text 237 131 see also:;
#X obj 284 159 clone;
#X obj 227 159 snake~;
#X msg 78 202 channels 1;
#X msg 93 227 channels 2;
#X text 192 209 set number of channels., f 12;
#X text 167 208 <--;
#X msg 252 392 \; pd dsp \$1;
#X obj 252 357 set-dsp-tgl;
#X text 283 361 DSP on/off;
#X listbox 68 474 21 0 0 0 - - - 0;
#X obj 55 171 snake~ in 2;
#X obj 55 140 osc~ 440;
#X obj 129 140 noise~;
#X text 195 279 <-- 3rd argument sets number of channels, f 21;
#X obj 55 279 delwrite~ cat 500 2;
#X text 25 11 This example shows how to set number of channels as the 3rd argument to [delwrite~] \, so it can take a multichannel signal. You can also change the number of channels with the 'channels' message. A matching [delread~] or [delread4~] will simply take the existing number of channels., f 45;
#X obj 427 392 snapshot~;
#X obj 450 354 metro 250;
#X obj 450 325 loadbang;
#X listbox 427 426 40 0 0 0 - - - 0;
#X obj 427 286 delread4~ cat;
#X obj 427 240 sig~ 100 200 300 400;
#X obj 68 334 delread~ cat 100;
#X text 378 165 Using more signal inputs than the available number of channels is useful for implementing a multitap delay., f 46;
#X text 378 15 The number of output channels in [delread4~] is the maximum of the number of input signals and the number of channels in [delwrite~]. If both are of the same size \, each input signal sets the delay time of a correspondent delay channel. In case the numbers mismatch \, the smaller wraps around until reaching the number of the bigger one (like [*~] and other math objects). So a single input value simply sets the delay time of all channels., f 46;
#X connect 0 0 13 0;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 6 0 18 0;
#X connect 7 0 18 0;
#X connect 11 0 10 0;
#X connect 14 0 18 0;
#X connect 15 0 14 0;
#X connect 16 0 14 1;
#X connect 20 0 23 0;
#X connect 21 0 20 0;
#X connect 22 0 21 0;
#X connect 24 0 20 0;
#X connect 25 0 24 0;
#X connect 26 0 0 0;
#X restore 789 476 pd multichannel;
#X text 638 461 mutichannel signal support ----------->, f 20;
#X text 258 428 2nd argument: (initial) delay time in ms (default 0);
#X text 214 355 3rd argument: number of channels (default 1), f 47;
#X text 722 539 updated for Pd version 0.56;
#X obj 85 422 delread~ \$0-delay 500;
#X connect 3 0 7 0;
#X connect 5 0 3 0;
#X connect 6 0 4 0;
#X connect 8 0 5 0;
#X connect 10 0 4 0;
#X connect 20 0 54 0;
#X connect 31 0 6 0;
#X connect 32 0 54 0;
#X connect 33 0 8 0;
#X connect 34 0 8 0;
#X connect 54 0 17 0;
