#N canvas 717 183 819 562 12;
#X obj 61 367 snapshot~;
#X obj 80 339 metro 200;
#X obj 61 149 sig~;
#X floatatom 61 123 6 0 10 0 - - - 0;
#X floatatom 60 392 6 0 0 0 - - - 0;
#X text 194 188 "set" message permits you to switch between arrays
, f 25;
#X text 202 244 creation argument initializes array name, f 24;
#X obj 99 512 tabwrite~;
#X obj 234 512 tabread;
#X obj 357 512 tabwrite;
#X obj 422 512 tabsend~;
#X obj 487 512 tabreceive~;
#X obj 170 512 tabplay~;
#X obj 97 24 tabread~;
#X text 80 59 Tabread~ looks up values out of the named array. Incoming
values are truncated to the next lower integer \, and values out of
bounds get the nearest (first or last) point., f 85;
#X text 118 123 incoming signal is index. Indices should range from
0 to (size-1)., f 34;
#X obj 27 512 tabread4~;
#X obj 292 512 tabread4;
#X text 602 511 updated for Pd version 0.43;
#X obj 509 451 ../2.control.examples/15.array;
#X obj 509 474 ../2.control.examples/16.more.arrays;
#X text 130 455 Check also the "array" examples from the Pd tutorial
by clicking and opening the files to the right ====>, f 52;
#X text 29 483 see also:;
#N canvas 0 22 450 300 (subpatch) 0;
#X array tabread-ex 10 float 3;
#A 0 1 4 2 8 5 6 1 4 2 8;
#X coords 0 10 10 0 300 200 1 0 0;
#X restore 465 147 graph;
#X msg 82 193 set tabread-ex;
#X obj 61 244 tabread~ tabread-ex;
#X obj 200 302 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000
#000000 0 1;
#N canvas 515 381 401 220 init-table 0;
#X obj 35 42 loadbang;
#X msg 35 74 \; tabread-ex resize 10 \; tabread-ex bounds 0 10 10 0
\; tabread-ex xlabel -0.2 0 1 2 3 4 5 6 7 8 9 \; tabread-ex ylabel
-0.3 0 1 2 3 4 5 6 7 8 9 10 \; tabread-ex 0 1 4 2 8 5 6 1 4 2 8;
#X connect 0 0 1 0;
#X restore 668 120 pd init-table;
#X msg 200 328 \; pd dsp \$1;
#X obj 80 311 loadbang;
#X text 219 301 DSP on/off;
#X text 176 24 - non-interpolating table lookup for signals;
#N canvas 978 194 593 412 Dealing_with_"\$0" 0;
#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 specially useful in abstractions so each copy has local names instead
of global., f 70;
#X text 462 275 <= array with local name, f 13;
#X obj 221 291 f \$0;
#X msg 118 210 set \$1;
#X obj 118 184 symbol \$0-x;
#X obj 118 161 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc
#000000 #000000;
#X text 227 197 You can also load '\$0' in a float object and send
it to a message that works like a send to send messages to an array.
, f 40;
#X text 137 158 click to set name;
#X floatatom 67 179 4 0 9 0 - - - 0;
#X obj 311 276 array define \$0-x 10;
#X msg 221 320 \; \$1-x 0 1 0 -1 0 1 0 -1 0 1 0;
#X obj 221 265 loadbang;
#X obj 67 251 tabread~;
#X obj 68 344 snapshot~;
#X obj 87 316 metro 200;
#X floatatom 67 369 6 0 0 0 - - - 0;
#X obj 87 288 loadbang;
#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 connect 2 0 10 0;
#X connect 3 0 12 0;
#X connect 4 0 3 0;
#X connect 5 0 4 0;
#X connect 8 0 12 0;
#X connect 11 0 2 0;
#X connect 12 0 13 0;
#X connect 13 0 15 0;
#X connect 14 0 13 0;
#X connect 16 0 14 0;
#X restore 339 398 pd Dealing_with_"\$0";
#X text 177 389 open subpatch to see how to deal with '\$0', f 21
;
#X connect 0 0 4 0;
#X connect 1 0 0 0;
#X connect 2 0 25 0;
#X connect 3 0 2 0;
#X connect 24 0 25 0;
#X connect 25 0 0 0;
#X connect 26 0 28 0;
#X connect 29 0 1 0;
