#N canvas 358 50 930 745 12;
#X text 105 13 MORE ON ARRAYS;
#X obj 644 398 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X msg 644 425 \; array98 vis \$1;
#X msg 548 683 \; array98 style \$1;
#X floatatom 536 454 4 1 10 0 - - - 0;
#X floatatom 738 511 5 0 0 0 - - - 0;
#X msg 738 537 \; array98 color \$1;
#X msg 738 481 9, f 2;
#X msg 769 481 900;
#X text 36 138 set array values from index 0;
#X text 309 129 sets two values from index 3, f 17;
#X text 30 39 Arrays have methods to set their values explicitly. Below you can set their "bounds" rectangles \, rename them (but if you have two with the same name this won't necessarily do what you want) and add markings. To set values by message \, send a list whose first element gives the index to start at. Indices count up from zero., f 66;
#X msg 28 166 \; array98 0 -1 1 -1 1 -1 1 -1;
#X text 516 399 show/hide arrays:;
#X text 783 511 set color;
#X floatatom 548 653 5 0 0 0 - - - 0;
#X msg 302 166 \; array97 3 -0.5 0.5;
#X msg 27 234 \; array97 rename george;
#X msg 231 234 \; george rename array97;
#X msg 28 307 \; array97 bounds 0 2 10 -2;
#X msg 29 416 \; array97 xticks 0 1 1;
#X msg 222 415 \; array97 yticks 0 0.1 5;
#X msg 304 515 \; array97 ylabel -0.1 -1 0 1;
#X msg 766 424 \; array97 vis \$1;
#N canvas 162 212 568 393 locality 0;
#N canvas 0 22 450 278 (subpatch) 0;
#X array \$0-array 10 float 3;
#A 0 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5 -0.5;
#X coords 0 1 10 -1 200 140 1;
#X restore 68 112 graph;
#X obj 401 170 send \$0-array;
#X obj 319 105 bng 19 250 50 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000;
#X msg 401 140 const 0.5;
#X msg 319 202 \; \$1-array const -0.5;
#X obj 319 154 float \$0;
#X text 38 292 You can use "\$0" in an array name wherever you want as above. If you need to send a message to the array \, use the [send] object or load the "\$0" in a [float] object and pass it to a message used as a send. This is because "\$0" doesn't get expanded in messages., f 69;
#X text 31 18 '\$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 text 342 105 <-- click;
#X connect 2 0 5 0;
#X connect 3 0 1 0;
#X connect 5 0 4 0;
#X restore 254 692 pd locality;
#X msg 723 639 0;
#X msg 713 602 1;
#X text 746 596 allow editing with mouse, f 13;
#X text 752 632 prevent mouse interaction, f 14;
#X msg 713 669 \; array97 edit \$1 \; array98 edit \$1;
#X text 25 573 You can also change the x and y range and size in the "properties" dialog. Note that information about size and ranges is saved \, but ticks and labels are lost between Pd sessions. The contents of the array may be saved as part of the patch or discarded. This is set in the 'properties" dialog as well., f 62;
#X text 27 212 renaming an array;
#X text 26 285 setting the bounds rectangle;
#X text 103 476 adding labels: give a y value and a bunch of x values or vice versa, f 37;
#X text 25 363 adding x and y labels: give a point to put a tick \, the interval between ticks \, and the number of ticks overall per large tick;
#X obj 766 398 tgl 19 0 empty empty empty 17 7 0 10 #dfdfdf #000000 #000000 0 1;
#X obj 548 587 vradio 19 1 0 3 empty empty empty 0 -10 0 12 #dfdfdf #000000 #000000 0;
#X text 572 587 Point (0);
#X text 572 606 Polygon (1);
#X text 572 626 Bezier (2);
#X text 542 557 set display style:;
#X obj 549 37 cnv 19 298 148 empty empty empty 20 12 0 12 #e0e0e0 #404040 0;
#N canvas 0 50 450 250 (subpatch) 0;
#X array array97 5 float 1;
#A 0 0.486666 0.126666 0.566675 -0.5 0.5;
#X array array98 7 float 1;
#A 0 -1 1 -1 1 -1 1 -1;
#X coords 0 1 7 -1 300 150 1 0 0;
#X restore 548 36 graph;
#X text 507 329 For last \, there are methods to change the visual appearance of arrays (and you can use a canvas [cnv] to set background color as in this example):, f 52;
#X msg 680 481 444;
#X msg 255 305 \; array97 bounds 0 1 7 -1;
#X msg 712 481 0, f 2;
#X text 574 449 line width, f 5;
#X msg 418 683 \; array97 style \$1;
#X msg 536 491 \; array97 width \$1 \; array98 width \$1;
#X text 102 679 open subpatch for local array names -->, f 21;
#X text 507 211 You can put more than one array in a single "graph" (which is Pd's name for the bounding rectangle \, and is a synonym for "canvas".) In this case you need to click on an exact point of one of the arrays to drag and change values. Note that arrays' sizes need not match the bounds of the containing graph. But if you have only one array in a graph and resize it \, the graph is automatically reset to match its bounds., f 52;
#X msg 20 515 \; array97 xlabel -1.075 0 1 2 3 4 5 6 7;
#X connect 1 0 2 0;
#X connect 4 0 49 0;
#X connect 5 0 6 0;
#X connect 7 0 5 0;
#X connect 8 0 5 0;
#X connect 15 0 3 0;
#X connect 15 0 48 0;
#X connect 25 0 29 0;
#X connect 26 0 29 0;
#X connect 35 0 23 0;
#X connect 36 0 15 0;
#X connect 44 0 5 0;
#X connect 46 0 5 0;
