#N canvas 365 41 665 523 12;
#X obj 25 17 tabwrite~;
#X text 147 396 creation argument initializes array name, f 22;
#X obj 169 458 tabread;
#X obj 229 458 tabwrite;
#X obj 297 458 tabsend~;
#X obj 95 485 tabreceive~;
#X obj 95 458 tabread4~;
#X msg 51 301 stop;
#X text 89 302 stop recording;
#X msg 42 269 start 500;
#X text 56 232 start recording;
#X text 139 330 set destination array;
#X obj 23 403 tabwrite~ buffer;
#X msg 60 330 set buffer;
#X obj 23 202 osc~ 200;
#X obj 182 485 soundfiler;
#X text 116 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 489 396 pd Dealing_with_"\$0";
#X text 374 370 open subpatch to see how to deal with '\$0', f 27;
#N canvas 651 119 599 323 reference 0;
#X obj 18 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 18 211 cnv 2 550 2 empty empty OUTLETS: 8 12 0 13 #202020 #000000 0;
#X obj 18 253 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X obj 17 290 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 187 222 NONE;
#X obj 55 17 tabwrite~;
#X text 111 124 bang -;
#X text 111 144 stop -;
#X text 162 144 stops recording into the array.;
#X text 48 104 start <float> -;
#X text 162 104 starts recording at given sample (default 0)., f 53;
#X text 162 124 starts recording into the array (same as 'start 0')., f 53;
#X text 69 163 set <list> -;
#X text 126 262 1) list - sets table names to write to.;
#X text 76 84 signal(s) -;
#X text 162 84 signals with one or mode channels to write to arrays.;
#X text 135 17 - write signals to arrays.;
#X text 162 163 set the table names to write to. No argument unsets the object., f 34;
#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 444 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 485 pd array-examples;
#X text 18 472 see also:;
#X obj 33 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 209 198 set array11 array22;
#X msg 221 228 set array22 array11;
#X obj 190 289 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 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;
#A color 0;
#A width 1;
#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;
#A color 0;
#A width 1;
#X coords 0 1 99 -1 200 140 1 0 0;
#X restore 294 346 graph;
#X msg 236 255 set array11;
#X obj 190 163 snake~ in;
#X text 46 13 [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 change the number of channels. Note that the arrays do not need to be of the same length., f 66;
#X connect 2 0 0 0;
#X connect 3 0 16 0;
#X connect 4 0 16 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 15 0 8 0;
#X connect 16 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 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;
#A color 0;
#A width 1;
#X coords 0 1 999 -1 200 100 1 0 0;
#X restore 431 177 graph;
#X msg 69 362 set;
#X text 102 361 no argument unsets the object, f 30;
#X text 446 472 updated for Pd version 0.56;
#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;
#X connect 35 0 12 0;
