#N canvas 182 23 1035 695 12;
#X text 69 15 ARRAYS;
#N canvas 0 0 450 300 (subpatch) 0;
#X array array99 67 float 0;
#X coords 0 1 66 -1 403 199 1 0 0;
#X restore 31 340 graph;
#X msg 630 130 \; array99 resize \$1;
#X floatatom 492 65 4 0 0 0 - - - 0;
#X obj 492 99 / 100;
#X msg 492 129 \; array99 const \$1;
#X msg 804 33 \; array99 print;
#X text 663 96 resize;
#X obj 132 619 tabread;
#X obj 131 593 tabwrite;
#X obj 293 593 tabread4~;
#X obj 366 593 tabwrite~;
#X obj 324 645 tabreceive~;
#X text 243 565 ...and audio signals:;
#X obj 258 645 tabsend~;
#X msg 797 113 \; array99 normalize;
#X msg 798 155 \; array99 normalize 0.5;
#X text 791 91 normalize to 1 or otherwise;
#X obj 263 618 tabosc4~;
#X msg 490 208 \; array99 sinesum 64 0.2 0.2 0.2 0.2;
#X msg 749 208 \; array99 cosinesum 64 0.2 0.2 0.2 0.2;
#X text 494 184 Fourier synthesis (resizes table);
#X obj 131 645 tabread4;
#X obj 228 593 tabread~;
#X obj 741 467 savepanel;
#X msg 741 494 \; array99 write \$1;
#X text 807 655 updated for Pd version 0.51;
#X text 911 37 print info;
#X obj 509 619 array size array99;
#X obj 652 565 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X floatatom 509 647 5 0 0 0 - - - 0;
#X obj 699 323 soundfiler;
#X msg 699 270 read -resize ../sound/voice2.wav array99;
#X msg 712 297 read -ascii -resize 15.file.txt array99;
#X msg 779 371 \; array99 read 15.file.txt;
#X text 133 566 control:;
#X text 578 565 get size, f 9;
#X obj 331 618 tabplay~;
#X text 26 587 Objects are provided for reading and writing --->, f 13;
#X floatatom 630 97 4 0 0 0 - - - 0;
#X obj 741 437 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X text 531 64 <-- set to a constant value;
#X text 686 555 See also [array] for many array operations and [expr] for C-style expressions and functions with array access., f 42;
#X obj 652 619 expr size("array99");
#X floatatom 652 647 5 0 0 0 - - - 0;
#X text 471 274 check [soundfiler] for reading and writing files. The example to the right reads a soundfile or a text file to an array., f 30;
#X text 31 48 Arrays in Pd provide a unified way to deal with lists of numbers \, treating them as either audio samples or control messages. To make an array \, select "Array" on the "Put" menu. Dialogs appear to help you choose the name \, array size and various flags (for instance \, if the contents of the array are saved with the patch or not.) Right click for properties where you can edit these settings as well and also get 'help' for detailed reference information., f 57;
#X text 509 15 Some messgages you can send to an array object:, f 28;
#X text 31 233 Arrays live in graphs. When you make an array you can choose to include it in a new graph or in a 'last' graph \, which allows you to include more than one array in the same graph (as the next example shows.) You can click on arrays and drag to set and change values., f 57;
#X text 31 174 It's also possible to change most of these settings with messages sent to the array name \, like changing the array size with the "resize" message shown to the right., f 57;
#X msg 509 460 \; array99 write ~/test.txt;
#X text 471 366 A simpler way to read a text file (but no resizing available). The write message also exist for writting. Both the 'read' and 'write' message expand "~" to the home directory., f 41;
#X text 769 429 You can also use these objects, f 16;
#X obj 894 437 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X msg 894 494 \; array99 read \$1;
#X obj 894 467 openpanel;
#X connect 3 0 4 0;
#X connect 4 0 5 0;
#X connect 24 0 25 0;
#X connect 28 0 30 0;
#X connect 29 0 28 0;
#X connect 29 0 43 0;
#X connect 32 0 31 0;
#X connect 33 0 31 0;
#X connect 39 0 2 0;
#X connect 40 0 24 0;
#X connect 43 0 44 0;
#X connect 53 0 55 0;
#X connect 55 0 54 0;
