#N canvas 606 0 622 691 10; #X obj 0 0 doc_demo; #X text 141 46 In every grid-accepting inlet \, a list may be sent instead. If it consists only of numbers \, it will be converted to a one-dimensional grid. Else it may contain a single "#" sign and integers on both sides of it \, where the ones to the left of it are fed as arguments to an imaginary [#redim] object and the one to the right of it are fed through that [#redim]. In every grid-accepting inlet \, an integer or float may also be sent : it will be converted to a zero-dimensional grid (a scalar).; #X text 140 190 a grid has an associated number type that defines what are the possible values for its elements (and how much space it takes). the default is int32. a single-dimensional grid of 3 elements (a triplet) is called dim(3). a three-dimensional grid of 240 rows of 320 columns of triplets is called dim(240 \, 320 \, 3).; #X text 139 273 There is a sequence in which elements of a Grid are stored and transmitted. Dimension 0 is called "first" and dimension N-1 is called "last". They are called so because if you select a position in the first dimension of a grid \, the selected part is of the same shape minus the first dimension \; so in dim(240 \, 320 \, 3) if you select row 51 (or whichever valid row number) \, you get a dim(320 \, 3). if you further select a subpart of that \, you will get a dim(3) \, and if you select a subpart of that \, you will get a dim() \, which is a single number without any indexing (0-dimensional grid).; #X text 138 425 At each such level \, elements are sent/stored in their numeric order \, and are numbered using natural numbers starting at 0 This ordering usually does not matter \, but sometimes it does. Most notably \, [#import] \, [#export] and [#redim] care about it. On the other hand \, order of dimensions usually does matter \; this is what distinguishes rows from columns and channels \, for example. Most objects care about the distinction. A grid with only 1 element in a given dimension is different from one lacking that dimension \; it won't have the same meaning. You can use this property to your advantage sometimes.; #X obj 0 791 doc_f; #X obj 3 27 doc_section Grid Literals; #X obj 3 171 doc_section Grid Protocol; #X obj 3 771 doc_also; #X obj 103 771 doc_link image 1; #X obj 3 591 doc_section Synchronisation; #X text 141 703 There are two exceptions: [#store] and [#] allow right-inlet grids to be buffered if an operation is occuring on left inlet. This should make many programs simpler.; #X text 141 614 In GridFlow you cannot send two grids in different inlets at the same time. You have to use [#finished] together with (possibly) [t a a] and [#store] \, which can be cumbersome. If you don't do this \, the result is undefined behaviour (usually \, the object will use garbage instead of the actual data); #X obj 163 771 doc_link indexmap 1; #X connect 8 1 9 0; #X connect 8 1 13 0;