#N canvas 355 33 843 551 12;
#N canvas 0 22 450 300 (subpatch) 0;
#X array table2-ex 10 float 3;
#A 0 1 4 2 8 5 6 1 1 4 2;
#X coords 0 10 10 0 250 150 1 0 0;
#X restore 530 165 graph;
#X obj 36 414 snapshot~;
#X obj 55 382 metro 200;
#X obj 36 168 sig~;
#X floatatom 36 142 6 1 8 0 - - - 0;
#X floatatom 36 440 6 0 0 0 - - - 0;
#X text 89 140 incoming signal is index. Indices should range from 1 to (size-2) so that the 4-point interpolation is meaningful. You can shift-drag the number box to see the effect of interpolation., f 52;
#X text 192 212 "set" message permits you to switch between arrays, f 25;
#X text 192 316 creation argument initializes array name;
#X obj 44 20 tabread4~;
#X obj 94 490 tabwrite~;
#X obj 229 490 tabread;
#X obj 288 490 tabwrite;
#X obj 353 490 tabsend~;
#X obj 94 516 tabreceive~;
#X obj 165 490 tabplay~;
#X text 613 511 updated for Pd version 0.42;
#X floatatom 166 266 5 0 10 0 - - - 0;
#X obj 509 423 ../3.audio.examples/B15.tabread4~-onset;
#X obj 181 516 tabosc4~;
#X obj 249 516 soundfiler;
#N canvas 515 381 401 220 init-table 0;
#X obj 35 42 loadbang;
#X msg 35 74 \; table2-ex resize 10 \; table2-ex bounds 0 10 10 0 \; table2-ex xlabel -0.2 0 1 2 3 4 5 6 7 8 9 \; table2-ex ylabel -0.3 0 1 2 3 4 5 6 7 8 9 10 \; table2-ex 0 1 4 2 8 5 6 1 1 4 2;
#X connect 0 0 1 0;
#X restore 685 141 pd init-table;
#X obj 36 316 tabread4~ table2-ex;
#X msg 87 219 set table2-ex;
#X obj 55 355 loadbang;
#X text 197 366 DSP on/off;
#X msg 174 391 \; pd dsp \$1;
#X obj 174 366 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X text 124 20 - 4-point-interpolating table lookup for signals;
#N canvas 773 305 593 441 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 121 210 set \$1;
#X obj 121 184 symbol \$0-x;
#X obj 121 159 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #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 146 158 click to set name;
#X floatatom 67 188 6 1 8 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 1 0 -1;
#X obj 221 264 loadbang;
#X obj 67 251 tabread4~;
#X obj 67 345 snapshot~;
#X obj 86 313 metro 200;
#X floatatom 67 371 6 0 0 0 - - - 0;
#X obj 86 289 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 315 423 pd Dealing_with_"\$0";
#X obj 39 114 hsl 162 19 1 8 0 0 empty empty empty -2 -8 0 10 #dfdfdf #000000 #000000 0 1;
#N canvas 750 87 575 303 reference 0;
#X obj 11 52 cnv 5 550 5 empty empty INLET: 8 18 0 13 #202020 #000000 0;
#X obj 11 196 cnv 2 550 2 empty empty OUTLET: 8 12 0 13 #202020 #000000 0;
#X obj 11 241 cnv 2 550 2 empty empty ARGUMENT: 8 12 0 13 #202020 #000000 0;
#X obj 10 278 cnv 5 550 5 empty empty empty 8 18 0 13 #202020 #000000 0;
#X text 106 131 set <symbol> -;
#X text 211 131 set the table name., f 42;
#X text 211 209 value of index input.;
#X text 211 96 sets table index and output its value with interpoation., f 42;
#X obj 37 20 tabread4~;
#X text 117 20 - 4-point-interpolating table lookup for signals.;
#X text 149 209 signal -;
#X text 148 96 signal -;
#X obj 11 158 cnv 1 550 1 empty empty 2nd: 8 12 0 13 #7c7c7c #000000 0;
#X obj 11 85 cnv 1 550 1 empty empty 1st: 8 12 0 13 #7c7c7c #000000 0;
#X text 155 167 float -;
#X text 211 167 sets table onset., f 42;
#X text 129 250 1) symbol - sets table name with the sample.;
#X restore 611 16 pd reference;
#X text 709 15 <= click;
#X obj 8 53 cnv 1 830 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 212 254 right sets table onset to improve the accuracy of indexing into the array., f 25;
#X text 514 384 Open this example for more details on setting onset:, f 35;
#X text 310 386 open subpatch to see how to deal with '\$0':, f 22;
#X obj 8 478 cnv 1 830 1 empty empty empty 8 12 0 13 #000000 #000000 0;
#X text 18 503 see also:;
#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 331 516 pd array-examples;
#X text 58 70 [tabread4~] is used to build samplers and other table lookup algorithms. The interpolation scheme is 4-point polynomial as used in [delread4~] and [tabosc4~]., f 90;
#X connect 1 0 5 0;
#X connect 2 0 1 0;
#X connect 3 0 22 0;
#X connect 4 0 3 0;
#X connect 17 0 22 1;
#X connect 22 0 1 0;
#X connect 23 0 22 0;
#X connect 24 0 2 0;
#X connect 27 0 26 0;
#X connect 30 0 4 0;
