#N canvas 366 43 665 518 12;
#X obj 25 17 tabwrite~;
#X text 167 363 creation argument initializes array name;
#X obj 169 455 tabread;
#X obj 229 455 tabwrite;
#X obj 297 455 tabsend~;
#X obj 95 482 tabreceive~;
#X obj 95 455 tabread4~;
#X msg 71 301 stop;
#X text 109 302 stop recording;
#X msg 62 269 start 500;
#X text 76 232 start recording;
#X text 159 330 set destination array;
#X obj 43 363 tabwrite~ buffer;
#X msg 80 330 set buffer;
#X obj 43 202 osc~ 200;
#X obj 182 482 soundfiler;
#X text 136 262 start at index 500 (middle of this table), f 22;
#N canvas 703 134 593 356 Dealing_with_"\$0" 0;
#X text 431 244 <= array with local name, f 13;
#X msg 153 216 set \$1;
#X obj 153 190 symbol \$0-x;
#X text 175 164 click to set name;
#X obj 280 245 array define \$0-x 10;
#X obj 92 284 tabwrite~;
#X obj 91 197 noise~;
#X text 36 86 You can use "\$0" in an array name and if you need to set the array name you can load it in a symbol object \, since "\$0" doesn't work in messages., f 70;
#X obj 153 165 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X obj 160 251 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 36 33 '\$0' - the patch ID number used to force locality in Pd - is widely used in send/receive names as well as array names. This is especially useful in abstractions so each copy has local names instead of global., f 70;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 6 0 5 0;
#X connect 8 0 2 0;
#X connect 9 0 5 0;
#X restore 323 409 pd Dealing_with_"\$0";
#X text 161 400 open subpatch to see how to deal with '\$0', f 21;
#N canvas 651 119 583 293 reference 0;
#X obj 18 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 18 178 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 18 220 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X obj 17 257 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 187 189 NONE;
#X obj 55 17 tabwrite~;
#X text 126 111 bang -;
#X text 126 131 stop -;
#X text 177 131 stops recording into the array., f 53;
#X text 63 91 start <float> -;
#X text 177 91 starts recording at given sample (default 0)., f 53;
#X text 177 111 starts recording into the array (same as 'start 0')., f 53;
#X text 84 150 set <list> -;
#X text 126 229 1) list - sets table names to write to.;
#X text 177 150 set the table names to write to., f 53;
#X text 91 71 signal(s) -;
#X text 177 71 signals with one or mode channels to write to arrays.;
#X text 135 17 - write signals to arrays.;
#X restore 469 16 pd reference;
#X text 567 15 <= click;
#X obj 8 52 cnv 1 650 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X obj 8 443 cnv 1 650 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#N canvas 643 412 384 186 array-examples 0;
#N canvas 491 316 457 285 open 0;
#X obj 120 23 inlet;
#X obj 173 121 pdcontrol;
#X msg 173 94 dir;
#X obj 120 181 pack s s;
#X obj 173 64 loadbang;
#X msg 120 212 \; pd open \$1 \$2;
#X obj 173 151 makefilename %s/../2.control.examples;
#X connect 0 0 3 0;
#X connect 1 0 6 0;
#X connect 2 0 1 0;
#X connect 3 0 5 0;
#X connect 4 0 2 0;
#X connect 6 0 3 1;
#X restore 52 131 pd open;
#X msg 52 76 15.array.pd;
#X msg 62 102 16.more.arrays.pd;
#X text 144 77 <-- click to open examples.;
#X text 47 22 See also and the "array" examples from the section 2 of Pd's tutorial:, f 39;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X restore 263 482 pd array-examples;
#X text 18 469 see also:;
#X obj 53 232 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X msg 299 215 \; pd dsp \$1;
#X obj 299 180 set-dsp-tgl;
#X text 330 184 DSP on/off;
#N canvas 558 168 559 518 multichannel 0;
#X msg 414 230 \; pd dsp \$1;
#X text 446 193 DSP on/off;
#X obj 414 189 set-dsp-tgl;
#X obj 190 99 osc~ 1000;
#X obj 250 129 osc~ 2000;
#X obj 95 212 bng 20 250 50 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000;
#X msg 208 201 set array11 array22;
#X msg 220 231 set array22 array11;
#X obj 190 279 tabwrite~ array11 array22;
#X obj 95 174 metro 1000;
#X obj 95 138 tgl 19 0 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0 1;
#X text 46 21 [tabwrite~] works with multichannel signals if you give it more than one argument. Each channel is then written to a corresponding argument/table. The "set" message can also replace more than one table name. Note that the arrays do not need to be of the same length., f 66;
#X obj 190 163 snake~ in;
#X obj 68 347 cnv 19 198 138 empty empty empty 20 12 0 12 #e0e0e0 #404040 0;
#X obj 295 347 cnv 19 198 138 empty empty empty 20 12 0 12 #e0e0e0 #404040 0;
#N canvas 0 50 450 250 (subpatch) 0;
#X array array11 150 float 0;
#X coords 0 1 149 -1 200 140 1 0 0;
#X restore 67 346 graph;
#N canvas 0 50 450 250 (subpatch) 0;
#X array array22 100 float 0;
#X coords 0 1 99 -1 200 140 1 0 0;
#X restore 294 346 graph;
#X connect 2 0 0 0;
#X connect 3 0 12 0;
#X connect 4 0 12 1;
#X connect 5 0 8 0;
#X connect 6 0 8 0;
#X connect 7 0 8 0;
#X connect 9 0 5 0;
#X connect 10 0 9 0;
#X connect 12 0 8 0;
#X restore 511 320 pd multichannel;
#X text 360 305 mutichannel signal support ----------->, f 20;
#X text 44 69 [tabwrite~] records audio signals sequentially into one or more arrays. Sending it "bang" writes from beginning to end of the array. To avoid writing all the way to the end \, you can send a "stop" message at an appropriate later time. The "start" message allows setting the array location at which the first sample is written. (Starting and stopping occur on block boundaries \, typically multiples of 64 samples \, in the input signal.), f 80;
#X text 105 17 - write signals to arrays;
#X text 446 469 updated for Pd version 0.54;
#X obj 432 178 cnv 19 198 98 empty empty empty 20 12 0 12 #e0e0e0 #404040 0;
#N canvas 0 50 450 300 (subpatch) 0;
#X array buffer 1000 float 0;
#X coords 0 1 999 -1 200 100 1 0 0;
#X restore 431 177 graph;
#X connect 7 0 12 0;
#X connect 9 0 12 0;
#X connect 13 0 12 0;
#X connect 14 0 12 0;
#X connect 25 0 12 0;
#X connect 27 0 26 0;
