diff options
-rw-r--r-- | externals/gridflow/doc/architecture.html | 217 | ||||
-rw-r--r-- | externals/gridflow/doc/architecture.xml | 395 | ||||
-rw-r--r-- | externals/gridflow/doc/format.html | 485 | ||||
-rw-r--r-- | externals/gridflow/doc/format.xml | 780 | ||||
-rw-r--r-- | externals/gridflow/doc/index.html | 149 | ||||
-rw-r--r-- | externals/gridflow/doc/install.html | 122 | ||||
-rw-r--r-- | externals/gridflow/doc/install.xml | 140 | ||||
-rw-r--r-- | externals/gridflow/doc/internals.html | 206 | ||||
-rw-r--r-- | externals/gridflow/doc/internals.xml | 228 | ||||
-rw-r--r-- | externals/gridflow/doc/introduction.html | 125 | ||||
-rw-r--r-- | externals/gridflow/doc/license.html | 75 | ||||
-rw-r--r-- | externals/gridflow/doc/profiling.html | 151 | ||||
-rw-r--r-- | externals/gridflow/doc/project_policy.html | 98 | ||||
-rw-r--r-- | externals/gridflow/doc/project_policy.xml | 99 | ||||
-rw-r--r-- | externals/gridflow/doc/reference.html | 1070 | ||||
-rw-r--r-- | externals/gridflow/doc/reference.xml | 1591 |
16 files changed, 5931 insertions, 0 deletions
diff --git a/externals/gridflow/doc/architecture.html b/externals/gridflow/doc/architecture.html new file mode 100644 index 00000000..3009be34 --- /dev/null +++ b/externals/gridflow/doc/architecture.html @@ -0,0 +1,217 @@ +<html><head> +<!-- $Id: architecture.html,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<title>GridFlow 0.8.0 - Reference Manual: Architecture</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - Reference Manual: Architecture</h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="1"><h4><a href="#Numbers">Numbers</a></h4><ul> +</ul> +<h4><a href="#Grid_Literals">Grid Literals</a></h4><ul> +</ul> +<h4><a href="#Grid_Protocol">Grid Protocol</a></h4><ul> +</ul> +<h4><a href="#Picture_Protocol">Picture Protocol</a></h4><ul> +</ul> +<h4><a href="#Numeric_Operators">Numeric Operators</a></h4><ul> +</ul> +<h4><a href="#Synchronisation">Synchronisation</a></h4><ul> +</ul> +<h4><a href="#Bridges">Bridges</a></h4><ul> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Numbers"></a><h4>Numbers</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>High-performance computation requires precise and quite peculiar + definitions of numbers and their representation.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Inside most programs, numbers are written down as strings of + bits. A bit is either zero or one. Just like the decimal system + uses units, tens, hundreds, the binary system uses units, twos, + fours, eights, sixteens, and so on, doubling every time.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>One notation, called integer allows for only integer values to be + written (no fractions). when it is unsigned, no negative values may + be written. when it is signed, one bit indicates whether the number + is positive or negative. Integer storage is usually fixed-size, so you have + bounds on the size of numbers, and if a result is too big it "wraps around", truncating the biggest + bits.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Another notation, called floating point (or float) stores numbers using + a fixed number of significant digits, and a scale factor that allows for huge numbers + and tiny fractions at once. Note that 1/3 has periodic digits, but even 0.1 has periodic digits, + in binary coding; so expect some slight roundings; the precision offered should be + sufficient for most purposes. Make sure the errors of rounding don't accumulate, though.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>This little program of mine prints 1/3 in base 2 (only digits after the period): <kbd><font color="#007777">ruby -e 'x=1/3.0;for i in 0..52 do x*=2;y=x.floor;print y;x-=y end;puts'</font></kbd></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In GridFlow, there are six kinds of numbers:</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><tr><td></td><td></td><td><table border="0" bgcolor="black" cellspacing="1"><tr><td valign="top" align="left"><table bgcolor="white" border="0" cellpadding="4" cellspacing="1"><tr><td bgcolor="#808080"><font color="#ffffff"><b>name</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>aliases</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>range</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>size (bytes)</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>precision</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>description</b></font></td></tr> <tr><td bgcolor="#ffffff">uint8</td><td bgcolor="#ffffff">u8 b</td><td bgcolor="#ffffff">0..255</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff"> + unsigned 8-bit integer. + this is the usual size of numbers taken from files and cameras, and + written to files and to windows. (however this gets converted to <kbd><font color="#007777">int32</font></kbd> + unless otherwise specified.) </td></tr> <tr><td bgcolor="#f0f8ff">int16</td><td bgcolor="#f0f8ff">i16 s</td><td bgcolor="#f0f8ff">±2<sup>15</sup> = -32768..32767</td><td bgcolor="#f0f8ff">2</td><td bgcolor="#f0f8ff">1</td><td bgcolor="#f0f8ff">...</td></tr> <tr><td bgcolor="#ffffff">int32</td><td bgcolor="#ffffff">i32 i</td><td bgcolor="#ffffff">±2<sup>31</sup> = -2147483648..2147483647</td><td bgcolor="#ffffff">4</td><td bgcolor="#ffffff">1</td><td bgcolor="#ffffff"> + signed 32-bit integer. + this is used for most computations. </td></tr> <tr><td bgcolor="#f0f8ff">int64</td><td bgcolor="#f0f8ff">i64 l</td><td bgcolor="#f0f8ff">±2<sup>63</sup></td><td bgcolor="#f0f8ff">8</td><td bgcolor="#f0f8ff">1</td><td bgcolor="#f0f8ff">...</td></tr> <tr><td bgcolor="#ffffff">float32</td><td bgcolor="#ffffff">f32 f</td><td bgcolor="#ffffff">±10<sup>±38</sup></td><td bgcolor="#ffffff">4</td><td bgcolor="#ffffff">23 bits = 0.000012% (about 7 digits)</td><td bgcolor="#ffffff">...</td></tr> <tr><td bgcolor="#f0f8ff">float64</td><td bgcolor="#f0f8ff">f64 d</td><td bgcolor="#f0f8ff">±10<sup>±308</sup></td><td bgcolor="#f0f8ff">8</td><td bgcolor="#f0f8ff">52 bits (about 15 digits)</td><td bgcolor="#f0f8ff">...</td></tr> </table></td></tr></table></td></tr></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Grid_Literals"></a><h4>Grid Literals</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + In every grid-accepting inlet, a list may be sent instead; if + it consists only of integers, 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 <kbd><font color="#007777">[#redim]</font></kbd> object and the one to the + right of it are fed through that <kbd><font color="#007777">[#redim]</font></kbd>. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + In every grid-accepting inlet, an integer or float may also be sent; + it will be converted to a zero-dimensional grid (a <b>scalar</b>). </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Grid_Protocol"></a><h4>Grid Protocol</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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 <b>int32</b>. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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). </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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 select + a subpart two more times you get to a single number. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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, <kbd><font color="#007777">[#import]</font></kbd>, <kbd><font color="#007777">[#export]</font></kbd> and <kbd><font color="#007777">[#redim]</font></kbd> care about it. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + 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. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + Zero-dimensional grids exist. They are called dim(). They can only contain + a single number. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Picture_Protocol"></a><h4>Picture Protocol</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><i>This section is useful if you want to know what a picture is + in terms of a grid. </i></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>A picture is a three-dimensional Grid: <ul> <li><b>0</b> : rows</li> <li><b>1</b> : columns</li> <li><b>2</b> : channels</li> </ul> </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Channels for the RGB color model are: <ul> <li><b>0</b> : red</li> <li><b>1</b> : green</li> <li><b>2</b> : blue</li> </ul> </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + Because Grids are made of 32-bit integers, a three-channel picture uses + 96 bpp (bits per pixel), and have to be downscaled to 24 bpp (or 16 bpp) + for display. That huge amount of slack is there because when you create + your own effects you often have intermediate results that need to be of + higher precision than a normal picture. Especially, results of multiplications + are big and should not overflow before you divide them back to normal; + and similarly, you can have negative values all over, as long as you take + care of them before they get to the display. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> + In the final conversion, high bits are just ignored. This means: black is + 0, maximum is 255, and values wrap like with <kbd><font color="#007777">% 256</font></kbd>. If you want to + clip them, you may use <kbd><font color="#007777">[# max 0]</font></kbd> and <kbd><font color="#007777">[# min 255]</font></kbd> objects. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Numeric_Operators"></a><h4>Numeric Operators</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In the following table, A is the value entered to the + left, and B is the value entered to the right.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Angles are in hundredths of degrees. This means a full circle + (two pi radians) is 36000. You convert from degrees to our angles + by multiplying by 100. You convert from radians to our angles by + multiplying by 18000/pi.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Hyperbolic functions (tanh) work with our angles too, so the + same conversions apply.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><tr><td></td><td></td><td><table border="0" bgcolor="black" cellspacing="1"><tr><td valign="top" align="left"><table bgcolor="white" border="0" cellpadding="4" cellspacing="1"><tr><td bgcolor="#808080"><font color="#ffffff"><b>name</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>description</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>meaning in pixel context (pictures, palettes)</b></font></td><td bgcolor="#808080"><font color="#ffffff"><b>meaning in spatial context (indexmaps, polygons)</b></font></td></tr> <tr><td bgcolor="#ffffff"><img src="op/ignore-icon.png" border="0" alt="ignore"></td><td bgcolor="#ffffff"> A </td><td bgcolor="#ffffff">no effect</td><td bgcolor="#ffffff">no effect</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/put-icon.png" border="0" alt="put"></td><td bgcolor="#f0f8ff"> B </td><td bgcolor="#f0f8ff">replace by</td><td bgcolor="#f0f8ff">replace by</td></tr> <tr><td bgcolor="#ffffff"><img src="op/add-icon.png" border="0" alt="+"></td><td bgcolor="#ffffff"> A + B </td><td bgcolor="#ffffff">brightness, crossfade</td><td bgcolor="#ffffff">move, morph</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sub-icon.png" border="0" alt="-"></td><td bgcolor="#f0f8ff"> A - B </td><td bgcolor="#f0f8ff">brightness, motion detection</td><td bgcolor="#f0f8ff">move, motion detection</td></tr> <tr><td bgcolor="#ffffff"><img src="op/bus-icon.png" border="0" alt="inv+"></td><td bgcolor="#ffffff"> B - A </td><td bgcolor="#ffffff">negate then contrast</td><td bgcolor="#ffffff">180 degree rotate then move</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/mul-icon.png" border="0" alt="*"></td><td bgcolor="#f0f8ff"> A * B </td><td bgcolor="#f0f8ff">contrast</td><td bgcolor="#f0f8ff">zoom out</td></tr> <tr><td bgcolor="#ffffff"><img src="op/div-icon.png" border="0" alt="/"></td><td bgcolor="#ffffff"> A / B, rounded towards zero </td><td bgcolor="#ffffff">contrast</td><td bgcolor="#ffffff">zoom in</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/div2-icon.png" border="0" alt="div"></td><td bgcolor="#f0f8ff"> A / B, rounded downwards </td><td bgcolor="#f0f8ff">contrast</td><td bgcolor="#f0f8ff">zoom in</td></tr> <tr><td bgcolor="#ffffff"><img src="op/vid-icon.png" border="0" alt="inv*"></td><td bgcolor="#ffffff"> B / A, rounded towards zero </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/vid2-icon.png" border="0" alt="swapdiv"></td><td bgcolor="#f0f8ff"> B / A, rounded downwards </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/mod-icon.png" border="0" alt="%"></td><td bgcolor="#ffffff"> A % B, modulo (goes with div) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">tile</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/dom-icon.png" border="0" alt="swap%"></td><td bgcolor="#f0f8ff"> B % A, modulo (goes with div) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/rem-icon.png" border="0" alt="rem"></td><td bgcolor="#ffffff"> A % B, remainder (goes with /) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/mer-icon.png" border="0" alt="swaprem"></td><td bgcolor="#f0f8ff"> B % A, remainder (goes with /) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/gcd-icon.png" border="0" alt="gcd"></td><td bgcolor="#ffffff"> + greatest common divisor</td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/lcm-icon.png" border="0" alt="lcm"></td><td bgcolor="#f0f8ff"> + least common multiple</td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/or-icon.png" border="0" alt="|"></td><td bgcolor="#ffffff"> A or B, bitwise </td><td bgcolor="#ffffff">bright munchies</td><td bgcolor="#ffffff">bottomright munchies</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/xor-icon.png" border="0" alt="^"></td><td bgcolor="#f0f8ff"> A xor B, bitwise </td><td bgcolor="#f0f8ff">symmetric munchies (fractal checkers)</td><td bgcolor="#f0f8ff">symmetric munchies (fractal checkers)</td></tr> <tr><td bgcolor="#ffffff"><img src="op/and-icon.png" border="0" alt="&"></td><td bgcolor="#ffffff"> A and B, bitwise </td><td bgcolor="#ffffff">dark munchies</td><td bgcolor="#ffffff">topleft munchies</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/shl-icon.png" border="0" alt="<<"></td><td bgcolor="#f0f8ff"> A * (2**(B % 32)), which is left-shifting </td><td bgcolor="#f0f8ff">like *</td><td bgcolor="#f0f8ff">like *</td></tr> <tr><td bgcolor="#ffffff"><img src="op/shr-icon.png" border="0" alt=">>"></td><td bgcolor="#ffffff"> A / (2**(B % 32)), which is right-shifting </td><td bgcolor="#ffffff">like /,div</td><td bgcolor="#ffffff">like /,div</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sc_or-icon.png" border="0" alt="||"></td><td bgcolor="#f0f8ff"> if A is zero then B else A </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sc_and-icon.png" border="0" alt="&&"></td><td bgcolor="#ffffff"> if A is zero then zero else B</td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/min-icon.png" border="0" alt="min"></td><td bgcolor="#f0f8ff"> the lowest value in A,B </td><td bgcolor="#f0f8ff">clipping</td><td bgcolor="#f0f8ff">clipping (of individual points)</td></tr> <tr><td bgcolor="#ffffff"><img src="op/max-icon.png" border="0" alt="max"></td><td bgcolor="#ffffff"> the highest value in A,B </td><td bgcolor="#ffffff">clipping</td><td bgcolor="#ffffff">clipping (of individual points)</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/cmp-icon.png" border="0" alt="cmp"></td><td bgcolor="#f0f8ff"> -1 when A<B; 0 when A=B; 1 when A>B. </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/eq-icon.png" border="0" alt="=="></td><td bgcolor="#ffffff"> is A equal to B ? 1=true, 0=false </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/ne-icon.png" border="0" alt="!="></td><td bgcolor="#f0f8ff"> is A not equal to B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/gt-icon.png" border="0" alt=">"></td><td bgcolor="#ffffff"> is A greater than B ? </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/le-icon.png" border="0" alt="<="></td><td bgcolor="#f0f8ff"> is A not greater than B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/lt-icon.png" border="0" alt="<"></td><td bgcolor="#ffffff"> is A less than B ? </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/ge-icon.png" border="0" alt=">="></td><td bgcolor="#f0f8ff">is A not less than B ? </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sin-icon.png" border="0" alt="sin*"></td><td bgcolor="#ffffff"> B * sin(A) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">waves, rotations</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/cos-icon.png" border="0" alt="cos*"></td><td bgcolor="#f0f8ff"> B * cos(A) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">waves, rotations</td></tr> <tr><td bgcolor="#ffffff"><img src="op/atan-icon.png" border="0" alt="atan"></td><td bgcolor="#ffffff"> arctan(A/B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">find angle to origin (part of polar transform)</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/tanh-icon.png" border="0" alt="tanh*"></td><td bgcolor="#f0f8ff"> B * tanh(A) </td><td bgcolor="#f0f8ff">smooth clipping</td><td bgcolor="#f0f8ff">smooth clipping (of individual points), neural sigmoid, fuzzy logic</td></tr> <tr><td bgcolor="#ffffff"><img src="op/log-icon.png" border="0" alt="log*"></td><td bgcolor="#ffffff"> B * log(A) (in base e) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/gamma-icon.png" border="0" alt="gamma"></td><td bgcolor="#f0f8ff"> floor(pow(a/256.0,256.0/b)*256.0) </td><td bgcolor="#f0f8ff">gamma correction</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/pow-icon.png" border="0" alt="**"></td><td bgcolor="#ffffff"> A**B, that is, A raised to power B </td><td bgcolor="#ffffff">gamma correction</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/abs-icon.png" border="0" alt="abs-"></td><td bgcolor="#f0f8ff"> absolute value of (A-B) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/rand-icon.png" border="0" alt="rand"></td><td bgcolor="#ffffff"> randomly produces a non-negative number below A </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/sqrt-icon.png" border="0" alt="sqrt"></td><td bgcolor="#f0f8ff"> square root of A, rounded downwards </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/sq-icon.png" border="0" alt="sq-"></td><td bgcolor="#ffffff"> (A-B) times (A-B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/clip+-icon.png" border="0" alt="clip+"></td><td bgcolor="#f0f8ff"> like A+B but overflow causes clipping instead of wrapping around (coming soon) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/clip--icon.png" border="0" alt="clip-"></td><td bgcolor="#ffffff"> like A-B but overflow causes clipping instead of wrapping around (coming soon) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/avg-icon.png" border="0" alt="avg"></td><td bgcolor="#f0f8ff"> (A+B)/2 </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> <tr><td bgcolor="#ffffff"><img src="op/hypot-icon.png" border="0" alt="hypot"></td><td bgcolor="#ffffff"> square root of (A*A+B*B) </td><td bgcolor="#ffffff">--</td><td bgcolor="#ffffff">--</td></tr> <tr><td bgcolor="#f0f8ff"><img src="op/erf-icon.png" border="0" alt="erf*"></td><td bgcolor="#f0f8ff"> integral of e^(-x*x) dx ... (coming soon; what ought to be the scaling factor?) </td><td bgcolor="#f0f8ff">--</td><td bgcolor="#f0f8ff">--</td></tr> </table></td></tr></table></td></tr></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Synchronisation"></a><h4>Synchronisation</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In GridFlow you cannot send two grids in different inlets at the +same time. You have to use <kbd><font color="#007777">[#finished]</font></kbd> together with (possibly) <kbd><font color="#007777">[fork]</font></kbd> and <kbd><font color="#007777">[#store]</font></kbd>, +which can be cumbersome. If you don't do this, the result is undefined +behaviour (or crash!).</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In GridFlow 0.7.1 this is beginning to change. <kbd><font color="#007777">[#store]</font></kbd> and # now allow +right-inlet grids to be buffered if an operation is occuring on left inlet. This +should make many circuits simpler. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>(more to come)</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Bridges"></a><h4>Bridges</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Starting with version 0.6, GridFlow is Ruby-centric instead of jMax-centric. +jMax support has been added back as a <b>Bridge</b>.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Bridges, for the most part, plug into the FObject class, which is the common +root of most of GridFlow's classes. Under the current design, the bridge is +compiled separately, and is directly loaded by the host software; then the +bridge starts Ruby and makes it load the main GridFlow; then the bridge hooks +with the main part. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/architecture.xml b/externals/gridflow/doc/architecture.xml new file mode 100644 index 00000000..ec0c5a14 --- /dev/null +++ b/externals/gridflow/doc/architecture.xml @@ -0,0 +1,395 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'jmax.dtd'> +<documentation title="Reference Manual: Architecture"> +<!-- $Id: architecture.xml,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<!-- + GridFlow Reference Manual: Architecture + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard +--> + +<!-- +<section name="Conventions of this Manual"> + (In this section, usage of Bold, Italic, Courier, etc. would be explained. + eventually I'd like those to have precise meanings consistent throughout + the whole documentation) +</section> +--> + +<!--write-me +<section name="Naming Conventions"> +</section> +--> + +<!--write-me +<section name="User-level Overview"> +<p>(this section is for all users)</p> +</section> +--> + +<section name="Numbers"> + + <p>High-performance computation requires precise and quite peculiar + definitions of numbers and their representation.</p> + + <p>Inside most programs, numbers are written down as strings of + bits. A bit is either zero or one. Just like the decimal system + uses units, tens, hundreds, the binary system uses units, twos, + fours, eights, sixteens, and so on, doubling every time.</p> + + <p>One notation, called integer allows for only integer values to be + written (no fractions). when it is unsigned, no negative values may + be written. when it is signed, one bit indicates whether the number + is positive or negative. Integer storage is usually fixed-size, so you have + bounds on the size of numbers, and if a result is too big it "wraps around", truncating the biggest + bits.</p> + + <p>Another notation, called floating point (or float) stores numbers using + a fixed number of significant digits, and a scale factor that allows for huge numbers + and tiny fractions at once. Note that 1/3 has periodic digits, but even 0.1 has periodic digits, + in binary coding; so expect some slight roundings; the precision offered should be + sufficient for most purposes. Make sure the errors of rounding don't accumulate, though.</p> + + <p>This little program of mine prints 1/3 in base 2 (only digits after the period): + <k>ruby -e 'x=1/3.0;for i in 0..52 do x*=2;y=x.floor;print y;x-=y end;puts'</k></p> + + + <p>In GridFlow, there are six kinds of numbers:</p> + + <table> + <column id="name">name</column> + <column id="aliases">aliases</column> + <column id="range">range</column> + <column id="size">size (bytes)</column> + <column id="precision">precision</column> + <column id="">description</column> + <row name="uint8" aliases="u8 b" size="1" + range="0..255" precision="1"> + unsigned 8-bit integer. + this is the usual size of numbers taken from files and cameras, and + written to files and to windows. (however this gets converted to <k>int32</k> + unless otherwise specified.) + </row> + <row name="int16" aliases="i16 s" size="2" + range="±2<sup>15</sup> = -32768..32767" precision="1" + >...</row> + <row name="int32" aliases="i32 i" size="4" + range="±2<sup>31</sup> = -2147483648..2147483647" precision="1"> + signed 32-bit integer. + this is used for most computations. + </row> + <row name="int64" aliases="i64 l" size="8" + range="±2<sup>63</sup>" precision="1" + >...</row> + <row name="float32" aliases="f32 f" size="4" + range="±10<sup>±38</sup>" + precision="23 bits = 0.000012% (about 7 digits)" + >...</row> + <row name="float64" aliases="f64 d" size="8" + range="±10<sup>±308</sup>" + precision="52 bits (about 15 digits)" + >...</row> + </table> +</section> + +<section name="Grid Literals"> +<p> + In every grid-accepting inlet, a list may be sent instead; if + it consists only of integers, 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 <k>[#redim]</k> object and the one to the + right of it are fed through that <k>[#redim]</k>. +</p> +<p> + In every grid-accepting inlet, an integer or float may also be sent; + it will be converted to a zero-dimensional grid (a <b>scalar</b>). +</p> +</section> + +<section name="Grid Protocol"> + <p> + 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 <b>int32</b>. + </p> + <p> + 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). + </p> + <p> + 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 select + a subpart two more times you get to a single number. + </p> + <p> + 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, <k>[#import]</k>, + <k>[#export]</k> and <k>[#redim]</k> care about it. + </p> + <p> + 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. + </p> + <p> + 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. + </p> + <p> + Zero-dimensional grids exist. They are called dim(). They can only contain + a single number. + </p> +</section> + +<section name="Picture Protocol"> + <p><i>This section is useful if you want to know what a picture is + in terms of a grid. + </i></p> + + <p>A picture is a three-dimensional Grid: + <list start="0"> + <li>rows</li> + <li>columns</li> + <li>channels</li> + </list> + </p> + <p>Channels for the RGB color model are: + <list start="0"> + <li>red</li> + <li>green</li> + <li>blue</li> + </list> + </p> + <p> + Because Grids are made of 32-bit integers, a three-channel picture uses + 96 bpp (bits per pixel), and have to be downscaled to 24 bpp (or 16 bpp) + for display. That huge amount of slack is there because when you create + your own effects you often have intermediate results that need to be of + higher precision than a normal picture. Especially, results of multiplications + are big and should not overflow before you divide them back to normal; + and similarly, you can have negative values all over, as long as you take + care of them before they get to the display. + </p> + <p> + In the final conversion, high bits are just ignored. This means: black is + 0, maximum is 255, and values wrap like with <k>% 256</k>. If you want to + clip them, you may use <k>[# max 0]</k> and <k>[# min 255]</k> objects. + </p> +</section> + +<section name="Numeric Operators"> + <p>In the following table, A is the value entered to the + left, and B is the value entered to the right.</p> + + <p>Angles are in hundredths of degrees. This means a full circle + (two pi radians) is 36000. You convert from degrees to our angles + by multiplying by 100. You convert from radians to our angles by + multiplying by 18000/pi.</p> + + <p>Hyperbolic functions (tanh) work with our angles too, so the + same conversions apply.</p> + +<table> + <column id="name" type="icon">name</column> + <column id="">description</column> + <column id="color">meaning in pixel context (pictures, palettes)</column> + <column id="space">meaning in spatial context (indexmaps, polygons)</column> + + <!-- category: bogus --> + <row name="ignore" cname="ignore" + color="no effect" + space="no effect" + > A </row> + <row name="put" cname="put" + color="replace by" + space="replace by" + > B </row> + + <!-- category: additive --> + <row name="+" cname="add" + color="brightness, crossfade" + space="move, morph" + > A + B </row> + <row name="-" cname="sub" + color="brightness, motion detection" + space="move, motion detection" + > A - B </row> + <row name="inv+" cname="bus" + color="negate then contrast" + space="180 degree rotate then move" + > B - A </row> + + <!-- category: multiplicative --> + <row name="*" cname="mul" + color="contrast" + space="zoom out" + > A * B </row> + <row name="/" cname="div" + color="contrast" + space="zoom in" + > A / B, rounded towards zero </row> + <row name="div" cname="div2" + color="contrast" + space="zoom in" + > A / B, rounded downwards </row> + <row name="inv*" cname="vid" + > B / A, rounded towards zero </row> + <row name="swapdiv" cname="vid2" + > B / A, rounded downwards </row> + <row name="%" cname="mod" + space="tile" + > A % B, modulo (goes with div) </row> + <row name="swap%" cname="dom" + > B % A, modulo (goes with div) </row> + <row name="rem" cname="rem" + > A % B, remainder (goes with /) </row> + <row name="swaprem" cname="mer" + > B % A, remainder (goes with /) </row> + + <row name="gcd" cname="gcd"> + greatest common divisor</row> + + <row name="lcm" cname="lcm"> + least common multiple</row> + + <!-- bits --> + <row name="|" cname="or" + color="bright munchies" + space="bottomright munchies" + > A or B, bitwise </row> + <row name="^" cname="xor" + color="symmetric munchies (fractal checkers)" + space="symmetric munchies (fractal checkers)" + > A xor B, bitwise </row> + <row name="&" cname="and" + color="dark munchies" + space="topleft munchies" + > A and B, bitwise </row> + <row name="<<" cname="shl" + color="like *" + space="like *" + > A * (2**(B % 32)), which is left-shifting </row> + <row name=">>" cname="shr" + color="like /,div" + space="like /,div" + > A / (2**(B % 32)), which is right-shifting </row> + + <!-- decision --> + <row name="||" cname="sc_or" + > if A is zero then B else A </row> + <row name="&&" cname="sc_and" + > if A is zero then zero else B</row> + <row name="min" cname="min" + color="clipping" + space="clipping (of individual points)" + > the lowest value in A,B </row> + <row name="max" cname="max" + color="clipping" + space="clipping (of individual points)" + > the highest value in A,B </row> + + <!-- comparison --> + <row name="cmp" cname="cmp" + > -1 when A<B; 0 when A=B; 1 when A>B. </row> + <row name="==" cname="eq" + > is A equal to B ? 1=true, 0=false </row> + <row name="!=" cname="ne" + > is A not equal to B ? </row> + <row name=">" cname="gt" + > is A greater than B ? </row> + <row name="<=" cname="le" + > is A not greater than B ? </row> + <row name="<" cname="lt" + > is A less than B ? </row> + <row name=">=" cname="ge" + >is A not less than B ? </row> + + <!-- trigonometrics and exponentiation --> + <row name="sin*" cname="sin" + space="waves, rotations" + > B * sin(A) </row> + <row name="cos*" cname="cos" + space="waves, rotations" + > B * cos(A) </row> + <row name="atan" cname="atan" + space="find angle to origin (part of polar transform)" + > arctan(A/B) </row> + <row name="tanh*" cname="tanh" + color="smooth clipping" + space="smooth clipping (of individual points), neural sigmoid, fuzzy logic" + > B * tanh(A) </row> + <row name="log*" cname="log" + > B * log(A) (in base e) </row> + <row name="gamma" cname="gamma" + color="gamma correction" + > floor(pow(a/256.0,256.0/b)*256.0) </row> + <row name="**" cname="pow" + color="gamma correction" + > A**B, that is, A raised to power B </row> + + <!-- former one-input operators --> + <row name="abs-" cname="abs" + > absolute value of (A-B) </row> + <row name="rand" cname="rand" + > randomly produces a non-negative number below A </row> + <row name="sqrt" cname="sqrt" + > square root of A, rounded downwards </row> + <row name="sq-" cname="sq" + > (A-B) times (A-B) </row> + + <!-- 0.8.0 --> + <row name="clip+" cname="clip+" + > like A+B but overflow causes clipping instead of wrapping around (coming soon) </row> + <row name="clip-" cname="clip-" + > like A-B but overflow causes clipping instead of wrapping around (coming soon) </row> + <row name="avg" cname="avg" + > (A+B)/2 </row> + <row name="hypot" cname="hypot" + > square root of (A*A+B*B) </row> + <row name="erf*" cname="erf" + > integral of e^(-x*x) dx ... (coming soon; what ought to be the scaling factor?) </row> +</table> +</section> + +<!--write-me +<section name="Programmer-level Overview"> +<p>(this section is for people who want to mess with the internals or at least +understand them a bit)</p> +(move this section down?) +</section> +--> + +<section name="Synchronisation"> +<p>In GridFlow you cannot send two grids in different inlets at the +same time. You have to use <k>[#finished]</k> together with (possibly) <k>[fork]</k> and <k>[#store]</k>, +which can be cumbersome. If you don't do this, the result is undefined +behaviour (or crash!).</p> + +<p>In GridFlow 0.7.1 this is beginning to change. <k>[#store]</k> and # now allow +right-inlet grids to be buffered if an operation is occuring on left inlet. This +should make many circuits simpler. +</p> + +<p>(more to come)</p> +</section> + +<section name="Bridges"> +<p>Starting with version 0.6, GridFlow is Ruby-centric instead of jMax-centric. +jMax support has been added back as a <b>Bridge</b>.</p> + +<p>Bridges, for the most part, plug into the FObject class, which is the common +root of most of GridFlow's classes. Under the current design, the bridge is +compiled separately, and is directly loaded by the host software; then the +bridge starts Ruby and makes it load the main GridFlow; then the bridge hooks +with the main part. +</p> + +</section> + +</documentation> diff --git a/externals/gridflow/doc/format.html b/externals/gridflow/doc/format.html new file mode 100644 index 00000000..325a6409 --- /dev/null +++ b/externals/gridflow/doc/format.html @@ -0,0 +1,485 @@ +<html><head> +<!-- $Id: format.html,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<title>GridFlow 0.8.0 - Reference Manual: Format Classes</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - Reference Manual: Format Classes</h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="1"><h4><a href="#Objects_for_Input/Output">Objects for Input/Output</a></h4><ul> +<li><a href="##in"><img src="flow_classes/%23in-icon.png" alt="[#in]" border="0"></a></li> +<li><a href="##out"><img src="flow_classes/%23out-icon.png" alt="[#out]" border="0"></a></li> +<li><a href="##peephole"><img src="flow_classes/%23peephole-icon.png" alt="[#peephole]" border="0"></a></li> +<li><a href="##mouse"><img src="flow_classes/%23mouse-icon.png" alt="[#mouse]" border="0"></a></li> +<li><a href="##camera"><img src="flow_classes/%23camera-icon.png" alt="[#camera]" border="0"></a></li> +</ul> +<h4><a href="#Picture/Movie_Formats">Picture/Movie Formats</a></h4><ul> +<li><a href="#format ppm #in/#out"><img src="flow_classes/format ppm %23in/%23out-icon.png" alt="[format ppm #in/#out]" border="0"></a></li> +<li><a href="#format targa #in/#out"><img src="flow_classes/format targa %23in/%23out-icon.png" alt="[format targa #in/#out]" border="0"></a></li> +<li><a href="#format jpeg #in/#out"><img src="flow_classes/format jpeg %23in/%23out-icon.png" alt="[format jpeg #in/#out]" border="0"></a></li> +<li><a href="#format png #in"><img src="flow_classes/format png %23in-icon.png" alt="[format png #in]" border="0"></a></li> +<li><a href="#format quicktime #in/#out"><img src="flow_classes/format quicktime %23in/%23out-icon.png" alt="[format quicktime #in/#out]" border="0"></a></li> +<li><a href="#format mpeg #in"><img src="flow_classes/format mpeg %23in-icon.png" alt="[format mpeg #in]" border="0"></a></li> +<li><a href="#format grid #in/#out"><img src="flow_classes/format grid %23in/%23out-icon.png" alt="[format grid #in/#out]" border="0"></a></li> +</ul> +<h4><a href="#Acquisition_Devices">Acquisition Devices</a></h4><ul> +<li><a href="#format videodev #in"><img src="flow_classes/format videodev %23in-icon.png" alt="[format videodev #in]" border="0"></a></li> +</ul> +<h4><a href="#Window_Output">Window Output</a></h4><ul> +<li><a href="#format x11 #in/#out"><img src="flow_classes/format x11 %23in/%23out-icon.png" alt="[format x11 #in/#out]" border="0"></a></li> +<li><a href="#format quartz #out"><img src="flow_classes/format quartz %23out-icon.png" alt="[format quartz #out]" border="0"></a></li> +<li><a href="#format sdl #out"><img src="flow_classes/format sdl %23out-icon.png" alt="[format sdl #out]" border="0"></a></li> +<li><a href="#format aalib #out"><img src="flow_classes/format aalib %23out-icon.png" alt="[format aalib #out]" border="0"></a></li> +<li><a href="#format window #out"><img src="flow_classes/format window %23out-icon.png" alt="[format window #out]" border="0"></a></li> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Input/Output"></a><h4>Objects for Input/Output</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#in">#in</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23in-icon.png" alt="[#in]" border="0"><br clear="left"><br><br><a href="#inout"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>format<b>, </b>format_specific_part...<b>)</b> + If no arguments given, creates an input object for an unspecified + format. You then need to use the <kbd><font color="#007777">"open"</font></kbd> command to link + a format handler to it. + If arguments given, the <kbd><font color="#007777">"open"</font></kbd> command is immediately called + with those arguments. + Remember that most formats produce Dim[rows,columns,3] grids with + 0-255 values. (Most.) <br> + <br><b>inlet 0 </b><b>method</b> open <b>(</b>format<b>, </b>format_specific_part...<b>)</b> + This is the command that gives a particular resource + to a <kbd><font color="#007777">[#out]</font></kbd> object. This is done through a "format" + (there is a list of formats in this manual). The other + arguments depend on the chosen format. The format may + be a file format or a protocol or a hardware device, etc. + The format called "file" is a special shortcut that autodetects the + type of file (by name suffix) and picks up the appropriate handler. <br> + <br><b>inlet 0 </b><b>method</b> open <b>(</b>filename<b>)</b> + This is a shortcut for <kbd><font color="#007777">"open file"</font></kbd> followed by a filename. + The filename must contain a dot, else it will be seen as a handler name. <br> + <br><b>inlet 0 </b><b>method</b> close <b>(</b><b>)</b> + close may be necessary if you operate on <kbd><font color="#007777">"/dev/video"</font></kbd>, + which can only be read by one at a time. otherwise it's + usually not necessary. <br> + <br><b>inlet 0 </b><b>method</b> int <b>(</b>frame_number<b>)</b> + selects one picture from a multi-picture format + and then does the same as a bang. <br> + <br><b>inlet 0 </b><b>method</b> set <b>(</b>frame_number<b>)</b> + selects one picture from a multi-picture format, + to be displayed by the next bang. <br> + <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> + sends a grid through the outlet. the grid may be the + result of reading from a file, acquiring from a device, + capturing from the screen etc. + this is format-specific. most formats + produce grid(rows columns {red green blue}). + In formats that read from a file, reading another picture + will continue if there are several pictures in the + same file, but if the end of file is reached instead, + it will rewind and send the first picture again. + see section "External Picture Formats". <br> + <br><b>inlet 0 </b><b>method</b> option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b> + Obsolete. the word "option" is optional now. <br> + <br><b>inlet 0 </b><b>method</b> rewind <b>(</b><b>)</b> + rewinds to beginning of file if applicable. <br> + <br><b>inlet 0 </b><b>method</b> loop <b>(</b><i>bool</i> flag<b>)</b> + controls the automatic looping of movies. <br> + <br><b>outlet 1 </b><b>method</b> int <b>(</b><b>)</b> + frame number of frame just sent, + for formats that have frame numbers. <br> + <br><b>outlet 1 </b><b>method</b> bang <b>(</b><b>)</b> + tried to read a frame that does not exist + (signals end of file) <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#out">#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23out-icon.png" alt="[#out]" border="0"><br clear="left"><br><br><a href="#inout"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>format<b>, </b>format_specific_part...<b>)</b> + If no arguments given, creates an output object for an unspecified + format. You then need to use the <kbd><font color="#007777">"open"</font></kbd> command to link + a format handler to it. + If arguments given, the <kbd><font color="#007777">"open"</font></kbd> command is immediately called + with those arguments. + Remember that most formats expect dim(rows,columns,3) grids with + 0-255 values. (Most.) <br> + <br><b>method</b> init <b>(</b><i>integer</i> rows<b>, </b><i>integer</i> columns<b>)</b> + This alternate way to create an <kbd><font color="#007777">[#out]</font></kbd> automatically calls <kbd><font color="#007777">"open window"</font></kbd> and <kbd><font color="#007777">"out_size <i>rows columns</i>"</font></kbd>. <br> + <br><b>inlet 0 </b><b>method</b> open <b>(</b>format<b>, </b>format_specific_part...<b>)</b> + This is the command that gives a particular resource + to a <kbd><font color="#007777">[#out]</font></kbd> object. This is done through a "format" + (there is a list of formats in this manual). The other + arguments depend on the chosen format. The format may + be a file format or a protocol or a hardware device, etc. <br> + <br><b>inlet 0 </b><b>method</b> open file <b>(</b><b>)</b> + The format called "file" is a special shortcut that autodetects the + type of file (by name suffix) and picks up the appropriate handler. <br> + <br><b>inlet 0 </b><b>method</b> open <b>(</b>filename<b>)</b> + This is a shortcut for "open file" followed by a filename. + The filename must contain a dot, else it will be seen as a handler name. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + this is format-specific. most formats + expect grid(rows columns {red green blue}). + In formats that write to a file, sending a 2nd picture + overwrites the first. + see section "External Picture Formats". <br> + <br><b>inlet 0 </b><b>method</b> close <b>(</b><b>)</b> + closes the file. usually not necessary. <br> + <br><b>inlet 0 </b><b>method</b> option <b>(</b><i>symbol</i> selector<b>, </b>stuff...<b>)</b> + Obsolete. Omit the word "option" now. <br> + <br><b>inlet 0 </b><b>method</b> timelog <b>(</b><i>0,1</i> status<b>)</b> + when status=1, current time (unix clock) and time since last + frame-end are printed in the console. when status=0, it is off. + default is 0. <br> + <br><b>inlet 0 </b><b>method</b> rewind <b>(</b><b>)</b> + rewinds to beginning of file if applicable. + will overwrite the previous data. <br> + <br><b>outlet 0 </b><b>method</b> bang <b>(</b><b>)</b> + sent when a complete grid has been received. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#peephole">#peephole</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23peephole-icon.png" alt="[#peephole]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object class only works with a X11-based version of Pd. + (e.g. on Linux, BSD, but not MacOS X). </p> <p>Similar to <kbd><font color="#007777">[#out window]</font></kbd>, except it creates an inset in the patch you put it + in, and a scaled version of the picture appears in the inset. It also emits the same messages + as <kbd><font color="#007777">[#out window]</font></kbd> and automatically scales cursor position according to the current scale factor. + The scale factor is decided automatically. </p> <br><b>method</b> init <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b> <br> + <p>All other methods are as in <kbd><font color="#007777">[#out window]</font></kbd>.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#mouse">#mouse</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23mouse-icon.png" alt="[#mouse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + This will process the "position" messages emitted by <kbd><font color="#007777">[#out]</font></kbd> or <kbd><font color="#007777">[#peephole]</font></kbd> in + useful ways. <br><b>outlet 0 </b><b>method</b> list <b>(</b><b>)</b> + y,x coords of a click <br> + <br><b>outlet 1 </b><b>method</b> list <b>(</b><b>)</b> + y,x coords of a drag (any button is kept pressed) <br> + <br><b>outlet 2 </b><b>method</b> list <b>(</b><b>)</b> + y,x coords of an unclick <br> + <br><b>outlet 3 </b><b>method</b> list <b>(</b><b>)</b> + y,x coords of a move (no button is pressed) <br> + <br><b>outlet 4 </b><b>method</b> float <b>(</b><b>)</b> button 1 status<br> + <br><b>outlet 5 </b><b>method</b> float <b>(</b><b>)</b> button 2 status<br> + <br><b>outlet 6 </b><b>method</b> float <b>(</b><b>)</b> button 3 status<br> + <br><b>outlet 7 </b><b>method</b> float <b>(</b><b>)</b> + wheel difference: -1 = roll up; 1 = roll down. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#camera">#camera</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23camera-icon.png" alt="[#camera]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Works about like <kbd><font color="#007777">[#in videodev]</font></kbd> except you can right-click-open it to access all of the + camera settings visually. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Picture/Movie_Formats"></a><h4>Picture/Movie Formats</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format ppm #in/#out">format ppm #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format ppm %23in/%23out-icon.png" alt="[format ppm #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Subformat P6 only. + Max-number can only be 255 (24-bit RGB). </p> <br><b>method</b> open ppm file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br><b>method</b> open ppm gzfile <b>(</b><i>symbol</i> filename<b>)</b> + same but for .ppm.gz files <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {r g b})</i> grid<b>)</b> + values 0-255 <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format targa #in/#out">format targa #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format targa %23in/%23out-icon.png" alt="[format targa #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Support for RGB-24 (3 channels) and RGBA-32 (4 channels)</p> <br><b>method</b> open targa file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br><b>method</b> open targa gzfile <b>(</b><i>symbol</i> filename<b>)</b> + same but for .tga.gz files <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24<br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 4)</i> grid<b>)</b> RGBA-32<br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format jpeg #in/#out">format jpeg #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format jpeg %23in/%23out-icon.png" alt="[format jpeg #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Support for RGB non-progressive</p> <br><b>method</b> open jpeg file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24 <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format png #in">format png #in</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format png %23in-icon.png" alt="[format png #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Support for RGB non-progressive</p> <br><b>method</b> open png file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 1)</i> grid<b>)</b> Y-8 (greyscale)<br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 2)</i> grid<b>)</b> YA-16 (greyscale and transparency)<br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 3)</i> grid<b>)</b> RGB-24 (colour)<br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns 4)</i> grid<b>)</b> RGBA-32 (colour and transparency)<br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format quicktime #in/#out">format quicktime #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format quicktime %23in/%23out-icon.png" alt="[format quicktime #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Support for .mov files.</p> <p>This format supports frame-seek and frame-tell.</p> <p>Uses the HW-QuickTime library aka QuickTime4Linux + (libquicktime.so). There is also a variant on the same library and that project + is just called LibQuickTime.</p> <p>Some versions of those libraries may include support for different codecs, + and some also may support entirely different wrapper formats such as AVI.</p> <p>On Macintosh, Apple QuickTime is used instead, but several of the following + messages may not be available.</p> <br><b>method</b> open quicktime file <b>(</b><i>symbol</i> filename<b>)</b> <br> + <br><b>method</b> codec <b>(</b><i>symbol</i> codec<b>)</b> + Allowed values are at least: raw, jpeg, png, mjpa, yuv2, yuv4. + Some other values may allowed, depending on the version of the library + and which codec plugins are installed. + Must be set before the first frame is written. + only applies to <kbd><font color="#007777">[#out]</font></kbd>. Choosing a codec is important + because codecs influence greatly the speed of + encoding, the speed of decoding, + the size of the written file, and its fidelity to the + original content. Note that there exist other Apple-QuickTime + codecs that are not supported by HW-QuickTime. <br> + <br><b>method</b> parameter <b>(</b><i>symbol</i> key<b>, </b><i>int</i> value<b>)</b> + Sets special codec-specific settings. + For example: <kbd><font color="#007777">"parameter jpeg_quality 75"</font></kbd> <br> + <br><b>method</b> framerate <b>(</b><i>int</i> fps<b>)</b> + Sets the framerate of the file. + This is not used by GridFlow when reading a file, but other + programs usually care. <br> + <br><b>method</b> colorspace <b>(</b><i>symbol</i> colorspace<b>)</b> + Allowed values are rgb, rgba, bgr, bgra, yuv, yuva. + Normally you don't need this. <br> + <br><b>method</b> size <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b> + Forces a window size when writing. Usually this has to be used <u>after</u> + setting the framerate and codec and <u>before</u> setting the codec-parameters. + (Strange. Sorry.) <br> + <br><b>method</b> force_size <b>(</b><i>int</i> height<b>, </b><i>int</i> width<b>)</b> + forces a window size when reading. + this is a workaround for a problem in HW-QuickTime. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format mpeg #in">format mpeg #in</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format mpeg %23in-icon.png" alt="[format mpeg #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>support for .mpeg files</p> <p>this format supports frame-seek and frame-tell.</p> <p>Two different libraries are available for dealing with + MPEG files. Those have different details, capabilities and quirks.</p> <p>In any case, GridFlow does not support importing audio from + those files.</p> <p>If you use the HeroineWarrior library, you may open several + mpeg files at once, but not with the GregWard library.</p> <p>Libraries may scream error messages in a rude way.</p> <p>By opposition to PPM and TARGA, this format driver only + allows a single MPEG stream per file (you cannot "cat" + several MPEG files together). </p> <p>Supports Rewind and Frame Select.</p> <br><b>method</b> open mpeg file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format grid #in/#out">format grid #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format grid %23in/%23out-icon.png" alt="[format grid #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This is GridFlow's special file format. This is the only I/O + format that can hold anything that the <kbd><font color="#007777">[#store]</font></kbd> object can. </p> <p> + This is the picture format that would support TCP connections + if that feature actually worked. More on this later. </p> <br><b>method</b> open grid file <b>(</b><i>symbol</i> filename<b>)</b> + opens the specified file, taken from the current + directory. <br> + <br><b>method</b> open grid gzfile <b>(</b><i>symbol</i> filename<b>)</b> + same but for .grid.gz files <br> + <br><b>method</b> open grid tcp <b>(</b><i>symbol</i> hostname<b>, </b><i>integer</i> port<b>)</b> + dials an specified hostname/port on the InterNet or + compatible network. the TCP protocol is used. <br> + <br><b>method</b> open grid tcpserver <b>(</b><i>integer</i> port<b>)</b> + waits for a call (and answers) for this port on the + local machine via InterNet or compatible network. + Answers the call. <br> + <br><b>method</b> type int32 <b>(</b><b>)</b> + output will be as 32 bit signed integers. <br> + <br><b>method</b> type uint8 <b>(</b><b>)</b> + output will be as 8 bit unsigned integers. <br> + <br><b>method</b> headerful <b>(</b><b>)</b> + cancels "headerless" (and back to reading .grid) <br> + <br><b>method</b> headerless <b>(</b>dimensions...<b>)</b> + instead of reading .grid files with header, will read raw data, + faking a .grid header to itself. It will use the hereby specified + dimension list, as well as two other settings: <kbd><font color="#007777">type</font></kbd> and <kbd><font color="#007777">endian</font></kbd>. <br> + <p>When writing "raw" data, a file may be considered a long string of + base 256 digits (called bytes), but different computers have different + conventions for dealing with them: <br><b>method</b> endian <b>(</b><b>)</b> <ul><li><b>1</b> : big: + A number will be written starting with the biggest digit. + This is the natural way on the Macintosh, Sun, Amiga, and so on. </li> <li><b>2</b> : little: + A number will be written starting with the smallest digit. + This is the natural way on the Intel 386/Pentium. </li> <li><b>3</b> : same: + A number will be written in whichever way is more natural + on this computer. The natural way is slightly faster to handle. + This is the default setting. </li> </ul> <br> + </p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Acquisition_Devices"></a><h4>Acquisition Devices</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format videodev #in">format videodev #in</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format videodev %23in-icon.png" alt="[format videodev #in]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> open <b>(</b>device<b>)</b> <br> + <p>Video4Linux-1 devices, RGB-24 only. Variable picture size.</p> <p>We have been testing it using cards of the BT-848 family, + such as Miro DC10plus and Hauppauge WinTV, using the <kbd><font color="#007777">bttv.o</font></kbd> linux driver. + Also we have been testing using Logitech QuickCam (and similar Labtec hardware), + but don't use the <kbd><font color="#007777">qce-ga</font></kbd> driver, which is buggy and obsolete: the <kbd><font color="#007777">qc-usb</font></kbd> + works better.</p> <p>Some hardware doesn't support RGB, so you may have to select a YUV colorspace + (see below) and then use <kbd><font color="#007777">[#yuv_to_rgb]</font></kbd>. Don't forget to also do <kbd><font color="#007777">[# min 255]</font></kbd> and <kbd><font color="#007777">[# max 0]</font></kbd>. </p> <p>If for some reason there's a bug that causes a driver to produce BGR instead of RGB, + so that red and blue are swapped, you can swap them back by filtering through a RGB-BGR + converter, such as <kbd><font color="#007777">[#inner * + 0 {3 3 # 0 0 1 0 1 0 1 0 0}]</font></kbd>.</p> <p>color adjustments: <br><b>method</b> brightness <b>(</b><i>0-65535</i> level<b>)</b> <br> + <br><b>method</b> hue <b>(</b><i>0-65535</i> level<b>)</b> <br> + <br><b>method</b> colour <b>(</b><i>0-65535</i> level<b>)</b> <br> + <br><b>method</b> contrast <b>(</b><i>0-65535</i> level<b>)</b> <br> + <br><b>method</b> whiteness <b>(</b><i>0-65535</i> level<b>)</b> <br> + </p> <br><b>method</b> get <b>(</b><i>symbol</i> attr<b>)</b> + gets a specific attribute. a message is sent through right outlet. + valid attributes are: brightness, hue, colour, contrast, whiteness. <br> + <br><b>method</b> get <b>(</b><b>)</b> + gets all attributes. <br> + <p>other options: <br><b>method</b> channel <b>(</b><i>integer</i> <b>)</b> <br> + <br><b>method</b> tuner <b>(</b><i>integer</i> <b>)</b> <br> + <br><b>method</b> norm <b>(</b><i>integer</i> <b>)</b> <br> + <br><b>method</b> frequency <b>(</b><i>integer</i> <b>)</b> <br> + <br><b>method</b> transfer <b>(</b><i>symbol(read|mmap)</i> <b>, </b><i>integer</i> <b>)</b> <ul> <li><b>1</b> : mmap: + This is the normal (and fast) way of transferring pictures + from the camera. </li> <li><b>2</b> : read: + Some cameras/drivers only support this instead of mmap. </li></ul> + In case of mmap, the extra numeric argument sets the + queue length in number of frames, so you can select an + appropriate tradeoff between efficiency and latency. <br> + <br><b>method</b> colorspace <b>(</b><i>symbol</i> colorspace<b>)</b> + Allowed values are: RGB24, YUV420P. + Use this if your driver doesn't support RGB24. <br> + <br><b>method</b> size <b>(</b>height<b>, </b>width<b>)</b> + sets the input size, especially when using a video digitalizer + device. <br> + </p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Window_Output"></a><h4>Window Output</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format x11 #in/#out">format x11 #in/#out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format x11 %23in/%23out-icon.png" alt="[format x11 #in/#out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>supports 15,16,24,32-bit truecolor displays</p> <p>now also support 8-bit indexed displays, using a private colormap + configured as 3:3:2 RGB. When using 8-bit you can specify the + "use_stripes" option to use a completely different color scheme + involving R,G,B diagonal stripes, a kind of 6:6:6 RGB spread over three + pixels.</p> <p>If you are using Windows or MacOS 10: you will have to install + a X11 server. This will emulate Unix display on your OS. (note: + Unix systems also need a X11 server, but it's built-in and handles + the video driver directly). In the case of MacOS 10 and QNX that both + use non-X11 display technology on top of a basically Unix OS, the + OS comes with a X11 server, but it may be on a "bundled software" + CD.</p> <br><b>method</b> open x11 <b>(</b><b>)</b> + synonym of "open x11 here". <br> + <br><b>method</b> open x11 here <b>(</b><b>)</b> + connects to the default X11 server, + according to your environment variable "DISPLAY". <br> + <br><b>method</b> open x11 local <b>(</b><i>integer</i> display_number<b>)</b> + connects to a display server on this machine. <br> + <br><b>method</b> open x11 remote <b>(</b><i>symbol</i> host_name<b>, </b><i>integer</i> display_number<b>)</b> + connects to a remote X11 display server using TCP. + Sorry, IP addresses are not supported. + Port number will be 6000 plus the display number, because + of the X11 standard. <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> + resizes the window to the size of the grid; + encodes that grid in the display's pixel format; + also displays it if autodraw > 0 + the values must be in range 0-255, + or else they will be "wrapped". <br> + <p> + Destroying the object (or sending "close") should close the window. </p> <p>because of the design of Xlib, or if any of the connections + involved crashes, then the whole program has to be terminated. + (don't you love xlib). Something similar happens if you close any + of the windows yourself, but IIRC this could be fixed.</p> <p>only one window may be used per connection (to simplify matters; + this doesn't reduce flexibility).</p> <p>there is an additional argument that may be added to every <kbd><font color="#007777">"open"</font></kbd> message; if you don't put it, a new toplevel window is created. + if you put "root" then the screen's wallpaper will be used instead + (it may fail to work with some popular window managers). You can also + put a window number, e.g. <kbd><font color="#007777">0x28003ff</font></kbd>, you may connect to + an existing window; you can find out the number of a window by using + a tool like <kbd><font color="#007777">xwininfo</font></kbd>, part of X11 standard tools.</p> <br><b>method</b> out_size <b>(</b><i>integer</i> height<b>, </b><i>integer</i> width<b>)</b> + changes the window's size, just like sending a grid + dim(height,width,3) would. + this affects the size of screen captures too. <br> + <br><b>method</b> draw <b>(</b><b>)</b> + forces a redraw of the window's contents. <br> + <br><b>method</b> autodraw <b>(</b><i>0,1,2</i> level<b>)</b> <ul> <li><b>0</b> : draw() is never automatically invoked</li> <li><b>1</b> : draw() is invoked after each grid is finished</li> <li><b>2</b> : draw() is invoked incrementally after each row is + received. (but buffering may cause lines to come in groups + anyway)</li> </ul> <br> + <br><b>method</b> setcursor <b>(</b><i>0..63</i> cursor<b>)</b> + Selects one of the 64 predefined cursors of X11. (Note that if + your cursor table has them numbered from 0 to 126 using only even + numbers, then those cursor numbers are all doubled compared to + the ones GridFlow uses.) <br> + <br><b>method</b> hidecursor <b>(</b><b>)</b> + This makes the cursor invisible. <br> + <br><b>outlet 0 </b><b>method</b> position <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>)</b> <p>This is emitted every time the cursor moves inside + the window connected to this format handler. This is also + emitted when the cursor is dragging from inside to outside + the window. This is also emitted when a mouse button is pressed.</p> <p>The y and x coordinates are relative to the upper + right corner of the window. Specific button states may be + extracted from the button value by applying [>> + buttonnumber] and then checking whether the result is odd. + Button numbers normally are: <ul> <li><b>0</b> : Shift</li> <li><b>1</b> : CapsLock</li> <li><b>2</b> : Control</li> <li><b>3</b> : Alternate</li> <li><b>4</b> : NumLock</li> <li><b>5</b> : ???</li> <li><b>6</b> : Meta</li> <li><b>7</b> : ScrollLock</li> <li><b>8</b> : Left Button</li> <li><b>9</b> : Middle Button</li> <li><b>10</b> : Right Button</li> <li><b>11</b> : Wheel Up</li> <li><b>12</b> : Wheel Down</li> </ul></p> <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br> + <br><b>outlet 0 </b><b>method</b> keypress <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>, </b><i>symbol</i> keyname<b>)</b> <p>Similar to <kbd><font color="#007777">position</font></kbd> above, but this is emitted when a + keyboard key is pressed while this format handler's window + is active. Keynames follow the X11 standard, similarly to PureData's [keyname] object. + The only exception is that keynames that are digits get prefixed by a capital D so that + they don't get mistaken for actual numbers.</p> <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br> + <br><b>outlet 0 </b><b>method</b> keyrelease <b>(</b><i>integer</i> y<b>, </b><i>integer</i> x<b>, </b><i>integer</i> buttons<b>, </b><i>symbol</i> keyname<b>)</b> + Same as keypress but when a key gets released instead. <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format quartz #out">format quartz #out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format quartz %23out-icon.png" alt="[format quartz #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + The equivalent of format x11 on MacOS 10.x, but with less features (sorry). <br><b>method</b> open <b>(</b><b>)</b> + opens a dim(240,320,3) rgb window (default). <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> + Sends image to screen. Window will be resized to fit the image exactly. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format sdl #out">format sdl #out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format sdl %23out-icon.png" alt="[format sdl #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> open <b>(</b><b>)</b> + Opens a dim(240,320,3) rgb window (default). <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> + Sends image to screen. Window will be resized to fit the image exactly. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format aalib #out">format aalib #out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format aalib %23out-icon.png" alt="[format aalib #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> open aalib <b>(</b>driver<b>, </b>args...<b>)</b> <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> + converts a greyscale image to an ascii image and possibly + displays it. note that the image is typically downscaled by + a factor of 2 by aalib itself. <br> + <br><b>method</b> grid <b>(</b><i>grid(rows columns {ascii attr})</i> grid<b>)</b> + the inverse of "dump". Both together in a loop allow to + post-process aalib's buffer before displaying. Goes well + with "draw", "autodraw". <br> + <br><b>method</b> print <b>(</b><i>int</i> y<b>, </b><i>int</i> x<b>, </b><i>int</i> attr<b>, </b><i>symbol</i> text<b>)</b> <br> + <br><b>method</b> autodraw <b>(</b><b>)</b> + like X11's autodraw. <br> + <br><b>method</b> draw <b>(</b><b>)</b> + like X11's draw. <br> + <br><b>method</b> dump <b>(</b><b>)</b> + produces a Dim[y,x,2] grid whose two channels are + ascii character codes and character attributes. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="format window #out">format window #out</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/format window %23out-icon.png" alt="[format window #out]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> open window <b>(</b><b>)</b> + Equivalent to "open x11", but this can be set by putting a line like + this in the config file: <kbd><font color="#007777">GridFlow.formats[:window] = GridFlow.formats[:x11]</font></kbd> + (and similarly other aliases can be created too) <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/format.xml b/externals/gridflow/doc/format.xml new file mode 100644 index 00000000..39f17cf3 --- /dev/null +++ b/externals/gridflow/doc/format.xml @@ -0,0 +1,780 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'jmax.dtd'> +<documentation title="Reference Manual: Format Classes"> +<!-- $Id: format.xml,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<!-- + GridFlow Reference Manual: Format Handler Reference + Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard +--> + +<section name="Objects for Input/Output"> + + <class name="#in"> + <icon text="[#in]"/> + <help text="[#in]" image="#inout"/> + + <method name="init" min="0"> + <arg name="format"/> + <rest name="format_specific_part"/> + + If no arguments given, creates an input object for an unspecified + format. You then need to use the <k>"open"</k> command to link + a format handler to it. + + If arguments given, the <k>"open"</k> command is immediately called + with those arguments. + + Remember that most formats produce Dim[rows,columns,3] grids with + 0-255 values. (Most.) + </method> + + <inlet id="0"> + <method name="open" min="1"> + <arg name="format"/> + <rest name="format_specific_part"/> + This is the command that gives a particular resource + to a <k>[#out]</k> object. This is done through a "format" + (there is a list of formats in this manual). The other + arguments depend on the chosen format. The format may + be a file format or a protocol or a hardware device, etc. + + The format called "file" is a special shortcut that autodetects the + type of file (by name suffix) and picks up the appropriate handler. + </method> + <method name="open"> + <arg name="filename"/> + This is a shortcut for <k>"open file"</k> followed by a filename. + The filename must contain a dot, else it will be seen as a handler name. + </method> + <method name="close"> + close may be necessary if you operate on <k>"/dev/video"</k>, + which can only be read by one at a time. otherwise it's + usually not necessary. + </method> + <method name="int"> + <arg name="frame_number"/> + selects one picture from a multi-picture format + and then does the same as a bang. + </method> + <method name="set"> + <arg name="frame_number"/> + selects one picture from a multi-picture format, + to be displayed by the next bang. + </method> + <method name="bang"> + sends a grid through the outlet. the grid may be the + result of reading from a file, acquiring from a device, + capturing from the screen etc. + + this is format-specific. most formats + produce grid(rows columns {red green blue}). + + In formats that read from a file, reading another picture + will continue if there are several pictures in the + same file, but if the end of file is reached instead, + it will rewind and send the first picture again. + + see section "External Picture Formats". + + </method> + <method name="option"> + <arg name="selector" type="symbol"/> + <rest name="stuff"/> + Obsolete. the word "option" is optional now. + </method> + <method name="rewind"> + rewinds to beginning of file if applicable. + </method> + <method name="loop"> + <arg name="flag" type="bool"/> + controls the automatic looping of movies. + </method> + </inlet> + + <outlet id="1"> + <method name="int"> + frame number of frame just sent, + for formats that have frame numbers. + </method> + + <method name="bang"> + tried to read a frame that does not exist + (signals end of file) + </method> + </outlet> + </class> + + <class name="#out"> + <icon text="[#out]"/> + <help text="[#out]" image="#inout"/> + + <method name="init" min="0"> + <arg name="format"/> + <rest name="format_specific_part"/> + + If no arguments given, creates an output object for an unspecified + format. You then need to use the <k>"open"</k> command to link + a format handler to it. + + If arguments given, the <k>"open"</k> command is immediately called + with those arguments. + + Remember that most formats expect dim(rows,columns,3) grids with + 0-255 values. (Most.) + </method> + <method name="init"> + <arg name="rows" type="integer"/> + <arg name="columns" type="integer"/> + + This alternate way to create an <k>[#out]</k> automatically calls + <k>"open window"</k> and <k>"out_size <i>rows columns</i>"</k>. + </method> + <inlet id="0"> + <method name="open" min="1"> + <arg name="format"/> + <rest name="format_specific_part"/> + This is the command that gives a particular resource + to a <k>[#out]</k> object. This is done through a "format" + (there is a list of formats in this manual). The other + arguments depend on the chosen format. The format may + be a file format or a protocol or a hardware device, etc. + </method> + <method name="open file"> + The format called "file" is a special shortcut that autodetects the + type of file (by name suffix) and picks up the appropriate handler. + </method> + <method name="open"> + <arg name="filename"/> + This is a shortcut for "open file" followed by a filename. + The filename must contain a dot, else it will be seen as a handler name. + </method> + <method name="grid"><arg name="grid" type="grid"/> + this is format-specific. most formats + expect grid(rows columns {red green blue}). + + In formats that write to a file, sending a 2nd picture + overwrites the first. + + see section "External Picture Formats". + </method> + <method name="close"> + closes the file. usually not necessary. + </method> + <method name="option"> + <arg name="selector" type="symbol"/> + <rest name="stuff"/> + Obsolete. Omit the word "option" now. + </method> + <method name="timelog"> + <arg name="status" type="0,1"/> + when status=1, current time (unix clock) and time since last + frame-end are printed in the console. when status=0, it is off. + default is 0. + </method> + <method name="rewind"> + rewinds to beginning of file if applicable. + will overwrite the previous data. + </method> + </inlet> + <outlet id="0"> + <method name="bang"> + sent when a complete grid has been received. + </method> + </outlet> + </class> + + <class name="#peephole"> + <p> + This object class only works with a X11-based version of Pd. + (e.g. on Linux, BSD, but not MacOS X). + </p> + <p>Similar to <k>[#out window]</k>, except it creates an inset in the patch you put it + in, and a scaled version of the picture appears in the inset. It also emits the same messages + as <k>[#out window]</k> and automatically scales cursor position according to the current scale factor. + The scale factor is decided automatically. + </p> + <method name="init"> + <arg name="height" type="int"/> + <arg name="width" type="int"/> + </method> + <p>All other methods are as in <k>[#out window]</k>.</p> + </class> + <class name="#mouse"> + This will process the "position" messages emitted by <k>[#out]</k> or <k>[#peephole]</k> in + useful ways. + <outlet id="0"><method name="list"> + y,x coords of a click + </method></outlet> + <outlet id="1"><method name="list"> + y,x coords of a drag (any button is kept pressed) + </method></outlet> + <outlet id="2"><method name="list"> + y,x coords of an unclick + </method></outlet> + <outlet id="3"><method name="list"> + y,x coords of a move (no button is pressed) + </method></outlet> + <outlet id="4"><method name="float" type="0,1">button 1 status</method></outlet> + <outlet id="5"><method name="float" type="0,1">button 2 status</method></outlet> + <outlet id="6"><method name="float" type="0,1">button 3 status</method></outlet> + <outlet id="7"><method name="float" type="-1,1"> + wheel difference: -1 = roll up; 1 = roll down. + </method></outlet> + </class> + <class name="#camera"> + Works about like <k>[#in videodev]</k> except you can right-click-open it to access all of the + camera settings visually. + </class> +</section> + +<section name="Picture/Movie Formats"> + + <class name="format ppm #in/#out"> + <icon image="format_ppm" text="[open filename.ppm]"/> + + <p>Subformat P6 only. + Max-number can only be 255 (24-bit RGB). + </p> + + <method name="open ppm file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + + <method name="open ppm gzfile"> + <arg name="filename" type="symbol"/> + same but for .ppm.gz files + </method> + + <method name="grid"> + <arg name="grid" type="grid(rows columns {r g b})"/> + values 0-255 + </method> + </class> + + <class name="format targa #in/#out"> + <icon image="format_targa" text="[open filename.tga]"/> + <p>Support for RGB-24 (3 channels) and RGBA-32 (4 channels)</p> + + <method name="open targa file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + + <method name="open targa gzfile"> + <arg name="filename" type="symbol"/> + same but for .tga.gz files + </method> + + <method name="grid"><arg name="grid" type="grid(rows columns 3)"/>RGB-24</method> + <method name="grid"><arg name="grid" type="grid(rows columns 4)"/>RGBA-32</method> + </class> + + <class name="format jpeg #in/#out"> + <!--<icon image="format_jpeg" text="[open foo.jpg]"/>--> + <p>Support for RGB non-progressive</p> + + <method name="open jpeg file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + + <method name="grid"> + <arg name="grid" type="grid(rows columns 3)"/>RGB-24 + </method> + </class> + + <class name="format png #in"> + <!--<icon image="format_jpeg" text="[open foo.jpg]"/>--> + <p>Support for RGB non-progressive</p> + + <method name="open png file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + + <method name="grid"><arg name="grid" type="grid(rows columns 1)"/>Y-8 (greyscale)</method> + <method name="grid"><arg name="grid" type="grid(rows columns 2)"/>YA-16 (greyscale and transparency)</method> + <method name="grid"><arg name="grid" type="grid(rows columns 3)"/>RGB-24 (colour)</method> + <method name="grid"><arg name="grid" type="grid(rows columns 4)"/>RGBA-32 (colour and transparency)</method> + </class> + + <class name="format quicktime #in/#out"> + <p>Support for .mov files.</p> + <p>This format supports frame-seek and frame-tell.</p> + <p>Uses the HW-QuickTime library aka QuickTime4Linux + (libquicktime.so). There is also a variant on the same library and that project + is just called LibQuickTime.</p> + <p>Some versions of those libraries may include support for different codecs, + and some also may support entirely different wrapper formats such as AVI.</p> + <p>On Macintosh, Apple QuickTime is used instead, but several of the following + messages may not be available.</p> + + <method name="open quicktime file"> + <arg name="filename" type="symbol" /> + </method> + <method name="codec"> + <arg name="codec" type="symbol"/> + Allowed values are at least: raw, jpeg, png, mjpa, yuv2, yuv4. + Some other values may allowed, depending on the version of the library + and which codec plugins are installed. + Must be set before the first frame is written. + only applies to <k>[#out]</k>. Choosing a codec is important + because codecs influence greatly the speed of + encoding, the speed of decoding, + the size of the written file, and its fidelity to the + original content. Note that there exist other Apple-QuickTime + codecs that are not supported by HW-QuickTime. + </method> + <method name="parameter"> + <arg name="key" type="symbol"/> + <arg name="value" type="int"/> + Sets special codec-specific settings. + For example: <k>"parameter jpeg_quality 75"</k> + </method> + <method name="framerate"> + <arg name="fps" type="int"/> + Sets the framerate of the file. + This is not used by GridFlow when reading a file, but other + programs usually care. + </method> + + <method name="colorspace"> + <arg name="colorspace" type="symbol"/> + Allowed values are rgb, rgba, bgr, bgra, yuv, yuva. + Normally you don't need this. + </method> + <method name="size"> + <arg name="height" type="int"/> + <arg name="width" type="int"/> + Forces a window size when writing. Usually this has to be used <u>after</u> + setting the framerate and codec and <u>before</u> setting the codec-parameters. + (Strange. Sorry.) + </method> + <method name="force_size"> + <arg name="height" type="int"/> + <arg name="width" type="int"/> + forces a window size when reading. + this is a workaround for a problem in HW-QuickTime. + </method> + </class> + + <class name="format mpeg #in"> + <icon image="format_mpeg" text="[open mpeg file filename.mpeg]"/> + <p>support for .mpeg files</p> + <p>this format supports frame-seek and frame-tell.</p> + <p>Two different libraries are available for dealing with + MPEG files. Those have different details, capabilities and quirks.</p> + <p>In any case, GridFlow does not support importing audio from + those files.</p> + <p>If you use the HeroineWarrior library, you may open several + mpeg files at once, but not with the GregWard library.</p> + <p>Libraries may scream error messages in a rude way.</p> + <p>By opposition to PPM and TARGA, this format driver only + allows a single MPEG stream per file (you cannot "cat" + several MPEG files together). + </p> + <p>Supports Rewind and Frame Select.</p> + <method name="open mpeg file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + </class> + + <class name="format grid #in/#out"> + <icon image="format_grid" text="[open grid file filename.grid]"/> + <icon image="format_grid_tcp" text="[open grid tcp artengine.ca 4242]"/> + <icon image="format_grid_tcpserver" text="[open grid tcpserver 4242]"/> + + <p> + This is GridFlow's special file format. This is the only I/O + format that can hold anything that the <k>[#store]</k> object can. + </p> + <p> + This is the picture format that would support TCP connections + if that feature actually worked. More on this later. + </p> + + <method name="open grid file"> + <arg name="filename" type="symbol"/> + opens the specified file, taken from the current + directory. + </method> + <method name="open grid gzfile"> + <arg name="filename" type="symbol"/> + same but for .grid.gz files + </method> + <method name="open grid tcp"> + <arg name="hostname" type="symbol"/> + <arg name="port" type="integer"/> + dials an specified hostname/port on the InterNet or + compatible network. the TCP protocol is used. + </method> + <method name="open grid tcpserver"> + <arg name="port" type="integer"/> + waits for a call (and answers) for this port on the + local machine via InterNet or compatible network. + Answers the call. + </method> + <method name="type int32"> + output will be as 32 bit signed integers. + </method> + <method name="type uint8"> + output will be as 8 bit unsigned integers. + </method> + <method name="headerful"> + cancels "headerless" (and back to reading .grid) + </method> + <method name="headerless"> + <rest name="dimensions" type="integer"/> + instead of reading .grid files with header, will read raw data, + faking a .grid header to itself. It will use the hereby specified + dimension list, as well as two other settings: + <k>type</k> and <k>endian</k>. + </method> + + <p>When writing "raw" data, a file may be considered a long string of + base 256 digits (called bytes), but different computers have different + conventions for dealing with them: + + <method name="endian" type="symbol(big|endian|same)"> + <list><li>big: + A number will be written starting with the biggest digit. + This is the natural way on the Macintosh, Sun, Amiga, and so on. + </li> + <li>little: + A number will be written starting with the smallest digit. + This is the natural way on the Intel 386/Pentium. + </li> + <li>same: + A number will be written in whichever way is more natural + on this computer. The natural way is slightly faster to handle. + This is the default setting. + </li> + </list> + </method> + </p> + </class> +</section> + +<section name="Acquisition Devices"> + + <class name="format videodev #in"> + <icon image="format_videodev" text="[open /dev/video0]"/> + + <method name="open"> + <arg name="device"/> + </method> + + <p>Video4Linux-1 devices, RGB-24 only. Variable picture size.</p> + + <p>We have been testing it using cards of the BT-848 family, + such as Miro DC10plus and Hauppauge WinTV, using the <k>bttv.o</k> linux driver. + Also we have been testing using Logitech QuickCam (and similar Labtec hardware), + but don't use the <k>qce-ga</k> driver, which is buggy and obsolete: the <k>qc-usb</k> + works better.</p> + + <p>Some hardware doesn't support RGB, so you may have to select a YUV colorspace + (see below) and then use <k>[#yuv_to_rgb]</k>. Don't forget to also do + <k>[# min 255]</k> and <k>[# max 0]</k>. + </p> + + <p>If for some reason there's a bug that causes a driver to produce BGR instead of RGB, + so that red and blue are swapped, you can swap them back by filtering through a RGB-BGR + converter, such as <k>[#inner * + 0 {3 3 # 0 0 1 0 1 0 1 0 0}]</k>.</p> + + <p>color adjustments: + <method name="brightness"><arg name="level" type="0-65535"/></method> + <method name="hue" ><arg name="level" type="0-65535"/></method> + <method name="colour" ><arg name="level" type="0-65535"/></method> + <method name="contrast" ><arg name="level" type="0-65535"/></method> + <method name="whiteness" ><arg name="level" type="0-65535"/></method> + </p> + <method name="get"> + <arg name="attr" type="symbol"/> + gets a specific attribute. a message is sent through right outlet. + valid attributes are: brightness, hue, colour, contrast, whiteness. + </method> + <method name="get"> + gets all attributes. + </method> + + <p>other options: + <method name="channel" ><arg type="integer"/></method> + <method name="tuner" ><arg type="integer"/></method> + <method name="norm" ><arg type="integer"/></method> + <method name="frequency" ><arg type="integer"/></method> + <method name="transfer" > + <arg type="symbol(read|mmap)"/> + <arg type="integer" default="2"/> + <list> + <li>mmap: + This is the normal (and fast) way of transferring pictures + from the camera. + </li> + <li>read: + Some cameras/drivers only support this instead of mmap. + </li></list> + In case of mmap, the extra numeric argument sets the + queue length in number of frames, so you can select an + appropriate tradeoff between efficiency and latency. + </method> + + <method name="colorspace"> + <arg name="colorspace" type="symbol"/> + Allowed values are: RGB24, YUV420P. + Use this if your driver doesn't support RGB24. + </method> + + <method name="size"> + <arg name="height"/> + <arg name="width"/> + sets the input size, especially when using a video digitalizer + device. + </method> + </p> + </class> +</section> + +<section name="Window Output"> + + <class name="format x11 #in/#out"> + <icon image="format_x11" text="[open window]"/> + <icon image="format_x11_remote" text="[open x11 remote artengine.ca 10]"/> + + <p>supports 15,16,24,32-bit truecolor displays</p> + + <p>now also support 8-bit indexed displays, using a private colormap + configured as 3:3:2 RGB. When using 8-bit you can specify the + "use_stripes" option to use a completely different color scheme + involving R,G,B diagonal stripes, a kind of 6:6:6 RGB spread over three + pixels.</p> + + <p>If you are using Windows or MacOS 10: you will have to install + a X11 server. This will emulate Unix display on your OS. (note: + Unix systems also need a X11 server, but it's built-in and handles + the video driver directly). In the case of MacOS 10 and QNX that both + use non-X11 display technology on top of a basically Unix OS, the + OS comes with a X11 server, but it may be on a "bundled software" + CD.</p> + + <method name="open x11"> + synonym of "open x11 here". + </method> + + <method name="open x11 here"> + connects to the default X11 server, + according to your environment variable "DISPLAY". + </method> + + <method name="open x11 local"> + <arg name="display_number" type="integer"/> + connects to a display server on this machine. + </method> + + <method name="open x11 remote"> + <arg name="host_name" type="symbol"/> + <arg name="display_number" type="integer"/> + connects to a remote X11 display server using TCP. + Sorry, IP addresses are not supported. + Port number will be 6000 plus the display number, because + of the X11 standard. + </method> + + <method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + resizes the window to the size of the grid; + encodes that grid in the display's pixel format; + also displays it if autodraw > 0 + the values must be in range 0-255, + or else they will be "wrapped". + </method> + + <p> + Destroying the object (or sending "close") should close the window. + </p> + + <p>because of the design of Xlib, or if any of the connections + involved crashes, then the whole program has to be terminated. + (don't you love xlib). Something similar happens if you close any + of the windows yourself, but IIRC this could be fixed.</p> + + <p>only one window may be used per connection (to simplify matters; + this doesn't reduce flexibility).</p> + + <p>there is an additional argument that may be added to every + <k>"open"</k> message; if you don't put it, a new toplevel window is created. + if you put "root" then the screen's wallpaper will be used instead + (it may fail to work with some popular window managers). You can also + put a window number, e.g. <k>0x28003ff</k>, you may connect to + an existing window; you can find out the number of a window by using + a tool like <k>xwininfo</k>, part of X11 standard tools.</p> + + <method name="out_size"> + <arg name="height" type="integer"/> + <arg name="width" type="integer"/> + changes the window's size, just like sending a grid + dim(height,width,3) would. + + this affects the size of screen captures too. + </method> + + <method name="draw"> + forces a redraw of the window's contents. + </method> + + <method name="autodraw"> + <arg name="level" type="0,1,2"/> + <list start="0"> + <li>draw() is never automatically invoked</li> + <li>draw() is invoked after each grid is finished</li> + <li>draw() is invoked incrementally after each row is + received. (but buffering may cause lines to come in groups + anyway)</li> + </list> + </method> + + <method name="setcursor"> + <arg name="cursor" type="0..63"/> + Selects one of the 64 predefined cursors of X11. (Note that if + your cursor table has them numbered from 0 to 126 using only even + numbers, then those cursor numbers are all doubled compared to + the ones GridFlow uses.) + </method> + + <method name="hidecursor"> + This makes the cursor invisible. + </method> + + <outlet id="0"> + <method name="position"> + <arg name="y" type="integer"/> + <arg name="x" type="integer"/> + <arg name="buttons" type="integer"/> + + <p>This is emitted every time the cursor moves inside + the window connected to this format handler. This is also + emitted when the cursor is dragging from inside to outside + the window. This is also emitted when a mouse button is pressed.</p> + + <p>The y and x coordinates are relative to the upper + right corner of the window. Specific button states may be + extracted from the button value by applying [>> + buttonnumber] and then checking whether the result is odd. + Button numbers normally are: + <list start="0"> + <li>Shift</li> + <li>CapsLock</li> + <li>Control</li> + <li>Alternate</li> + <li>NumLock</li> + <li>???</li> + <li>Meta</li> + <li>ScrollLock</li> + <li>Left Button</li> + <li>Middle Button</li> + <li>Right Button</li> + <li>Wheel Up</li> + <li>Wheel Down</li> + </list></p> + <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> + </method> + <method name="keypress"> + <arg name="y" type="integer"/> + <arg name="x" type="integer"/> + <arg name="buttons" type="integer"/> + <arg name="keyname" type="symbol"/> + <p>Similar to <k>position</k> above, but this is emitted when a + keyboard key is pressed while this format handler's window + is active. Keynames follow the X11 standard, similarly to PureData's [keyname] object. + The only exception is that keynames that are digits get prefixed by a capital D so that + they don't get mistaken for actual numbers.</p> + <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> + </method> + <method name="keyrelease"> + <arg name="y" type="integer"/> + <arg name="x" type="integer"/> + <arg name="buttons" type="integer"/> + <arg name="keyname" type="symbol"/> + Same as keypress but when a key gets released instead. + <p>NOTE: This message form may become longer in the future, but the already defined parts will stay the same.</p> + </method> + </outlet> + </class> + + <class name="format quartz #out"> + The equivalent of format x11 on MacOS 10.x, but with less features (sorry). + <method name="open"> + opens a dim(240,320,3) rgb window (default). + </method> + <method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + Sends image to screen. Window will be resized to fit the image exactly. + </method> + </class> + + <class name="format sdl #out"> + <method name="open"> + Opens a dim(240,320,3) rgb window (default). + </method> + <method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + Sends image to screen. Window will be resized to fit the image exactly. + </method> + </class> + + <class name="format aalib #out"> + <method name="open aalib"> + <arg name="driver"> + Normally "X11" with uppercase X; else consult + the AALib manual. + </arg> + <rest name="args"> + You can pass "commandline options" of AALib here. + </rest> + </method> + <method name="grid"> + <arg name="grid" type="grid(rows columns {white})"/> + converts a greyscale image to an ascii image and possibly + displays it. note that the image is typically downscaled by + a factor of 2 by aalib itself. + </method> + <method name="grid"> + <arg name="grid" type="grid(rows columns {ascii attr})"/> + the inverse of "dump". Both together in a loop allow to + post-process aalib's buffer before displaying. Goes well + with "draw", "autodraw". + </method> + <method name="print"> + <arg name="y" type="int"/> + <arg name="x" type="int"/> + <arg name="attr" type="int"/> + <arg name="text" type="symbol"/> + </method> + <method name="autodraw"> + like X11's autodraw. + </method> + <method name="draw"> + like X11's draw. + </method> + <method name="dump"> + produces a Dim[y,x,2] grid whose two channels are + ascii character codes and character attributes. + </method> + </class> + + <class name="format window #out"> + <method name="open window"> + Equivalent to "open x11", but this can be set by putting a line like + this in the config file: <k>GridFlow.formats[:window] = GridFlow.formats[:x11]</k> + (and similarly other aliases can be created too) + </method> + </class> +</section> + +</documentation> diff --git a/externals/gridflow/doc/index.html b/externals/gridflow/doc/index.html new file mode 100644 index 00000000..d223442b --- /dev/null +++ b/externals/gridflow/doc/index.html @@ -0,0 +1,149 @@ +<html> +<head> +<title>GridFlow 0.8.0</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> + +<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> +<br> +<table width="100%" border="0" cellspacing="5"> + <tr><td colspan="4" bgcolor="#082069"> + <img src="images/titre_gridflow.png" width="253" height="23"></td></tr> + + <tr> + <td rowspan="2" width="14%"> </td> + <td colspan="2" width="100%"> </td> + <td rowspan="10" width="12%"> </td> + </tr> + + <tr> + <td colspan="2"> + <p> + a multi-dimensional dataflow processing library + for PureData and Ruby, specialized in image and video<br> + </p> + </td> + </tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + <tr><td colspan="3" height="16"> + <h4>GridFlow 0.8.0 - documentation index</h4> + </td></tr> + + <tr> + <td width="14%" rowspan=2> </td> + <td colspan="2"><ul> + <li><a href="license.html">License</a></li> + <li><a href="introduction.html">Introduction</a></li> + <li><a href="install.html">Installation</a></li> + <li><a href="architecture.html">Reference Manual: Architecture and Concepts</a></li> + <li><a href="reference.html">Reference Manual: Flow Classes</a></li> + <li><a href="format.html">Reference Manual: Format Handlers</a></li> + <li><a href="internals.html">Reference Manual: C++/Ruby Internals</a></li> + <li><a href="profiling.html">Profiling</a></li> + <!-- <p> <a href="project_policy.html">Project Policy</a></p> --> + </ul></td></tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + <tr><td colspan="4"><h4>GridFlow On The Net</h4></td></tr> + <tr><td rowspan=2> </td><td><ul> + <li><a href="http://gridflow.ca/latest"> + Browse GridFlow documentation and source code on the web + </a></li> + <li><a href="http://www.artengine.ca/gridflow/download"> + Download GridFlow and related files + </a></li> + <li>Or checkout using the CVS protocol (no password): + <kbd>cvs -d :pserver:anonymous@artengine.ca:/home/cvs/gridflow checkout .</kbd> + </li> + <li><a href="http://www.artengine.ca/viewcvs/gridflow/"> + Browse GridFlow CVS on the Web + </a></li> + <li><a href="http://artengine.ca/~tiki/tiki-view_faq.php?faqId=1"> + GridFlow Frequently Asked Questions (on wiki) + </a></li> + <li>Mailing Lists (Subscription and Archives): <ul> + <li><a href="http://ns.artengine.ca/mailman/listinfo/gridflow-dev"> + <kbd>gridflow-dev</kbd>: GridFlow Contributors + </a></li> + <li><a href="http://ns.artengine.ca/mailman/listinfo/gridflow-cvs"> + <kbd>gridflow-cvs</kbd>: GridFlow CVS Reports + </a></li> + <li><a href="http://ns.artengine.ca/mailman/listinfo/pdmtl"> + <kbd>pdmtl</kbd>: PureData Montréal Users Group + </a></li> + </ul> + <li><a href="http://www.puredata.org">PureData Community Site</a></li> + <li><a href="http://www.ruby-lang.org/">Ruby Home Page</a></li> + <li> + Join us on IRC at + <table bgcolor="black" border="0"><tr><td> + <table bgcolor="white" border="0" cellpadding="4" cellspacing="1"> + <tr><td width=1><b>host</b></td><td width=1><kbd>irc.freenode.net</kbd></td></tr> + <tr><td><b>port</b></td><td><kbd>6667</kbd></td></tr> + <tr><td><b>channel</b></td><td><kbd>#dataflow</kbd></td></tr> + </table> + </table> + </li> + + <li>See also : + <ul> + <li>Danks/Geiger/Zmölnig's <a href="http://GEM.iem.at/GEM">GEM (video plugin for PureData)</a> + </li> + <li>Tom Schouten's <a href="http://zwizwa.fartit.com/pd/">PDP (video plugin for PureData)</a></li> + <li><a href="http://www.opendragon.ca/">OpenDragon (externals collection for Max)</a></li> + <li>NATO (QuickTime library wrapper for Max)</li> + <li>David Rokeby's SoftVNS (for Max)</li> + <li>JKClayton/Cycling74's + <a href="http://www.cycling74.com/products/jitter.html">Jitter (for Max)</a></li> + <li>APL (Array Programming Language)</li> + <li>J (modern APL)</li> + <li><a href="http://pdl.perl.org/">PDL (APL for Perl)</a></li> + <li>Ruby NArray: + <a href="http://www.ir.isas.ac.jp/~masa/ruby/index.html">japanese page</a>; + <a href="http://www.ir.isas.ac.jp/~masa/ruby/index-e.html">english page</a></li> + <li><a href="http://www.gstreamer.net/">gstreamer (video for Gnome/Kde)</a></li> + <li><a href="http://www.arts-project.org/">aRts (audio for Kde)</a></li> + <li><a href="http://www.dai.ed.ac.uk/HIPR2/wksheets.htm"> + Image Processing Operator Worksheets</a></li> + <li><a href="http://freej.dyne.org/">FreeJ</a></li> + </ul> + +</ul></li> + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + <tr><td colspan="4"><h4>Credits</h4></td></tr> + <tr><td rowspan=2> </td><td> + + C++/Ruby Programming : Mathieu Bouchard<br> + Pd Examples : Mathieu Bouchard, Alexandre Castonguay<br> + MacOS 10 version : Mathieu Bouchard, James Tittle, Adam Lindsay<br> + Windows version (upcoming) : Carmen Rocco<br> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + <tr><td colspan="4"><h4>Sponsors</h4></td></tr> + <tr><td rowspan=2> </td><td> + + <p>GridFlow is sponsored by + <a href="http://www.artengine.org">Artengine</a></p> + + <p>Development of GridFlow 0.3.0 - 0.5.0 was made possible in part by a grant from the + <a href="http://www.hrdc-drhc.gc.ca/">HRDC</a> to <a href="http://www.artengine.org">Artengine</a></p> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="4"> + <p><font size="-1">GridFlow 0.8.0 Documentation<br> + by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a> + and<br> + Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p> + </td> + </tr> +</table> +</body> +</html> diff --git a/externals/gridflow/doc/install.html b/externals/gridflow/doc/install.html new file mode 100644 index 00000000..e65652e3 --- /dev/null +++ b/externals/gridflow/doc/install.html @@ -0,0 +1,122 @@ +<html><head> +<!-- $Id: install.html,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<title>GridFlow 0.8.0 - Installation</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - Installation</h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="1"><h4><a href="#Hardware_and_Software_you_Probably_Need">Hardware and Software you Probably Need</a></h4><ul> +</ul> +<h4><a href="#Downloading_from_CVS">Downloading from CVS</a></h4><ul> +</ul> +<h4><a href="#Installation_instructions_(incl._compilation)">Installation instructions (incl. compilation)</a></h4><ul> +</ul> +<h4><a href="#Other_Tips">Other Tips</a></h4><ul> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Hardware_and_Software_you_Probably_Need"></a><h4>Hardware and Software you Probably Need</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Required Computer/Processor (one of...):<ul> <li><b>1</b> : PC : AMD K6/K7/K8 or Intel P2/P3/P4 (absolute minimum is 386)</li> <li><b>2</b> : Macintosh : G3/G4/G5</li> <li><b>3</b> : Corel NetWinder : StrongARM V4L</li> <li><b>4</b> : HP iPaq : some processor that works like the NetWinder</li> <li><b>5</b> : could work on SiliconGraphics and SPARCstation with a little nurture.</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Required OS (one of...):<ul> <li><b>1</b> : Linux (most any variant) (recommended)</li> <li><b>2</b> : MacOS 10.2 or later (experimental)</li> <li><b>3</b> : Windows with MinGW (very experimental)</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Required Software:<ul> <li><b>1</b> : Ruby 1.6.6 or more recent (1.8.0 recommended) (make sure you have the *.so and *.h files) + (on MacOS you may have to remove or hide the existing one and install a more complete package)</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Dataflow Software :<ul> <li><b>1</b> : PureData 0.36 or later (recommended)</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Multimedia Components (optional):<ul> <li><b>1</b> : libSDL (Simple Directmedia Layer)</li> <li><b>2</b> : libjpeg</li> <li><b>3</b> : libpng</li> <li><b>4</b> : libmpeg3 (.mpg reader, HeroineWarrior's)</li> <li><b>5</b> : libquicktime (.mov reader/writer, Burkhard Plaum's or HeroineWarrior's) </li> <li><b>6</b> : libmpeg (.mpg reader, Greg Ward's, old)</li> <li><b>7</b> : Apple QuickTime (.mov reader/writer)</li> <li><b>8</b> : Ascii Art Library (aalib)</li> <li><b>9</b> : PCI video digitizer card (and Video4linux 1 driver)</li> <li><b>10</b> : USB camera (and Video4linux 1 driver)</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Developer Tools (roll-your-own):<ul> <li><b>1</b> : GNU C++ Compiler (gcc/g++) version 3.x or maybe 2.95</li> <li><b>2</b> : GNU Make (gmake)</li> <li><b>3</b> : CVS (for upgrading/collaboration)</li> <li><b>4</b> : Ruby library "xmlparser" (optional, for editing documentation)</li> <li><b>5</b> : Developer Tools CD dec 2002 (if MacOS 10.2)</li> <li><b>6</b> : XCODE (if MacOS 10.3)</li> <li><b>7</b> : FINK (if MacOS 10)</li> </ul></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>NOTE: Apparently GCC 2.x has problems dealing with *.a components; if that +affects you, use *.so files instead.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Downloading_from_CVS"></a><h4>Downloading from CVS</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>The CVS has the absolute latest version of GridFlow, but it's not guaranteed to be working, whereas +the actual releases are more tested.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>However you may have various reasons to use the CVS edition, so here's how:</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Make sure you have the <kbd><font color="#007777">cvs</font></kbd> program installed.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">mkdir -p ~/src/gridflow</font></kbd> (make a directory; it could be called otherwise if you like)</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">cd ~/src/gridflow</font></kbd> (go in that directory)</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow login</font></kbd> (the password is blank)</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow checkout .</font></kbd> (download the first time)</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>And the subsequent times, you only do this:</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">cd ~/src/gridflow</font></kbd></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p><kbd><font color="#007777">cvs update -dP</font></kbd></p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Installation_instructions_(incl._compilation)"></a><h4>Installation instructions (incl. compilation)</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><ul> <li><b>1</b> : Install Ruby. Make sure it contains <kbd><font color="#007777">ruby.h</font></kbd> and <kbd><font color="#007777">intern.h</font></kbd> and related files. It's also +recommended to have <kbd><font color="#007777">libruby.so</font></kbd>. Those extra files may be in a package called <kbd><font color="#007777">ruby-dev</font></kbd> +if you are using RPM or DEB/FINK. If you are building Ruby yourself, it's better to configure ruby with <kbd><font color="#007777">--enable-shared</font></kbd>. If you install into a system directory, you may have to run <kbd><font color="#007777">ldconfig</font></kbd> +after installing Ruby.</li> <li><b>2</b> : Download GridFlow from the website and uncompress it, or get it from the CVS server.</li> <li><b>3</b> : Run <kbd><font color="#007777">./configure</font></kbd> from the <kbd><font color="#007777">gridflow</font></kbd> directory. Make sure it detects all the components +you want to use with GridFlow. In MacOS you would normally use FINK to install: <kbd><font color="#007777">libjpeg libjpeg-shlibs libpng-shlibs libpng3 libpng3-shlibs libmpeg libmpeg-shlibs</font></kbd> </li> <li><b>4</b> : Note: you may have to set <kbd><font color="#007777">CPLUS_INCLUDE_PATH</font></kbd> to indicate where to find *.h files, and you +may have to set both <kbd><font color="#007777">LIBRARY_PATH</font></kbd> and <kbd><font color="#007777">LD_LIBRARY_PATH</font></kbd> to indicate where to find +*.so or *.aor *.dylib or *.bundle or *.dll or *.lib files.</li> <li><b>5</b> : Note: you can do <kbd><font color="#007777">./configure --help</font></kbd> to get a list of supported +options. You can use them to ignore the presence of troublesome libraries +and select debugging level. With <kbd><font color="#007777">--use-compiler</font></kbd> you should use a version of <kbd><font color="#007777">g++</font></kbd>, not +directly a version of <kbd><font color="#007777">gcc</font></kbd>, else you get <kbd><font color="#007777">undefined symbol</font></kbd> problems. Some versions of gcc/g++ +are troublesome.</li> <li><b>6</b> : Run <kbd><font color="#007777">make</font></kbd> to produce the executables <kbd><font color="#007777">gridflow.so</font></kbd> and <kbd><font color="#007777">gridflow.pd_linux</font></kbd> or similar</li> <li><b>7</b> : Run <kbd><font color="#007777">make install</font></kbd> to copy those executables and related files to their final locations.</li> <li><b>8</b> : Run <kbd><font color="#007777">make test</font></kbd> just to verify that GridFlow isn't working too bad.</li> <li><b>9</b> : With a text editor, create <kbd><font color="#007777">~/.gridflow_startup</font></kbd> and write something like <kbd><font color="#007777">GridFlow.data_path << "/home/myself/gridflow/images"</font></kbd> to tell GridFlow where to find the +images used in the examples. You may add more lines like that one if you have folders containing images +or movies you want to use with GridFlow.</li> <li><b>10</b> : Loading GridFlow:<ul> <li><b>1</b> : PureData : With a text editor, modify or create <kbd><font color="#007777">~/.pdrc</font></kbd> and write <kbd><font color="#007777">-lib gridflow</font></kbd>. </li> <li><b>2</b> : ImpureData : In the ".pdrc editor", add <kbd><font color="#007777">gridflow</font></kbd> to the list of libraries.</li> <li><b>3</b> : plain Ruby : the command <kbd><font color="#007777">require "gridflow"</font></kbd> will load gridflow.so.</li> </ul> +Note that on MacOS the dot-files are invisible in the Finder but you do <kbd><font color="#007777">cd ~/Desktop; ln -s ../.pdrc "PureData Configuration"</font></kbd> to make an alias on the Desktop. +Note also that on Windows the dot-files are even more trouble.</li> </ul></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Other_Tips"></a><h4>Other Tips</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><ul> <li><b>1</b> : you just did a CVS update and now the program does not compile, or +crashes, or changes didn't go through. <ul> <li><b>1</b> : Did you forget the "make install" step?</li> <li><b>2</b> : If a new directory is created, you need to do <kbd><font color="#007777">cvs update -d</font></kbd>. + Many people just add that option to their configuration of the CVS software.</li> <li><b>3</b> : When some kinds of changes have happened, you may have to rerun the <kbd><font color="#007777">configure</font></kbd> + program before redoing <kbd><font color="#007777">make</font></kbd>. If you had previously reconfigured with specific options, + don't forget to use them again in this case.</li> <li><b>4</b> : Maybe matju forgot to upload part of an important change. Tell him.</li> </ul></li> <li><b>2</b> : PureData Crashing: <ul> <li><b>1</b> : you can start the debugger like <kbd><font color="#007777">gdb `which pd` core.24255</font></kbd> where the latter part + is the name of a RAM dump file. You can enable those dumps using the shell command <kbd><font color="#007777">ulimit -c unlimited</font></kbd>. To avoid dumping, you can also start Pd from within the debugger + using <kbd><font color="#007777">gdb `which pd`</font></kbd> then <kbd><font color="#007777">run</font></kbd> then cause the crash.</li> <li><b>2</b> : In GDB, after a crash, you can use the <kbd><font color="#007777">where</font></kbd> to find out what Pd was doing at the moment + of the crash. If instead Pd is frozen, you can force it to crash using Ctrl+C in the terminal. </li> <li><b>3</b> : To quit GDB use the <kbd><font color="#007777">quit</font></kbd> command. (really.)</li> </ul></li> </ul></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/install.xml b/externals/gridflow/doc/install.xml new file mode 100644 index 00000000..6a45e224 --- /dev/null +++ b/externals/gridflow/doc/install.xml @@ -0,0 +1,140 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'jmax.dtd'> +<documentation title="Installation"> +<!-- $Id: install.xml,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<!-- + GridFlow Installation + Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard +--> +<section name="Hardware and Software you Probably Need"> +<p>Required Computer/Processor (one of...):<list> + <li>PC : AMD K6/K7/K8 or Intel P2/P3/P4 (absolute minimum is 386)</li> + <li>Macintosh : G3/G4/G5</li> + <li>Corel NetWinder : StrongARM V4L</li> + <li>HP iPaq : some processor that works like the NetWinder</li> + <li>could work on SiliconGraphics and SPARCstation with a little nurture.</li> +</list></p> +<p>Required OS (one of...):<list> + <li>Linux (most any variant) (recommended)</li> + <li>MacOS 10.2 or later (experimental)</li> + <li>Windows with MinGW (very experimental)</li> +</list></p> +<p>Required Software:<list> + <li>Ruby 1.6.6 or more recent (1.8.0 recommended) (make sure you have the *.so and *.h files) + (on MacOS you may have to remove or hide the existing one and install a more complete package)</li> +</list></p> +<p>Dataflow Software :<list> + <li>PureData 0.36 or later (recommended)</li> +</list></p> +<p>Multimedia Components (optional):<list> + <li>libSDL (Simple Directmedia Layer)</li> + <li>libjpeg</li> + <li>libpng</li> + <li>libmpeg3 (.mpg reader, HeroineWarrior's)</li> + <li>libquicktime (.mov reader/writer, Burkhard Plaum's or HeroineWarrior's) </li> + <li>libmpeg (.mpg reader, Greg Ward's, old)</li> + <li>Apple QuickTime (.mov reader/writer)</li> + <li>Ascii Art Library (aalib)</li> + <li>PCI video digitizer card (and Video4linux 1 driver)</li> + <li>USB camera (and Video4linux 1 driver)</li> +</list></p> +<p>Developer Tools (roll-your-own):<list> + <li>GNU C++ Compiler (gcc/g++) version 3.x or maybe 2.95</li> + <li>GNU Make (gmake)</li> + <li>CVS (for upgrading/collaboration)</li> + <li>Ruby library "xmlparser" (optional, for editing documentation)</li> + <li>Developer Tools CD dec 2002 (if MacOS 10.2)</li> + <li>XCODE (if MacOS 10.3)</li> + <li>FINK (if MacOS 10)</li> +</list></p> +<p>NOTE: Apparently GCC 2.x has problems dealing with *.a components; if that +affects you, use *.so files instead.</p> +</section> + +<section name="Downloading from CVS"> +<p>The CVS has the absolute latest version of GridFlow, but it's not guaranteed to be working, whereas +the actual releases are more tested.</p> +<p>However you may have various reasons to use the CVS edition, so here's how:</p> +<p>Make sure you have the <k>cvs</k> program installed.</p> +<p><k>mkdir -p ~/src/gridflow</k> (make a directory; it could be called otherwise if you like)</p> +<p><k>cd ~/src/gridflow</k> (go in that directory)</p> +<p><k>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow login</k> (the password is blank)</p> +<p><k>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow checkout .</k> (download the first time)</p> +<p>And the subsequent times, you only do this:</p> +<p><k>cd ~/src/gridflow</k></p> +<p><k>cvs update -dP</k></p> +</section> + +<section name="Installation instructions (incl. compilation)"> +<list> +<li>Install Ruby. Make sure it contains <k>ruby.h</k> and <k>intern.h</k> and related files. It's also +recommended to have <k>libruby.so</k>. Those extra files may be in a package called <k>ruby-dev</k> +if you are using RPM or DEB/FINK. If you are building Ruby yourself, it's better to configure ruby with +<k>--enable-shared</k>. If you install into a system directory, you may have to run <k>ldconfig</k> +after installing Ruby.</li> + +<li>Download GridFlow from the website and uncompress it, or get it from the CVS server.</li> + +<li>Run <k>./configure</k> from the <k>gridflow</k> directory. Make sure it detects all the components +you want to use with GridFlow. In MacOS you would normally use FINK to install: + <k>libjpeg libjpeg-shlibs libpng-shlibs libpng3 libpng3-shlibs libmpeg libmpeg-shlibs</k> +</li> + +<li>Note: you may have to set <k>CPLUS_INCLUDE_PATH</k> to indicate where to find *.h files, and you +may have to set both <k>LIBRARY_PATH</k> and <k>LD_LIBRARY_PATH</k> to indicate where to find +*.so or *.aor *.dylib or *.bundle or *.dll or *.lib files.</li> + +<li>Note: you can do <k>./configure --help</k> to get a list of supported +options. You can use them to ignore the presence of troublesome libraries +and select debugging level. With <k>--use-compiler</k> you should use a version of <k>g++</k>, not +directly a version of <k>gcc</k>, else you get <k>undefined symbol</k> problems. Some versions of gcc/g++ +are troublesome.</li> + +<li>Run <k>make</k> to produce the executables <k>gridflow.so</k> and <k>gridflow.pd_linux</k> or similar</li> +<li>Run <k>make install</k> to copy those executables and related files to their final locations.</li> +<li>Run <k>make test</k> just to verify that GridFlow isn't working too bad.</li> +<li>With a text editor, create <k>~/.gridflow_startup</k> and write something like +<k>GridFlow.data_path << "/home/myself/gridflow/images"</k> to tell GridFlow where to find the +images used in the examples. You may add more lines like that one if you have folders containing images +or movies you want to use with GridFlow.</li> +<li>Loading GridFlow:<list> + <li>PureData : With a text editor, modify or create <k>~/.pdrc</k> and write <k>-lib gridflow</k>. </li> + <li>ImpureData : In the ".pdrc editor", add <k>gridflow</k> to the list of libraries.</li> + <li>plain Ruby : the command <k>require "gridflow"</k> will load gridflow.so.</li> +</list> +Note that on MacOS the dot-files are invisible in the Finder but you do +<k>cd ~/Desktop; ln -s ../.pdrc "PureData Configuration"</k> to make an alias on the Desktop. +Note also that on Windows the dot-files are even more trouble.</li> +</list> +</section> + +<section name="Other Tips"> +<list> + +<li>you just did a CVS update and now the program does not compile, or +crashes, or changes didn't go through. + <list> + <li>Did you forget the "make install" step?</li> + <li>If a new directory is created, you need to do <k>cvs update -d</k>. + Many people just add that option to their configuration of the CVS software.</li> + <li>When some kinds of changes have happened, you may have to rerun the <k>configure</k> + program before redoing <k>make</k>. If you had previously reconfigured with specific options, + don't forget to use them again in this case.</li> + <li>Maybe matju forgot to upload part of an important change. Tell him.</li> + </list></li> + + +<li>PureData Crashing: + <list> + <li>you can start the debugger like <k>gdb `which pd` core.24255</k> where the latter part + is the name of a RAM dump file. You can enable those dumps using the shell command + <k>ulimit -c unlimited</k>. To avoid dumping, you can also start Pd from within the debugger + using <k>gdb `which pd`</k> then <k>run</k> then cause the crash.</li> + <li>In GDB, after a crash, you can use the <k>where</k> to find out what Pd was doing at the moment + of the crash. If instead Pd is frozen, you can force it to crash using Ctrl+C in the terminal. + </li> + <li>To quit GDB use the <k>quit</k> command. (really.)</li> +</list></li> +</list> +</section> +</documentation> diff --git a/externals/gridflow/doc/internals.html b/externals/gridflow/doc/internals.html new file mode 100644 index 00000000..dfc51b73 --- /dev/null +++ b/externals/gridflow/doc/internals.html @@ -0,0 +1,206 @@ +<html><head> +<!-- $Id: internals.html,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<title>GridFlow 0.8.0 - C++/Ruby Internals</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - C++/Ruby Internals</h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="1"><h4><a href="#notes">notes</a></h4><ul> +</ul> +<h4><a href="#Objects_for_Scripting">Objects for Scripting</a></h4><ul> +<li><a href="#ruby class FObject extending Data"><img src="flow_classes/ruby class FObject extending Data-icon.png" alt="[ruby class FObject extending Data]" border="0"></a></li> +<li><a href="#ruby class GridObject extending FObject"><img src="flow_classes/ruby class GridObject extending FObject-icon.png" alt="[ruby class GridObject extending FObject]" border="0"></a></li> +<li><a href="#ruby class BitPacking"><img src="flow_classes/ruby class BitPacking-icon.png" alt="[ruby class BitPacking]" border="0"></a></li> +<li><a href="#ruby FPatcher extending FObject"><img src="flow_classes/ruby FPatcher extending FObject-icon.png" alt="[ruby FPatcher extending FObject]" border="0"></a></li> +<li><a href="#ruby GridFlow::USB"><img src="flow_classes/ruby GridFlow::USB-icon.png" alt="[ruby GridFlow::USB]" border="0"></a></li> +<li><a href="#ruby GridFlow::USB::Device"><img src="flow_classes/ruby GridFlow::USB::Device-icon.png" alt="[ruby GridFlow::USB::Device]" border="0"></a></li> +<li><a href="#ruby GridFlow::USB::Config"><img src="flow_classes/ruby GridFlow::USB::Config-icon.png" alt="[ruby GridFlow::USB::Config]" border="0"></a></li> +<li><a href="#ruby GridFlow::USB::Interface"><img src="flow_classes/ruby GridFlow::USB::Interface-icon.png" alt="[ruby GridFlow::USB::Interface]" border="0"></a></li> +<li><a href="#ruby GridFlow::USB::Endpoint"><img src="flow_classes/ruby GridFlow::USB::Endpoint-icon.png" alt="[ruby GridFlow::USB::Endpoint]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Internals">Objects for Internals</a></h4><ul> +<li><a href="#C++ class GridInlet"><img src="flow_classes/C++ class GridInlet-icon.png" alt="[C++ class GridInlet]" border="0"></a></li> +<li><a href="#C++ class GridOutlet"><img src="flow_classes/C++ class GridOutlet-icon.png" alt="[C++ class GridOutlet]" border="0"></a></li> +<li><a href="#C++ class Dim"><img src="flow_classes/C++ class Dim-icon.png" alt="[C++ class Dim]" border="0"></a></li> +<li><a href="#C++ class Grid"><img src="flow_classes/C++ class Grid-icon.png" alt="[C++ class Grid]" border="0"></a></li> +<li><a href="#C++ class Numop1"><img src="flow_classes/C++ class Numop1-icon.png" alt="[C++ class Numop1]" border="0"></a></li> +<li><a href="#C++ class Numop2"><img src="flow_classes/C++ class Numop2-icon.png" alt="[C++ class Numop2]" border="0"></a></li> +<li><a href="#C++ class GridClass"><img src="flow_classes/C++ class GridClass-icon.png" alt="[C++ class GridClass]" border="0"></a></li> +<li><a href="#C++ class GFBridge"><img src="flow_classes/C++ class GFBridge-icon.png" alt="[C++ class GFBridge]" border="0"></a></li> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="notes"></a><h4>notes</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In Ruby, GridFlow defines a namespace (module) called GridFlow. Most of the +constants it defines are part of that namespace.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>Ruby does not have the same concept of object as PD. In GridFlow, object classes may +inherit features from other object classes, and also there is no concept of inlet nor outlet, which are instead +provided by <kbd><font color="#007777">GridFlow::FObject</font></kbd>, which also has the purpose of exporting functionality to +PD.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>In this document (and in many others) the phrase "a Potato" will be a shorthand for "an object of the class +called Potato", which is often used in modern software design and is a nice convention borrowed from +biology.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> +A FObject is normally in two or three parts: a (Ruby) GridFlow::FObject +that is the central part; a (C++) FObject; a (C++) BFObject. +The GridFlow::FObject is created as a RData kind of box (T_DATA) +using Ruby-C's Data_Make_Struct on a GridObject. This is +how most Ruby-C programs inherit from Ruby classes. Note that +Ruby's boxed objects have a maximum of five fields, and they're usually +taken, so additional fields have to be outside of it. This is why RData exists. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p> +So basically you have a C++ FObject that is "part of" a GridFlow::FObject +and they point to each other using "peer pointers". + The BFObject links back to the RData box through a pointer called peer. </p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Scripting"></a><h4>Objects for Scripting</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby class FObject extending Data">ruby class FObject extending Data</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + Provides inlets and outlets to Ruby Objects. <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>method</b> send_in <b>(</b><i>int</i> inlet<b>, </b>message...<b>)</b> <br> + <br><b>method</b> send_out <b>(</b><i>int</i> outlet<b>, </b>message...<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby class GridObject extending FObject">ruby class GridObject extending FObject</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + Provides grid support to FObjects. <br><b>method</b> inlet_dim <b>(</b><i>Integer</i> inlet<b>)</b> + gives an array of Integers (dimension list) <br> + <br><b>method</b> inlet_nt <b>(</b><i>Integer</i> inlet<b>)</b> + gives a Symbol (number type) <br> + <br><b>method</b> inlet_set_factor <b>(</b><i>Integer</i> inlet<b>, </b><i>Integer</i> factor<b>)</b> + ensures received packets have a size that is + a whole multiple of this size. + must be called from rgrid_begin. <br> + <br><b>method</b> send_out_grid_begin <b>(</b><i>Integer</i> outlet<b>, </b><i>Array of Integer</i> dimensions<b>, </b><i>number type</i> nt<b>)</b> + establishes grid streams between an outlet and all inlets + connected to it. <br> + <br><b>method</b> send_out_grid_flow <b>(</b><i>Integer</i> outlet<b>, </b><i>String</i> data<b>)</b> + for sending a grid data packet through that outlet. <br> + <br><b>method</b> send_out_grid_end <b>(</b><i>Integer</i> outlet<b>)</b> + (isn't this one obsolete?) <br> + <br><b>inlet 0 </b><b>method</b> rgrid_begin <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> rgrid_flow <b>(</b><i>String</i> data<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> rgrid_end <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby class BitPacking">ruby class BitPacking</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + A BitPacking is a simple two-way converter between different + numeric layouts. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby FPatcher extending FObject">ruby FPatcher extending FObject</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>This class is much like PureData's abstractions.</p> <p>This is a container for objects. Its proper objects are numbered + starting with zero. The wire list is given in terms of those numbers: + (sourceobject,sourceinlet,destobject,destinlet). There is a + pseudo-object numbered #-1 which map to the container's own inlets + and outlets.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby GridFlow::USB">ruby GridFlow::USB</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> +<p>wrapper for struct usb_dev_handle</p> <br><b>attr</b> .busses <b>(</b><b>.busses</b><b>)</b> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby GridFlow::USB::Device">ruby GridFlow::USB::Device</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>wrapper for struct usb_device and struct usb_device_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby GridFlow::USB::Config">ruby GridFlow::USB::Config</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>wrapper for struct usb_config_descriptor, struct usb_interface</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby GridFlow::USB::Interface">ruby GridFlow::USB::Interface</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>wrapper for struct usb_interface_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ruby GridFlow::USB::Endpoint">ruby GridFlow::USB::Endpoint</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>wrapper for struct usb_endpoint_descriptor</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Internals"></a><h4>Objects for Internals</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class GridInlet">C++ class GridInlet</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + GridInlets represent inlets that accept grids. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class GridOutlet">C++ class GridOutlet</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + GridOutlets represent outlets that send grids. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class Dim">C++ class Dim</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + Dim represents a list of dimensions. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class Grid">C++ class Grid</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + Grid represents a grid that is fully stored in memory. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class Numop1">C++ class Numop1</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + This represents a one-input operator. + Such an object contains a map() function that applies the operator + over a memory segment. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class Numop2">C++ class Numop2</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + This represents a two-input operator. + Such an object contains four functions for each T, where + T is one of the types uint8, int16, int32, float32. <br><b>method</b> map <b>(</b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>T</i> b<b>)</b> + for i in 0...n, + as[i] := f(as[i],b); + This is like <kbd><font color="#007777">[#]</font></kbd> with a scalar righthand <br> + <br><b>method</b> zip <b>(</b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b> + for i in 0...n, + as[i] := f(as[i],bs[i]); + bs is not modified. + (This is like <kbd><font color="#007777">[#]</font></kbd> with a nonscalar righthand) <br> + <br><b>method</b> fold <b>(</b><i>integer</i> an<b>, </b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b> <p> + for i in 0...n, + for j in 0...an, + as[j] := f(as[j],bs[i*an+j]); </p> + (this is like <kbd><font color="#007777">[#fold]</font></kbd>) <br> + <br><b>method</b> scan <b>(</b><i>integer</i> an<b>, </b><i>integer</i> n<b>, </b><i>Pt<T></i> as<b>, </b><i>Pt<T></i> bs<b>)</b> <p> for j in 0...an: bs[j] := f(as[j],bs[j]); </p> <p> for i in 1...n: for j in 0...an: + bs[j] := f(bs[(i-1)*an+j],bs[i*an+j]); </p> + (this is like <kbd><font color="#007777">[#scan]</font></kbd>) <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class GridClass">C++ class GridClass</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + This represents a class of GridObjects. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="C++ class GFBridge">C++ class GFBridge</a></td></tr><tr><td></td><td valign="top"><br> +<br clear="left"><br><br><br clear="left"><br></td><td><br> + + This holds linkage information about PureData. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/internals.xml b/externals/gridflow/doc/internals.xml new file mode 100644 index 00000000..19173719 --- /dev/null +++ b/externals/gridflow/doc/internals.xml @@ -0,0 +1,228 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'jmax.dtd'> +<documentation title="C++/Ruby Internals"> +<!-- $Id: internals.xml,v 1.1 2005-10-04 02:09:42 matju Exp $ --> +<!-- + GridFlow Reference Manual: Internals + Copyright (c) 2001,2002,2003,2004,2005 by Mathieu Bouchard +--> +<section name="notes"> + +<p>In Ruby, GridFlow defines a namespace (module) called GridFlow. Most of the +constants it defines are part of that namespace.</p> +<p>Ruby does not have the same concept of object as PD. In GridFlow, object classes may +inherit features from other object classes, and also there is no concept of inlet nor outlet, which are instead +provided by <k>GridFlow::FObject</k>, which also has the purpose of exporting functionality to +PD.</p> +<p>In this document (and in many others) the phrase "a Potato" will be a shorthand for "an object of the class +called Potato", which is often used in modern software design and is a nice convention borrowed from +biology.</p> + +<p> +A FObject is normally in two or three parts: a (Ruby) GridFlow::FObject +that is the central part; a (C++) FObject; a (C++) BFObject. +The GridFlow::FObject is created as a RData kind of box (T_DATA) +using Ruby-C's Data_Make_Struct on a GridObject. This is +how most Ruby-C programs inherit from Ruby classes. Note that +Ruby's boxed objects have a maximum of five fields, and they're usually +taken, so additional fields have to be outside of it. This is why RData exists. +</p> + +<p> +So basically you have a C++ FObject that is "part of" a GridFlow::FObject +and they point to each other using "peer pointers". + The BFObject links back to the RData box through a pointer called peer. +</p> + +</section> + +<section name="Objects for Scripting"> + <class name="ruby class FObject extending Data"> + Provides inlets and outlets to Ruby Objects. + + <method name="init"> + </method> + + <method name="send_in"> + <arg name="inlet" type="int"/> + <rest name="message"/> + </method> + + <method name="send_out"> + <arg name="outlet" type="int"/> + <rest name="message"/> + </method> + + </class> + + <class name="ruby class GridObject extending FObject"> + Provides grid support to FObjects. + + <method name="inlet_dim"> + <arg name="inlet" type="Integer"/> + gives an array of Integers (dimension list) + </method> + + <method name="inlet_nt"> + <arg name="inlet" type="Integer"/> + gives a Symbol (number type) + </method> + + <method name="inlet_set_factor"> + <arg name="inlet" type="Integer"/> + <arg name="factor" type="Integer"/> + ensures received packets have a size that is + a whole multiple of this size. + must be called from rgrid_begin. + </method> + + <method name="send_out_grid_begin"> + <arg name="outlet" type="Integer"/> + <arg name="dimensions" type="Array of Integer"/> + <arg name="nt" type="number type" default="int32"/> + establishes grid streams between an outlet and all inlets + connected to it. + </method> + + <method name="send_out_grid_flow"> + <arg name="outlet" type="Integer"/> + <arg name="data" type="String"/> + for sending a grid data packet through that outlet. + </method> + + <method name="send_out_grid_end"> + <arg name="outlet" type="Integer"/> + (isn't this one obsolete?) + </method> + + <inlet id="0"> + <method name="rgrid_begin"/> + <method name="rgrid_flow"> + <arg name="data" type="String"/> + </method> + <method name="rgrid_end"/> + </inlet> + </class> + + <class name="ruby class BitPacking"> + A BitPacking is a simple two-way converter between different + numeric layouts. + </class> + + <class name="ruby FPatcher extending FObject"> + <p>This class is much like PureData's abstractions.</p> + <p>This is a container for objects. Its proper objects are numbered + starting with zero. The wire list is given in terms of those numbers: + (sourceobject,sourceinlet,destobject,destinlet). There is a + pseudo-object numbered #-1 which map to the container's own inlets + and outlets.</p> + </class> + + <class name="ruby GridFlow::USB"><p>wrapper for struct usb_dev_handle</p> + <attr name=".busses">wrapper for struct usb_bus and usb_get_busses()</attr> + </class> + + <class name="ruby GridFlow::USB::Device"> + <p>wrapper for struct usb_device and struct usb_device_descriptor</p> + </class> + + <class name="ruby GridFlow::USB::Config"> + <p>wrapper for struct usb_config_descriptor, struct usb_interface</p> + </class> + + <class name="ruby GridFlow::USB::Interface"> + <p>wrapper for struct usb_interface_descriptor</p> + </class> + + <class name="ruby GridFlow::USB::Endpoint"> + <p>wrapper for struct usb_endpoint_descriptor</p> + </class> +</section> + +<section name="Objects for Internals"> + <class name="C++ class GridInlet"> + GridInlets represent inlets that accept grids. + </class> + + <class name="C++ class GridOutlet"> + GridOutlets represent outlets that send grids. + </class> + + <class name="C++ class Dim"> + Dim represents a list of dimensions. + </class> + + <class name="C++ class Grid"> + Grid represents a grid that is fully stored in memory. + </class> + + <class name="C++ class Numop1"> + This represents a one-input operator. + Such an object contains a map() function that applies the operator + over a memory segment. + </class> + + <class name="C++ class Numop2"> + This represents a two-input operator. + Such an object contains four functions for each T, where + T is one of the types uint8, int16, int32, float32. + + <method name="map"> + <arg name="n" type="integer"/> + <arg name="as" type="Pt<T>"/> + <arg name="b" type="T"/> + for i in 0...n, + as[i] := f(as[i],b); + This is like <k>[#]</k> with a scalar righthand + </method> + + <method name="zip"> + <arg name="n" type="integer"/> + <arg name="as" type="Pt<T>"/> + <arg name="bs" type="Pt<T>"/> + for i in 0...n, + as[i] := f(as[i],bs[i]); + bs is not modified. + (This is like <k>[#]</k> with a nonscalar righthand) + </method> + + <method name="fold"> + <arg name="an" type="integer"/> + <arg name="n" type="integer"/> + <arg name="as" type="Pt<T>"/> + <arg name="bs" type="Pt<T>"/> + + <p> + for i in 0...n, + for j in 0...an, + as[j] := f(as[j],bs[i*an+j]); + </p> + + (this is like <k>[#fold]</k>) + </method> + + <method name="scan"> + <arg name="an" type="integer"/> + <arg name="n" type="integer"/> + <arg name="as" type="Pt<T>"/> + <arg name="bs" type="Pt<T>"/> + + <p> for j in 0...an: bs[j] := f(as[j],bs[j]); </p> + <p> for i in 1...n: for j in 0...an: + bs[j] := f(bs[(i-1)*an+j],bs[i*an+j]); </p> + + (this is like <k>[#scan]</k>) + </method> + </class> + + <class name="C++ class GridClass"> + This represents a class of GridObjects. + </class> + + <class name="C++ class GFBridge"> + This holds linkage information about PureData. + </class> + +</section> + +</documentation> diff --git a/externals/gridflow/doc/introduction.html b/externals/gridflow/doc/introduction.html new file mode 100644 index 00000000..8adf4ead --- /dev/null +++ b/externals/gridflow/doc/introduction.html @@ -0,0 +1,125 @@ +<html> +<head> +<title>GridFlow 0.7.7 - Introduction</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> + +<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> +<br> +<table width="100%" border="0" cellspacing="5"> + <tr><td colspan="4" bgcolor="#082069"> + <img src="images/titre_gridflow.png" width="253" height="23"></td></tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="3" height="16"> + <h4>GridFlow 0.7.7 - introduction</h4> + </td></tr> + + <tr> + <td width="12%" height="4"> </td> + <td width="80%" height="4"> </td> + <td width="12%" height="4"> </td> + </tr> + + <tr> + <td width="13%"> </td> + <td width="82%"> + + <p> The philosophy that guides PureData is a simple but powerful one: + the software must first provide the user with generic tools + rather than imposing pre-cooked effects. In other words the user + should have total freedom. + + <p> GridFlow follows that philosophy: it first defines elementary + mathematical operations. Those can in turn be used as simple + visual effects or be combined to produce more complex effects. + + <p> The strategy followed by most video plugins for PureData, jMax, and MAX/MSP, is + to provide the user first with constructs for manipulating video + streams at a fairly high level. The strategy put forward by GridFlow + is different. + + <p> It can be said that in all those video plugins there are three layers: + the first, the low level, is not accessible to non-programmers (and fairly + difficult of access even to programmers); the second, mathematical, where + one needs not to be a C++ programmer, but still requires a good + understanding of how numbers and pixels and colours and geometry work; and + a third level that looks more like the software an artist would like to + use. + + <p> In other video plugins there is a fairly low emphasis on the second + layer. In GridFlow that layer is very strong and opens many possibilities. + Even though the third layer in GridFlow is not as developed as it could, + the second layer may be used to produce third-layer object classes much + more quickly. + + <p> GridFlow provides a unifying view of multimedia information. Several + kinds of data -- raster graphics in any number of channels, coordinate + transforms, matrices, vectors -- may all be represented by <b>Grids</b> + (also known as multi-dimensional arrays). Grids exist in several ways: they + are usually streamed from object to object, but they can also be stored in + memory, stored into a file, sent through the network. + + <p> The new GridFlow (0.6) also provides scripting, which inserts itself + between the first and second layer to provide additional functionality. The + language that has been chosen is Ruby, designed by Yukihiro Matsumoto + during the 90's. This new layer is used for portability between host + software (PureData vs jMax), for portability between platforms (Windows/Mac + versions do not exist but would be farther ahead if it wasn't for Ruby), + for independency from host software (GridFlow can be tested and used + independently of PureData/jMax), for quick extensibility (you can create + PureData/jMax object classes directly in GridFlow's configuration file), + and so on. + + <p> In short, GridFlow is a whole new world of possibilities for + the multimedia artist and programmer. + + <p>- matju</p> +</td></tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + <tr> + <td width="13%"> </td> + <td width="82%"> + + <p> Here is an example of how things work in GridFlow. (if you want more + information, consult the rest of this manual) + + <p> A picture is a three-dimensional Grid:<br> + <b>0</b> : rows <br> + <b>1</b> : columns <br> + <b>2</b> : channels <br> + + <p> + Pictures come in all sorts of heights and widths. The channels, however, + are more limited in number. Usually it's three: Red, Green, Blue. + + <p> A coordinate transform, when specified pixel by pixel, may be a + three-dimensional Grid in which the two "channels" are Y and X, + representing row-and-column positions in a separate picture. + + <p> Other shapes of grids could be designed to represent various things; + for example, configuration for blur effects. Grids could be useful for + things not directly related to raster pictures (e.g. sound recordings). + Those are all kinds of things you could actually develop <i>within</i> the + PureData / GridFlow framework. You don't need to wait for me. +</td> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="4"> + <p><font size="-1">GridFlow 0.7.7 Documentation<br> + by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a> + and<br> + Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p> + </td> + </tr> + +</table> +</body> +</html> diff --git a/externals/gridflow/doc/license.html b/externals/gridflow/doc/license.html new file mode 100644 index 00000000..5b5d39b7 --- /dev/null +++ b/externals/gridflow/doc/license.html @@ -0,0 +1,75 @@ +<html> +<head> +<!-- $Id: license.html,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<!-- + GridFlow Reference Manual: Architecture + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard +--> +<title>GridFlow 0.7.7 - License</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> + +<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> +<br> +<table width="100%" border="0" cellspacing="5"> + <tr><td colspan="4" bgcolor="#082069"> + <img src="images/titre_gridflow.png" width="253" height="23"></td></tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="3" height="16"> + <h4>GridFlow 0.7.7 - License</h4> + </td></tr> + + <tr> + <td rowspan="2" width="12%"> </td> + <td colspan="2" width="80%"> </td> + <td rowspan="10" width="12%"> </td> + </tr> + + <tr><td colspan="2"> + <table cellspacing="1" cellpadding="0"><tr><td bgcolor="black"> + <table cellspacing="1" cellpadding="20"><tr><td bgcolor="white"> + <p> + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard + + <p> + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + <p> + See file LICENSE for further informations on licensing terms. + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A + PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + <p> + You should have received a copy of the GNU General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA. + + </td></tr></table> + </td></tr></table> + </td> + </tr> + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="4"> + <p><font size="-1">GridFlow 0.7.7 Documentation<br> + by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a> + and<br> + Alexandre Castonguay <a href="mailto:acastonguay@artengine.ca">acastonguay@artengine.ca</a></font></p> + </td> + </tr> + +</table> +</body> +</html> diff --git a/externals/gridflow/doc/profiling.html b/externals/gridflow/doc/profiling.html new file mode 100644 index 00000000..aac2ea1f --- /dev/null +++ b/externals/gridflow/doc/profiling.html @@ -0,0 +1,151 @@ +<html> +<head> +<!-- $Id: profiling.html,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<!-- + GridFlow Reference Manual: Architecture + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard +--> +<title>GridFlow 0.7.7 - Profiling Execution Speed</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> + +<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> +<br> +<table width="100%" border="0" cellspacing="5"> + <tr><td colspan="4" bgcolor="#082069"> + <img src="images/titre_gridflow.png" width="253" height="23"></td></tr> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="3" height="16"> + <h4>GridFlow 0.7.7 - Profiling Execution Speed</h4> + </td></tr> + + <tr> + <td width="12%" height="4"> </td> + <td width="80%" height="4"> </td> + <td width="12%" height="4"> </td> + </tr> + + <tr> + <td width="13%"> </td> + <td width="82%"> + + <h4>What is profiling?</h4> + <p> + It is about getting empiric metrics about the execution of a program. + For example, find out which parts of a program consume the most time + and/or memory. Usually it's about the time, and this is what GridFlow + allows you to measure. + </p> + + <h4>How to get those stats from GridFlow ?</h4> + <ul> + <li>create a "@global" object and connect two + messageboxes to it, "profiler_reset" and "profiler_dump". The first + one resets all counters to zero. The second one gives a top of + the busiest objects, with percentages.</li> + <li>note that those results are global to a process. That is, if you load + several patches in the same process (program instance), then all those patches + will be monitored at once. But if you open jMax (or PD) several times at once, then + the profiler will not see everything happening on that machine. + </li> + <h4>How do i interpret those stats?</h4> + <li>Note that some operations may not be monitored, and some of the + monitoring may be buggy. I think it's not buggy as it is now, but I may be wrong. + </li> + <li> + The current profiler uses a thing called RDTSC (Pentium only). This is a very high + precision clock that is very fast to use. However, *major* imprecisions + may come from the fact that an ordinary multitasking OS will run other + tasks without stopping/resuming the clock. This may happen randomly; + however, it has a much bigger chance of happening in [@in] or [@out], because that's + where all the communication with other stuff is (files, sockets, windows, etc). + </li> + <li> + If you make sure that only the bare minimum is actively running on your + computer, then [@out] (using x11) would still include the time spent in the x11 + server, except in some conditions. This applies to every kind of window output too, + because however the data trickles through libraries (sdl, aalib), it has to reach the x11 server + and the display driver. + </li> + <li> + The profiler has an impact on the results of the profiler. The profiler + includes half of its own influence in its own results, and disregards the + other half (or so). Profiling shouldn't add more than 100-300 ticks per + message (of which half is counted). + </li> + <li> + Message-passing time is not counted at all. Only time actually spent + inside GridFlow objects is counted. This may skew results. + Transmission of a grid requires one message, thus we may speak of "grid messages". + However, when the message is received, one or several packets may get transmitted, which + is done outside of the message system. Each packet contains at most 2048 numbers + (adjustable limit), and normally a packet should be at least one quarter of that size unless it is the last one. + On RGB grids of widths 640,320,160, the packet size will usually be 1920. + </li> + </ul> + </p> + + <h4>Getting a frames-per-second measure</h4> + <p>This section formerly was describing what can now be obtained using the [fps] object class.</p> + + <h4>acceleration tricks</h4> + <ul> + <li>try the profiler and see what it says.</li> + <li>i mean really.</li> + <li>you can lose a lot of your time accelerating something + that isn't really taking execution time.</li> + <li>it's faster to work on big grids than on small grids, + for the amount of number-crunching you can do. + </li> + <li>about numbertypes: uint8 is the fastest, followed by int16, int32, float32. + (and the first two are faster when MMX is enabled). However it + may be difficult to make some effects use int16 + or smaller without overflow happening.</li> + <li>[@ <<] is a very fast multiplication by powers of two (1, 2, 4, 8, 16, ...). + [@ >>] is a very fast division by powers of two. + <p> + from my little experience, normal integer multiplication and division are + rather slow, especially on Intel brand. The gap between *,/ and + <<,>> is smaller on Cyrix/AMD brand CPUs, but still, try it + yourself. (my experience has been on specific models and may not reflect currently common models) + </p> + </li> + <li>[@ & 255] is a very fast [@ % 256], and likewise for other + powers of two.</li> + <li>for do-nothing operations, "ignore" and "put" are faster than + "+ 0" and such...</li> + <li>remember that an image twice smaller in height <u>and</u> twice + smaller in height will be processed <u>four</u> times as fast (for + most effects) so you can get four times more frames per second. + It's the "rows*columns*channels" value that makes the biggest + difference (usually).</li> + + <li>If all fails you may recode a jMax/PD/Ruby abstraction into + plain Ruby code or C++ code. If your new class is of generic + usefulness then maybe it should be added to the releases of + GridFlow. Contact me if you need help extending GridFlow.</li> + + <li>Put often-used files on fast drives. This means don't use NFS + (networked file system) for that. The file-to-ram cache can compensate for + that up to a certain amount, but the larger the file is, and the most used + the file is, the more important it is to put it on a local drive. </li> + </ul> +</td> + + <tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"><img src="images/black.png" width="1" height="2"></td></tr> + + <tr><td colspan="4"> + <p><font size="-1">GridFlow 0.7.7 Documentation<br> + by Mathieu Bouchard <a href="mailto:matju@sympatico.ca">matju@sympatico.ca</a> + </font></p> + </td> + </tr> + +</table> +</body> +</html> diff --git a/externals/gridflow/doc/project_policy.html b/externals/gridflow/doc/project_policy.html new file mode 100644 index 00000000..38790844 --- /dev/null +++ b/externals/gridflow/doc/project_policy.html @@ -0,0 +1,98 @@ +<html><head> +<!-- $Id: project_policy.html,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<title>GridFlow 0.8.0 - </title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - </h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="1"><h4><a href="#Note">Note</a></h4><ul> +</ul> +<h4><a href="#Release">Release</a></h4><ul> +</ul> +<h4><a href="#Documentation">Documentation</a></h4><ul> +</ul> +<h4><a href="#CVS">CVS</a></h4><ul> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Note"></a><h4>Note</h4></td></tr><tr><td></td><td></td><td> + first consult the file ../README for a vague idea on the meaning of + subdirectories. </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Release"></a><h4>Release</h4></td></tr><tr><td></td><td></td><td> +Compatibility: </td></tr> +<tr><td></td><td></td><td><ul><li><b>1</b> : + Should work with Ruby 1.6.6 and PureData 0.36, 0.37, 0.38 </li></ul></td></tr> +<tr><td></td><td></td><td> +Release steps (</td></tr> +<tr><td></td><td></td><td><b>OPERATE WITH CAUTION</b></td></tr> +<tr><td></td><td></td><td>): </td></tr> +<tr><td></td><td></td><td><ul> <li><b>1</b> : make vvtest # leak detection </li><li><b>2</b> : ruby base/test.rb formats </li><li><b>3</b> : cvs tag gridflow_0_7_7 . </li><li><b>4</b> : mkdir gridflow </li><li><b>5</b> : cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow + export -r gridflow_0_7_7 -d gridflow . </li><li><b>6</b> : cd gridflow </li><li><b>7</b> : rm -rf CVS CVSROOT </li><li><b>8</b> : chmod -R go=u-w . </li><li><b>9</b> : cd .. </li><li><b>10</b> : tar cfzvv gridflow-0.7.7.tar.gz gridflow </li><li><b>11</b> : rm -rf gridflow # caution!!! </li><li><b>12</b> : scp gridflow*gz gridflow@artengine.ca:download </li><li><b>13</b> : mv gridflow*gz /home/matju/net/GridFlow </li><li><b>14</b> : ssh gridflow@artengine.ca : expand tarball into public_html/latest </li><li><b>15</b> : download somewhere else and try to compile </li><li><b>16</b> : update main page </li><li><b>17</b> : jmax/pd/ruby-talk mlists : post release (note: prefix subject with [ANN] !!!!) </li><li><b>18</b> : freshmeat.net : post release </li><li><b>19</b> : RAA : post release </li> </ul></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Documentation"></a><h4>Documentation</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><ul> <li><b>1</b> : + Pictures identified as "<help>" should be screenshots of the + help files. They shouldn't be screenshots of the template. </li> <li><b>2</b> : + A Help file is a visual summary of what an object does. It should be + interactive and allow the user to understand what the object does. + Sample inputs are provided and sample results can be seen. </li> <li><b>3</b> : + All modifications to the documentation must be done in the XML. The + HTML must be kept up-to-date by rerunning "make" in the "doc/" directory. </li> <li><b>4</b> : + Help-wise, Formats are considered objects. + Operators are to be documented as part of [@] and [@!]. </li> <li><b>5</b> : + Images grabbed directly from a jMax window should be encoded in PNG. + This includes "icons" (object boxes, message boxes, etc). If they are + in JPEG, only change to PNG when the image has to change anyway. + Distinguish "icons" from "thumbnails", the latter of which are <b>scaled-down</b> grabs, which should be encoded in JPEG. </li> <li><b>6</b> : + There are not help-thumbnails anymore in the reference manual + because they were not helpful. </li> <li><b>7</b> : + Large images should be kept out of the release. The release itself must + be small enough not to discourage us from doing releases and keeping + them all. It also should be downloadable on a bad modem. =) + Let's keep it under 500k please. </li> </ul></td></tr> +<tr><td></td><td></td><td> +in doc do: +for z in images/*.* images/*/*.*; do fgrep -q $z *.html || echo "$z"; done </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="CVS"></a><h4>CVS</h4></td></tr><tr><td></td><td></td><td> + environment variables + CVSEDITOR=pico + CVS_RSH=ssh2 </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/project_policy.xml b/externals/gridflow/doc/project_policy.xml new file mode 100644 index 00000000..3bf7368e --- /dev/null +++ b/externals/gridflow/doc/project_policy.xml @@ -0,0 +1,99 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'jmax.dtd'> +<documentation> +<!-- $Id: project_policy.xml,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<!-- + GridFlow Reference Manual: Project Policy + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard and Alexandre Castonguay +--> + +<section name="Note"> + first consult the file ../README for a vague idea on the meaning of + subdirectories. +</section> + +<section name="Release"> + +Compatibility: + +<list><li> + Should work with Ruby 1.6.6 and PureData 0.36, 0.37, 0.38 +</li></list> + +Release steps (<b>OPERATE WITH CAUTION</b>): + +<list> + <li>make vvtest # leak detection + </li><li>ruby base/test.rb formats + </li><li>cvs tag gridflow_0_7_7 . + </li><li>mkdir gridflow + </li><li>cvs -d :pserver:anonymous@cvs.gridflow.ca:/home/cvs/gridflow + export -r gridflow_0_7_7 -d gridflow . + </li><li>cd gridflow + </li><li>rm -rf CVS CVSROOT + </li><li>chmod -R go=u-w . + </li><li>cd .. + </li><li>tar cfzvv gridflow-0.7.7.tar.gz gridflow + </li><li>rm -rf gridflow # caution!!! + </li><li>scp gridflow*gz gridflow@artengine.ca:download + </li><li>mv gridflow*gz /home/matju/net/GridFlow + </li><li>ssh gridflow@artengine.ca : expand tarball into public_html/latest + </li><li>download somewhere else and try to compile + </li><li>update main page + </li><li>jmax/pd/ruby-talk mlists : post release (note: prefix subject with [ANN] !!!!) + </li><li>freshmeat.net : post release + </li><li>RAA : post release + </li> +</list> +</section> + +<section name="Documentation"> +<list> +<li> + Pictures identified as "<help>" should be screenshots of the + help files. They shouldn't be screenshots of the template. +</li> +<li> + A Help file is a visual summary of what an object does. It should be + interactive and allow the user to understand what the object does. + Sample inputs are provided and sample results can be seen. +</li> +<li> + All modifications to the documentation must be done in the XML. The + HTML must be kept up-to-date by rerunning "make" in the "doc/" directory. +</li> +<li> + Help-wise, Formats are considered objects. + Operators are to be documented as part of [@] and [@!]. +</li> +<li> + Images grabbed directly from a jMax window should be encoded in PNG. + This includes "icons" (object boxes, message boxes, etc). If they are + in JPEG, only change to PNG when the image has to change anyway. + Distinguish "icons" from "thumbnails", the latter of which are + <b>scaled-down</b> grabs, which should be encoded in JPEG. +</li> +<li> + There are not help-thumbnails anymore in the reference manual + because they were not helpful. +</li> +<li> + Large images should be kept out of the release. The release itself must + be small enough not to discourage us from doing releases and keeping + them all. It also should be downloadable on a bad modem. =) + Let's keep it under 500k please. +</li> +</list> + +in doc do: +for z in images/*.* images/*/*.*; do fgrep -q $z *.html || echo "$z"; done + +</section> + +<section name="CVS"> + environment variables + CVSEDITOR=pico + CVS_RSH=ssh2 +</section> + +</documentation> diff --git a/externals/gridflow/doc/reference.html b/externals/gridflow/doc/reference.html new file mode 100644 index 00000000..ac1f4373 --- /dev/null +++ b/externals/gridflow/doc/reference.html @@ -0,0 +1,1070 @@ +<html><head> +<!-- $Id: reference.html,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<title>GridFlow 0.8.0 - Reference Manual: Flow Classes</title> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> +<link rel="stylesheet" href="gridflow.css" type="text/css"> +</head> +<body bgcolor="#FFFFFF" + leftmargin="0" topmargin="0" + marginwidth="0" marginheight="0"> +<table width="100%" bgcolor="white" border="0" cellspacing="2"> +<tr><td colspan="4" bgcolor="#082069"> +<img src="images/titre_gridflow.png" width="253" height="23"> +</td></tr><tr><td> </td></tr> +<tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4" height="16"> + <h4>GridFlow 0.8.0 - Reference Manual: Flow Classes</h4> +</td></tr> +<tr> + <td width="5%" rowspan="2"> </td> + <td width="15%" height="23"> </td> + <td width="80%" height="23"> </td> + <td width="5%" height="23"> </td> +</tr> +<tr><td colspan="2"><div cols="3"><h4><a href="#Objects_for_making_grids_and_breaking_them_down">Objects for making grids and breaking them down</a></h4><ul> +<li><a href="##import"><img src="flow_classes/%23import-icon.png" alt="[#import]" border="0"></a></li> +<li><a href="##export"><img src="flow_classes/%23export-icon.png" alt="[#export]" border="0"></a></li> +<li><a href="##export_list"><img src="flow_classes/%23export_list-icon.png" alt="[#export_list]" border="0"></a></li> +<li><a href="##export_symbol"><img src="flow_classes/%23export_symbol-icon.png" alt="[#export_symbol]" border="0"></a></li> +<li><a href="##pack"><img src="flow_classes/%23pack-icon.png" alt="[#pack]" border="0"></a></li> +<li><a href="##color"><img src="flow_classes/%23color-icon.png" alt="[#color]" border="0"></a></li> +<li><a href="##unpack"><img src="flow_classes/%23unpack-icon.png" alt="[#unpack]" border="0"></a></li> +<li><a href="##centroid"><img src="flow_classes/%23centroid-icon.png" alt="[#centroid]" border="0"></a></li> +<li><a href="##centroid2"><img src="flow_classes/%23centroid2-icon.png" alt="[#centroid2]" border="0"></a></li> +<li><a href="##for"><img src="flow_classes/%23for-icon.png" alt="[#for]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Computing">Objects for Computing</a></h4><ul> +<li><a href="##"><img src="flow_classes/%23-icon.png" alt="[#]" border="0"></a></li> +<li><a href="#@complex_sq"><img src="flow_classes/@complex_sq-icon.png" alt="[@complex_sq]" border="0"></a></li> +<li><a href="##fold"><img src="flow_classes/%23fold-icon.png" alt="[#fold]" border="0"></a></li> +<li><a href="##scan"><img src="flow_classes/%23scan-icon.png" alt="[#scan]" border="0"></a></li> +<li><a href="##outer"><img src="flow_classes/%23outer-icon.png" alt="[#outer]" border="0"></a></li> +<li><a href="##inner"><img src="flow_classes/%23inner-icon.png" alt="[#inner]" border="0"></a></li> +<li><a href="#@join"><img src="flow_classes/@join-icon.png" alt="[@join]" border="0"></a></li> +<li><a href="##finished"><img src="flow_classes/%23finished-icon.png" alt="[#finished]" border="0"></a></li> +<li><a href="##cast"><img src="flow_classes/%23cast-icon.png" alt="[#cast]" border="0"></a></li> +<li><a href="##ravel"><img src="flow_classes/%23ravel-icon.png" alt="[#ravel]" border="0"></a></li> +<li><a href="##grade"><img src="flow_classes/%23grade-icon.png" alt="[#grade]" border="0"></a></li> +<li><a href="##perspective"><img src="flow_classes/%23perspective-icon.png" alt="[#perspective]" border="0"></a></li> +<li><a href="##transpose"><img src="flow_classes/%23transpose-icon.png" alt="[#transpose]" border="0"></a></li> +<li><a href="##fade"><img src="flow_classes/%23fade-icon.png" alt="[#fade]" border="0"></a></li> +<li><a href="##fade_lin"><img src="flow_classes/%23fade_lin-icon.png" alt="[#fade_lin]" border="0"></a></li> +<li><a href="##reverse"><img src="flow_classes/%23reverse-icon.png" alt="[#reverse]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Coordinate_Transforms">Objects for Coordinate Transforms</a></h4><ul> +<li><a href="##redim"><img src="flow_classes/%23redim-icon.png" alt="[#redim]" border="0"></a></li> +<li><a href="##store"><img src="flow_classes/%23store-icon.png" alt="[#store]" border="0"></a></li> +<li><a href="##scale_to"><img src="flow_classes/%23scale_to-icon.png" alt="[#scale_to]" border="0"></a></li> +<li><a href="##scale_by"><img src="flow_classes/%23scale_by-icon.png" alt="[#scale_by]" border="0"></a></li> +<li><a href="##downscale_by"><img src="flow_classes/%23downscale_by-icon.png" alt="[#downscale_by]" border="0"></a></li> +<li><a href="##spread"><img src="flow_classes/%23spread-icon.png" alt="[#spread]" border="0"></a></li> +<li><a href="##rotate"><img src="flow_classes/%23rotate-icon.png" alt="[#rotate]" border="0"></a></li> +<li><a href="##remap_image"><img src="flow_classes/%23remap_image-icon.png" alt="[#remap_image]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Reporting">Objects for Reporting</a></h4><ul> +<li><a href="##dim"><img src="flow_classes/%23dim-icon.png" alt="[#dim]" border="0"></a></li> +<li><a href="##type"><img src="flow_classes/%23type-icon.png" alt="[#type]" border="0"></a></li> +<li><a href="##print"><img src="flow_classes/%23print-icon.png" alt="[#print]" border="0"></a></li> +<li><a href="#rubyprint"><img src="flow_classes/rubyprint-icon.png" alt="[rubyprint]" border="0"></a></li> +<li><a href="#printargs"><img src="flow_classes/printargs-icon.png" alt="[printargs]" border="0"></a></li> +<li><a href="#display"><img src="flow_classes/display-icon.png" alt="[display]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Color_Conversion">Objects for Color Conversion</a></h4><ul> +<li><a href="##apply_colormap_channelwise"><img src="flow_classes/%23apply_colormap_channelwise-icon.png" alt="[#apply_colormap_channelwise]" border="0"></a></li> +<li><a href="##rgb_to_greyscale"><img src="flow_classes/%23rgb_to_greyscale-icon.png" alt="[#rgb_to_greyscale]" border="0"></a></li> +<li><a href="##greyscale_to_rgb"><img src="flow_classes/%23greyscale_to_rgb-icon.png" alt="[#greyscale_to_rgb]" border="0"></a></li> +<li><a href="##yuv_to_rgb"><img src="flow_classes/%23yuv_to_rgb-icon.png" alt="[#yuv_to_rgb]" border="0"></a></li> +<li><a href="##rgb_to_yuv"><img src="flow_classes/%23rgb_to_yuv-icon.png" alt="[#rgb_to_yuv]" border="0"></a></li> +</ul> +<h4><a href="#Objects_for_Miscellaneous_Picture_Processing">Objects for Miscellaneous Picture Processing</a></h4><ul> +<li><a href="##convolve"><img src="flow_classes/%23convolve-icon.png" alt="[#convolve]" border="0"></a></li> +<li><a href="##contrast"><img src="flow_classes/%23contrast-icon.png" alt="[#contrast]" border="0"></a></li> +<li><a href="##posterize"><img src="flow_classes/%23posterize-icon.png" alt="[#posterize]" border="0"></a></li> +<li><a href="##solarize"><img src="flow_classes/%23solarize-icon.png" alt="[#solarize]" border="0"></a></li> +<li><a href="##checkers"><img src="flow_classes/%23checkers-icon.png" alt="[#checkers]" border="0"></a></li> +<li><a href="##layer"><img src="flow_classes/%23layer-icon.png" alt="[#layer]" border="0"></a></li> +<li><a href="##draw_image"><img src="flow_classes/%23draw_image-icon.png" alt="[#draw_image]" border="0"></a></li> +<li><a href="##draw_polygon"><img src="flow_classes/%23draw_polygon-icon.png" alt="[#draw_polygon]" border="0"></a></li> +<li><a href="##text_to_image"><img src="flow_classes/%23text_to_image-icon.png" alt="[#text_to_image]" border="0"></a></li> +<li><a href="##hueshift"><img src="flow_classes/%23hueshift-icon.png" alt="[#hueshift]" border="0"></a></li> +</ul> +<h4><a href="#Other_Objects">Other Objects</a></h4><ul> +<li><a href="#rtmetro"><img src="flow_classes/rtmetro-icon.png" alt="[rtmetro]" border="0"></a></li> +<li><a href="#bindpatcher"><img src="flow_classes/bindpatcher-icon.png" alt="[bindpatcher]" border="0"></a></li> +<li><a href="#pingpong"><img src="flow_classes/pingpong-icon.png" alt="[pingpong]" border="0"></a></li> +<li><a href="##global"><img src="flow_classes/%23global-icon.png" alt="[#global]" border="0"></a></li> +<li><a href="#fps"><img src="flow_classes/fps-icon.png" alt="[fps]" border="0"></a></li> +<li><a href="#unix_time"><img src="flow_classes/unix_time-icon.png" alt="[unix_time]" border="0"></a></li> +<li><a href="#ls"><img src="flow_classes/ls-icon.png" alt="[ls]" border="0"></a></li> +<li><a href="#exec"><img src="flow_classes/exec-icon.png" alt="[exec]" border="0"></a></li> +<li><a href="#renamefile"><img src="flow_classes/renamefile-icon.png" alt="[renamefile]" border="0"></a></li> +<li><a href="#plotter_control"><img src="flow_classes/plotter_control-icon.png" alt="[plotter_control]" border="0"></a></li> +<li><a href="#rubyarray"><img src="flow_classes/rubyarray-icon.png" alt="[rubyarray]" border="0"></a></li> +</ul> +<h4><a href="#jMax_emulation">jMax emulation</a></h4><ul> +<li><a href="#fork"><img src="flow_classes/fork-icon.png" alt="[fork]" border="0"></a></li> +<li><a href="#jmax_udpsend"><img src="flow_classes/jmax_udpsend-icon.png" alt="[jmax_udpsend]" border="0"></a></li> +<li><a href="#jmax_udpreceive"><img src="flow_classes/jmax_udpreceive-icon.png" alt="[jmax_udpreceive]" border="0"></a></li> +<li><a href="#foreach"><img src="flow_classes/foreach-icon.png" alt="[foreach]" border="0"></a></li> +<li><a href="#rubysprintf"><img src="flow_classes/rubysprintf-icon.png" alt="[rubysprintf]" border="0"></a></li> +<li><a href="#listflatten"><img src="flow_classes/listflatten-icon.png" alt="[listflatten]" border="0"></a></li> +<li><a href="#listmake"><img src="flow_classes/listmake-icon.png" alt="[listmake]" border="0"></a></li> +<li><a href="#listlength"><img src="flow_classes/listlength-icon.png" alt="[listlength]" border="0"></a></li> +<li><a href="#listelement"><img src="flow_classes/listelement-icon.png" alt="[listelement]" border="0"></a></li> +<li><a href="#listsublist"><img src="flow_classes/listsublist-icon.png" alt="[listsublist]" border="0"></a></li> +<li><a href="#listprepend"><img src="flow_classes/listprepend-icon.png" alt="[listprepend]" border="0"></a></li> +<li><a href="#listappend"><img src="flow_classes/listappend-icon.png" alt="[listappend]" border="0"></a></li> +<li><a href="#listreverse"><img src="flow_classes/listreverse-icon.png" alt="[listreverse]" border="0"></a></li> +<li><a href="#oneshot"><img src="flow_classes/oneshot-icon.png" alt="[oneshot]" border="0"></a></li> +<li><a href="#inv+"><img src="flow_classes/inv+-icon.png" alt="[inv+]" border="0"></a></li> +<li><a href="#inv*"><img src="flow_classes/inv*-icon.png" alt="[inv*]" border="0"></a></li> +<li><a href="#messageprepend"><img src="flow_classes/messageprepend-icon.png" alt="[messageprepend]" border="0"></a></li> +<li><a href="#messageappend"><img src="flow_classes/messageappend-icon.png" alt="[messageappend]" border="0"></a></li> +<li><a href="#shunt"><img src="flow_classes/shunt-icon.png" alt="[shunt]" border="0"></a></li> +<li><a href="#demux"><img src="flow_classes/demux-icon.png" alt="[demux]" border="0"></a></li> +<li><a href="#range"><img src="flow_classes/range-icon.png" alt="[range]" border="0"></a></li> +</ul> +<h4><a href="#PureData_emulation">PureData emulation</a></h4><ul> +<li><a href="#pd_netsend"><img src="flow_classes/pd_netsend-icon.png" alt="[pd_netsend]" border="0"></a></li> +<li><a href="#pd_netreceive"><img src="flow_classes/pd_netreceive-icon.png" alt="[pd_netreceive]" border="0"></a></li> +</ul> +<br><br> +</div></td></tr> <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_making_grids_and_breaking_them_down"></a><h4>Objects for making grids and breaking them down</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#import">#import</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23import-icon.png" alt="[#import]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>This object allows you to produce grids from non-grid data, such as + integers and lists of integers. This object also reframes/resyncs + grids so that multiple grids may be joined together, or + single grids may be split. That kind of operation is already done implicitly in many + cases (e.g. sending an integer or list to a grid-receiving inlet), + but using this object you have greater flexibility on the conversion.</p> <br><b>attr</b> shape <b>(</b><b><i>GridShape|symbol(per_message)</i> shape</b><b>)</b> <br><b>attr</b> cast <b>(</b><b><i>NumberType</i> cast</b><b>)</b> <br><b>method</b> init <b>(</b>shape<b>, </b>cast<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> int <b>(</b><b>)</b> + begins a new grid if there is no current grid. + puts that integer in the current grid. + ends the grid if it is full. + the constructed grid is not stored: it is streamed. + the stream is buffered, so the output is in packets + of about a thousand numbers. <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b><b>)</b> + just like a sequence of ints sent one after another, + except in a single message. <br> + <br><b>inlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> + considered as a list of ascii characters. <br> + <br><b>inlet 0 </b><b>method</b> reset <b>(</b><b>)</b> + aborts the current grid if there is one. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + this is the equivalent of filtering this grid through + an <kbd><font color="#007777">[#export]</font></kbd> object and sending the resulting integers + to this <kbd><font color="#007777">[#import]</font></kbd> object, except that it's over + 10 times faster. <br> + <br><b>inlet 1 </b><b>method</b> per_message <b>(</b><b>)</b> + old synonym for "shape per_message" <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + the grid produced from incoming integers and/or grids. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#export">#export</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23export-icon.png" alt="[#export]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>this object is the opposite of #import.</p> <br><b>method</b> init <b>(</b><b>)</b> + this object is not configurable because there isn't + anything that could possibly be configured here. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + transforms this grid into a sequence of integer messages. <br> + <br><b>outlet 0 </b><b>method</b> int <b>(</b><b>)</b> + elements of the incoming grid. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#export_list">#export_list</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23export_list-icon.png" alt="[#export_list]" border="0"><br clear="left"><br><br><a href="#importexport"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>this object is another opposite of <kbd><font color="#007777">[#import]</font></kbd>, which puts + all of its values in a list.</p> <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + transforms this grid into a single message containing + a list of integers. <br> + <br><b>outlet 0 </b><b>method</b> list <b>(</b><b>)</b> + elements of the incoming grid. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#export_symbol">#export_symbol</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23export_symbol-icon.png" alt="[#export_symbol]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>this object is another opposite of #import, which constructs a symbol + from its input. The values are expected to be valid ASCII codes, but no check + will be performed for that, and additionally, no check will be made that the generated + symbol only contains characters that can be put in a symbol.</p> <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + transforms this grid into a single message containing + a list of integers. <br> + <br><b>outlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> generated symbol<br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#pack">#pack</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23pack-icon.png" alt="[#pack]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Similar to <kbd><font color="#007777">[#join]</font></kbd>, but takes individual integers, and builds a Dim(N) vector out of it. </p> <br><b>attr</b> trigger_by <b>(</b><b><i>TriggerBy</i> trigger_by</b><b>)</b> <br><b>method</b> init <b>(</b><i>integer</i> inputs<b>)</b> <br> + <br><b>inlet * </b><b>method</b> int <b>(</b><b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><b>)</b> + combination of inputs given in all inlets. + this is produced according to the value of the trigger attribute. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#color">#color</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23color-icon.png" alt="[#color]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Triple slider for the selection of RGB values.</p> <br><b>method</b> init <b>(</b><i>float</i> min<b>, </b><i>float</i> max<b>, </b><i>0,1</i> hidepreview<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><b>)</b> + Produces a Dim(3) grid of RGB values. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#unpack">#unpack</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23unpack-icon.png" alt="[#unpack]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>integer</i> outputs<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid(N) <b>(</b><b>)</b> + the input vector is split in N parts containing one number each. + numbers are sent left-to-right, that is, outlet 0 is triggered first, then outlet 1, etc. <br> + <br><b>outlet * </b><b>method</b> int <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#centroid">#centroid</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23centroid-icon.png" alt="[#centroid]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid(rows,columns,1) <b>(</b><b>)</b> + will compute the centroid of the given grid, which + is a weighted average, namely, the average position weighted + by the pixel values. <br> + <br><b>outlet 0 </b><b>method</b> grid(2) <b>(</b><b>)</b> + result <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#centroid2">#centroid2</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23centroid2-icon.png" alt="[#centroid2]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + a new experimental and faster version of #centroid. <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid(rows,columns,1) <b>(</b><b>)</b> + will compute the centroid of the given grid, which + is a weighted average, namely, the average position weighted + by the pixel values. <br> + <br><b>outlet 0 </b><b>method</b> grid(2) <b>(</b><b>)</b> + result <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#for">#for</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23for-icon.png" alt="[#for]" border="0"><br clear="left"><br><br><a href="#for"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>when given scalar bounds, works like a regular <kbd><font color="#007777">[for]</font></kbd> object plugged + to a <kbd><font color="#007777">[#import]</font></kbd> tuned for a Dim(size) where size is the number of values + produced by a bang to that <kbd><font color="#007777">[for]</font></kbd>.</p> <p>when given vector bounds, will work like any number of [for] objects + producing all possible combinations of their values in the proper order. + This replaces the old <kbd><font color="#007777">[#identity_transform]</font></kbd> object.</p> <br><b>method</b> init <b>(</b><i>integer</i> from<b>, </b><i>integer</i> to<b>, </b><i>integer</i> step<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(index)</i> grid<b>)</b> + replaces the "from" value and produces output. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(index)</i> grid<b>)</b> + replaces the "to" value. <br> + <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid(index_steps)</i> grid<b>)</b> + replaces the "step" value. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(size)</i> grid<b>)</b> + where size is floor((to-from+1)/step) + [for scalar bounds] <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(*size,dimension)</i> grid<b>)</b> + where *size is floor((to-from+1)/step) + [for vector bounds] <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Computing"></a><h4>Objects for Computing</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#">#</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23-icon.png" alt="[#]" border="0"><br clear="left"><br><br><a href="#"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>attr</b> op <b>(</b><b><i>grid</i> op</b><b>)</b> <br><b>attr</b> right_hand <b>(</b><b><i>grid</i> right_hand</b><b>)</b> <p>This object outputs a grid by computing "in parallel" a same + operation on each left-hand element with its corresponding right-hand + element. </p> <br><b>method</b> init <b>(</b>op<b>, </b>right_hand<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + on each element of this grid, perform the operation + together with the corresponding element of inlet 1. + in the table of operators (at the top of this document) + elements of inlet 0 are called "A" and elements of inlet 1 + are called "B". the resulting grid is the same size as the + one in inlet 0. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + any grid, preferably shaped like the one that will be put + in the left inlet, or like a subpart of it (anyway the contents + will be redim'ed on-the-fly to fit the grid of inlet-0, + but the stored grid will not be modified itself) <br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> + stores a single int in the right inlet; the same int will + be applied in all computations; this is like sending a + Dim(1) or Dim() grid with that number in it. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="@complex_sq">@complex_sq</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/@complex_sq-icon.png" alt="[@complex_sq]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>this object computes the square of complex numbers. + If seeing imaginary as Y and real as X, then this operation squares + the distance of a point from origin and doubles the angle between it + and the +X half-axis clockwise. (fun, eh?) </p> <p>used on an indexmap, this makes each thing appear twice, + each apparition spanning half of the original angle.</p> <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims... {imaginary real})</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims... {imaginary real})</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#fold">#fold</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23fold-icon.png" alt="[#fold]" border="0"><br clear="left"><br><br><a href="#foldinnerouter"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p><ul> <li><b>1</b> : <kbd><font color="#007777">[#fold +]</font></kbd> computes totals</li> <li><b>2</b> : <kbd><font color="#007777">[#fold inv+]</font></kbd> is an alternated sum (+/-)</li> <li><b>3</b> : <kbd><font color="#007777">[#fold * 1]</font></kbd> can compute the size of a grid using its dimension list</li> <li><b>4</b> : <kbd><font color="#007777">[#fold & 1]</font></kbd> can mean "for all"</li> <li><b>5</b> : <kbd><font color="#007777">[#fold | 0]</font></kbd> can mean "there exists (at least one)"</li> <li><b>6</b> : <kbd><font color="#007777">[#fold ^ 0]</font></kbd> can mean "there exists an odd number of..."</li> <li><b>7</b> : <kbd><font color="#007777">[#fold ^ 1]</font></kbd> can mean "there exists an even number of...".</li> </ul></p> <br><b>method</b> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> seed<b>, </b><i>grid</i> right_hand<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims..., last)</i> grid<b>)</b> + replaces every Dim(last) subgrid by the result of a cascade on that subgrid. + Doing that + with seed value 0 and operation + on grid "2 3 5 7" will compute + ((((0+2)+3)+5)+7) find the total "17". + produces a Dim(dims) grid. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#scan">#scan</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23scan-icon.png" alt="[#scan]" border="0"><br clear="left"><br><br><a href="#scan"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p><kbd><font color="#007777">[#scan +]</font></kbd> computes subtotals; this can be used, for example, + to convert a regular probability distribution into a cumulative one. + (or in general, discrete integration) </p> <br><b>method</b> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> seed<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims..., last)</i> grid<b>)</b> + replaces every Dim(last) subgrid by all the results of + cascading the operator on that subgrid, + producing a Dim(dims,last) grid. + For example, with base value 0 and operation + on grid "2 3 5 + 7" will compute 0+2=2, 2+3=5, 5+5=10, 10+7=17, and give the + subtotals "2 5 10 17". <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#outer">#outer</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23outer-icon.png" alt="[#outer]" border="0"><br clear="left"><br><br><a href="#foldinnerouter"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid</i> value<b>)</b> + the operator must be picked from the table of two-input operators. + the grid is optional and corresponds to inlet 1. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(anyA...)</i> grid<b>)</b> <br> + + produces a grid of size Dim(anyA..., anyB...), where numbers + are the results of the operation on every element of A and + every element of B. the resulting array can be very big. Don't + try this on two pictures (the result will have 6 dimensions) <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(anyB...)</i> grid<b>)</b> <br> + + stores the specified grid, to be used when inlet 0 is activated. <p>When given a grid of Dim(3) and a grid of Dim(5) <kbd><font color="#007777">[#outer]</font></kbd> will + produce a grid of Dim(3,5) with the selected two-input operation + applied on each of the possible pairs combinations between numbers + from the left grid and the ones from the right. for example : + (10,20,30) [#outer +] (1,2,3) will give : + ((11,12,13),(21,22,23),(31,32,33)) </p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#inner">#inner</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23inner-icon.png" alt="[#inner]" border="0"><br clear="left"><br><br><a href="#inner"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>think of this one as a special combination of <kbd><font color="#007777">[#outer]</font></kbd>, <kbd><font color="#007777">[#]</font></kbd> and <kbd><font color="#007777">[#fold]</font></kbd>. this is one of the most complex operations. It is very useful + for performing linear transforms like rotations, scalings, shearings, + and some kinds of color remappings. A linear transform is done by + something called matrix multiplication, which happens to be <kbd><font color="#007777">[#inner * + + 0]</font></kbd>. <kbd><font color="#007777">[#inner]</font></kbd> also does dot product and other funny operations.</p> <br><b>method</b> init <b>(</b><i>numop2</i> op_para<b>, </b><i>numop2</i> op_fold<b>, </b><i>integer</i> base<b>, </b><i>grid</i> right_hand<b>)</b> + op_para and op_fold are two operators picked from the table + of two-input operators. + the base value has to be specified (has no default value yet). <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(anyA..., lastA)</i> grid<b>)</b> + Splits the Dim(anyA...,lastA) left-hand grid into Dim(anyA...) + pieces of Dim(lastA) size. + Splits the Dim(firstB,anyB...) right-hand grid into + Dim(anyB...) pieces of Dim(firstB) size. + On every piece pair, does <kbd><font color="#007777">[#]</font></kbd> using the specified + op_para operation, followed by a <kbd><font color="#007777">[#fold]</font></kbd> using + the specified op_fold operator and base value. + creates a Dim(anyA...,anyB...) grid by assembling all + the results together. + (note: lastA must be equal to firstB.) <br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> + changes the base value to that. <br> + <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid(anyB..., lastB)</i> grid<b>)</b> + changes the right-hand side grid to that. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="@join">@join</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/@join-icon.png" alt="[@join]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>which_dim<b>)</b> + Which_dim is the number of the dimension by which the join will + occur. For N-dimensional grids, the dimensions are numbered from 0 + to N-1. In addition, negative numbers from -N to -1 may be used, to + which N will be added. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + The left grid and right grid must have the same number + of elements in all dimensions except the one specified. + The result will have the same number of elements in all + dimensions except the one specified, which will be the + sum of the two corresponding one. <p>For example, joining a RGB picture Dim[y,x,3] and a + greyscale picture Dim[y,x,1] on dimension 2 (or -1) could + make a RGBA picture Dim[y,x,4] in which the greyscale image + becomes the opacity channel. </p> <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#finished">#finished</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23finished-icon.png" alt="[#finished]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> + + a bang is emitted every time a grid transmission ends. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#cast">#cast</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23cast-icon.png" alt="[#cast]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>numbertype</i> numbertype<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a grid of the same shape containing all the same + values after type conversion. note that while casting to + a smaller type, values that are overflowing will be truncated. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#ravel">#ravel</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23ravel-icon.png" alt="[#ravel]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + like <kbd><font color="#007777">[#redim]</font></kbd> but always produce a 1-D grid + with the same total number of elements. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#grade">#grade</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23grade-icon.png" alt="[#grade]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> <p>splits a Dim[A...,B] grid into Dim[B] vectors, + producing new Dim[B] vectors that each contain numbers from + 0 to B-1 indicating the ordering of the values. The result is + a Dim[A...,B] grid.</p> <p>for example, connecting a [#grade] to a <kbd><font color="#007777">[#outer ignore {0}]</font></kbd> + to a <kbd><font color="#007777">[#store]</font></kbd> object, storing a single vector into <kbd><font color="#007777">[#store]</font></kbd>, and + sending the same vector to <kbd><font color="#007777">[#grade]</font></kbd>, will sort the values of the + vector. however for higher-dimensional grids, what should go + between <kbd><font color="#007777">[#store]</font></kbd> and <kbd><font color="#007777">[#grade]</font></kbd> to achieve the same result would + be more complex.</p> <p>you may achieve different kinds of sorting by applying various + filters before <kbd><font color="#007777">[#grade]</font></kbd>. the possibilities are unlimited.</p> <p>if you plug <kbd><font color="#007777">[#grade]</font></kbd> directly into another <kbd><font color="#007777">[#grade]</font></kbd>, you will + get the inverse arrangement, which allows to take the sorted values + and make them unsorted in the original way. note that this is really + not the same as just listing the values backwards.</p> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#perspective">#perspective</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23perspective-icon.png" alt="[#perspective]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>integer</i> depth<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> any grid<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> <p>transforms a Dim[A...,B] grid into a Dim[A...,B-1] grid. + There is a projection plane perpendicular to the last axis and + whose position is given by the "depth" parameter. Each vector's + length is adjusted so that it lies onto that plane. Then the + last dimension of each vector is dropped.</p> <p>useful for converting from 3-D geometry to 2-D geometry. Also + useful for converting homogeneous 3-D into regular 3-D, as + homogeneous 3-D is really just regular 4-D...(!)</p> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#transpose">#transpose</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23transpose-icon.png" alt="[#transpose]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>integer</i> dim1<b>, </b><i>integer</i> dim2<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + swaps the two specified dimensions; dimension numbers are as in <kbd><font color="#007777">[#join]</font></kbd>. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#fade">#fade</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23fade-icon.png" alt="[#fade]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>integer</i> rate<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + produces on outlet 0 a linear recurrent fading according to the flow of + incoming messages. For example, if rate=5, then 20% (one fifth) + of each new message will be blended with 80% of the previous output. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#fade_lin">#fade_lin</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23fade_lin-icon.png" alt="[#fade_lin]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>integer</i> maxraise<b>, </b><i>integer</i> maxdrop<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + produces on outlet 0 a piecewise-linear nonrecurrent fading according to the flow of + incoming messages. For example, if maxraise=2 and maxdrop=4, then with each + new message an output is produced that is at most 2 more or 4 less than the + previous output. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#reverse">#reverse</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23reverse-icon.png" alt="[#reverse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>whichdim<b>)</b> + Whichdim is the number of the dimension by which the reverse will + occur. For N-dimensional grids, the dimensions are numbered from 0 + to N-1. In addition, negative numbers from -N to -1 may be used, to + which N will be added. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Coordinate_Transforms"></a><h4>Objects for Coordinate Transforms</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#redim">#redim</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23redim-icon.png" alt="[#redim]" border="0"><br clear="left"><br><br><a href="#redim"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>dim_list</i> dims<b>)</b> + a list specifying a grid shape that the numbers + will fit into. + (same as with <kbd><font color="#007777">[#import]</font></kbd>) <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + the elements of this grid are serialized. if the resulting grid + must be larger, the sequence is repeated as much as necessary. + if the resulting grid must be smaller, the sequence is truncated. + then the elements are deserialized to form the resulting grid. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(rank)</i> grid<b>)</b> + this grid is a dimension list that replaces the one + specified in the constructor. + (same as with <kbd><font color="#007777">[#import]</font></kbd>) <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> + redimensioned grid potentially containing repeating data. <br> + <p>example: with a 240 320 RGB image, <kbd><font color="#007777">[#redim 120 640 3]</font></kbd> will visually + separate the even lines (left) from the odd lines (right). contrary + to this, <kbd><font color="#007777">[#redim 640 120 3]</font></kbd> will split every line and put its left half + on a even line and the right half on the following odd line. <kbd><font color="#007777">[#redim]</font></kbd> + 480 320 3 will repeat the input image twice in the output image. <kbd><font color="#007777">[#redim]</font></kbd> 240 50 3 will only keep the 50 top lines.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#store">#store</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23store-icon.png" alt="[#store]" border="0"><br clear="left"><br><br><a href="#store"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>A <kbd><font color="#007777">[#store]</font></kbd> object can store exactly one grid, using the right + inlet. You fetch it back, or selected subparts thereof, using the left + inlet.</p> <br><b>method</b> init <b>(</b><i>grid</i> contents<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> + the stored grid is fully sent to the outlet. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims..., indices)</i> grid<b>)</b> + in this grid, the last dimension refers to subparts of + the stored grid. sending a Dim(200,200,2) on a <kbd><font color="#007777">[#store]</font></kbd> + that holds a Dim(240,320,3) will cause the <kbd><font color="#007777">[#store]</font></kbd> to handle + the incoming grid as a Dim(200,200) of Dim(2)'s, where each + Dim(2) represents a position in a Dim(240,320) of Dim(3)'s. + therefore the resulting grid will be a Dim(200,200) of + Dim(3) which is a Dim(200,200,3). in practice this example + would be used for generating a 200*200 RGB picture from a + 200*200 XY map and a 240*320 RGB picture. this object can + be logically used in the same way for many purposes + including color palettes, tables of probabilities, tables + of statistics, whole animations, etc. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + replace the whole grid, or a subpart of it (see other options on inlet 1) <br> + <br><b>inlet 1 </b><b>method</b> reassign <b>(</b><b>)</b> (Future Use): + makes it so that sending a grid to inlet 1 detaches the old buffer from [#store] + and attaches a new one instead. This is the default. <br> + <br><b>inlet 1 </b><b>method</b> put_at <b>(</b>indices...<b>)</b> (Future Use): + makes it so that sending a grid to inlet 1 writes into the existing buffer of [#store]. <p> + example: suppose you have <kbd><font color="#007777">[#store {10 240 320 3}]</font></kbd>. then "put_at 3" + will allow to write a Dim[240,320,3] grid in indices (3,y,x,c) where y,x,c are indices of the incoming grid; + in other words, if that's a buffer of 10 RGB frames, you'd be replacing frame #3. Furthermore, + it also allows you to write a Dim[n,240,320,3] grid at (3+f,y,x,c) where f,y,x,c are indices of the incoming grid, + replacing frame #3, #4, ... up to #3+n-1. Here n is at most 7 because the last frame in the buffer is #9. </p> <p>that way of working extends to other kinds of data you'd put in Grids, in any numbers of dimensions; + because, as usual, [#store] wouldn't know the difference. </p> <br> + + grids as stored, as indexed, or as assembled from multiple + indexings. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#scale_to">#scale_to</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23scale_to-icon.png" alt="[#scale_to]" border="0"><br clear="left"><br><br><a href="#scale_to"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>size<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a 3-channel picture to be scaled.<br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> a {height width} pair.<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a scaled 3-channel picture.<br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#scale_by">#scale_by</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23scale_by-icon.png" alt="[#scale_by]" border="0"><br clear="left"><br><br><a href="#scale_by"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>grid dim() or dim(2)</i> factor<b>)</b> + factor is optional (default is 2). + if it's a single value, then that factor is to be used + for both rows and columns. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + duplicates each pixel several times in width and several times in height, + where the number of times is determined by the factor described above. + twice those of the incoming grid. It is several times faster. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets factor<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid((factor*y) (factor*x) channels)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#downscale_by">#downscale_by</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23downscale_by-icon.png" alt="[#downscale_by]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>+integer</i> factor<b>, </b><i>optional symbol(smoothly)</i> how<b>)</b> + factor is optional (default is 2). + if it's a single value, then that factor is to be used + for both rows and columns. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + Scales down picture by specified amount. (See scale factor above) <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(1 or 2)</i> grid<b>)</b> sets scale factor<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid((factor/y) (factor/x) channels)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#spread">#spread</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23spread-icon.png" alt="[#spread]" border="0"><br clear="left"><br><br><a href="#spread"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>typically you plug a <kbd><font color="#007777">[#for]</font></kbd> into this object, + and you plug this object into the left side of a <kbd><font color="#007777">[#store]</font></kbd>. it will + scatter pixels around, giving an "unpolished glass" effect.</p> <p>if you put a picture in it, however, it will add noise. The + resulting values may be out of range, so you may need to clip them + using min/max.</p> <br><b>method</b> init <b>(</b>factor<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a coordinate map.<br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> a spread factor.<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid</i> grid<b>)</b> a coordinate map.<br> + <p><kbd><font color="#007777">[#spread]</font></kbd> scatters the pixels in an image. Not all original pixels + will appear, and some may get duplicated (triplicated, etc) + randomly. Some wrap-around effect will occur close to the edges. </p> <p> Sending an integer to inlet 1 sets the amount of spreading in + maximum number of pixels + 1. even values translate the whole image + by half a pixel due to rounding.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#rotate">#rotate</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23rotate-icon.png" alt="[#rotate]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>performs rotations on indexmaps and polygons and such.</p> <br><b>method</b> init <b>(</b><i>0...35999</i> angle<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(anyA 2)</i> grid<b>)</b> <br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> rotation angle; 0...36000<br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(anyA 2)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#remap_image">#remap_image</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23remap_image-icon.png" alt="[#remap_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>if you chain indexmap (coordinate) transformations from outlet 1 + to inlet 1, then sending an image in inlet 0 will emit its + deformation out of outlet 0.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Reporting"></a><h4>Objects for Reporting</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#dim">#dim</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23dim-icon.png" alt="[#dim]" border="0"><br clear="left"><br><br><a href="#dim"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>Returns list of dimensions as a grid. Given a grid sized like Dim(240,320,4), <kbd><font color="#007777">[#dim]</font></kbd> will return a grid like Dim(3), whose values are 240, 320, 4. </p> <br><b>method</b> init <b>(</b><b>)</b> + no arguments. <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + ignores any data contained within. + sends a grid dim(length of dims) containing dims. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rank)</i> grid<b>)</b> + the list of dimensions of the incoming grid. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#type">#type</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23type-icon.png" alt="[#type]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>gives a symbol representing the numeric type of the grid received. </p> <br><b>outlet 0 </b><b>method</b> <numeric type symbol> <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#print">#print</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23print-icon.png" alt="[#print]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(dims...)</i> grid<b>)</b> + prints the dimensions of the grid. + prints all the grid data if there are 2 dimensions or less. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="rubyprint">rubyprint</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/rubyprint-icon.png" alt="[rubyprint]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + This is only for testing the translation from PD to Ruby. <br><b>method</b> init <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> (any) <b>(</b><b>)</b> + prints the message to the console. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="printargs">printargs</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/printargs-icon.png" alt="[printargs]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + This is only for testing the translation from PD to Ruby. <br><b>method</b> init <b>(</b>any...<b>)</b> + prints everything. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="display">display</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/display-icon.png" alt="[display]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + GUI object equivalent to [print] and [#print]. <br><b>method</b> (any) <b>(</b><b>)</b> + Displays the received message in the box, resizing the box so that the message fits exactly. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Color_Conversion"></a><h4>Objects for Color Conversion</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#apply_colormap_channelwise">#apply_colormap_channelwise</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23apply_colormap_channelwise-icon.png" alt="[#apply_colormap_channelwise]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>This object is useful for color correction. For each pixel + it takes it apart, looks up each part separately in the colormap, + and constructs a new pixel from that. You may also color-correct + colormaps themselves.</p> <p>Only works for things that have 3 channels.</p> <p>Note: if you just need to apply a palette on an indexed-color + picture, you don't need this. Just use #store instead.</p> <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> + picture <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(intensities channels)</i> grid<b>)</b> + colormap ("palette") <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> + picture <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#rgb_to_greyscale">#rgb_to_greyscale</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23rgb_to_greyscale-icon.png" alt="[#rgb_to_greyscale]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#greyscale_to_rgb">#greyscale_to_rgb</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23greyscale_to_rgb-icon.png" alt="[#greyscale_to_rgb]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {white})</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#yuv_to_rgb">#yuv_to_rgb</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23yuv_to_rgb-icon.png" alt="[#yuv_to_rgb]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>note: may change slightly to adapt to actual video standards.</p> <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {y u v})</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#rgb_to_yuv">#rgb_to_yuv</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23rgb_to_yuv-icon.png" alt="[#rgb_to_yuv]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>note: may change slightly to adapt to actual video standards.</p> <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {red green blue})</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns {y u v})</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Objects_for_Miscellaneous_Picture_Processing"></a><h4>Objects for Miscellaneous Picture Processing</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#convolve">#convolve</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23convolve-icon.png" alt="[#convolve]" border="0"><br clear="left"><br><br><a href="#convolve"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p>this is the object for blurring, sharpening, finding edges, + embossing, cellular automata, and many other uses.</p> <br><b>method</b> init <b>(</b><i>numop2</i> op_para<b>, </b><i>numop2</i> op_fold<b>, </b><i>grid</i> seed<b>, </b><i>grid</i> right_hand<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns rest...)</i> grid<b>)</b> + splits the incoming grid into dim(rest...) parts. + for each of those parts at (y,x), a rectangle of such + parts, centered around (y,x), is combined with the + convolution grid like a <kbd><font color="#007777">[#]</font></kbd> of operation op_para. Then + each such result is folded like <kbd><font color="#007777">[#fold]</font></kbd> of operation + op_fold and specified base. the results are assembled + into a grid that is sent to the outlet. near the borders of + the grid, coordinates wrap around. this means the whole grid + has to be received before production of the next grid + starts. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(rows2 columns2)</i> grid<b>)</b> + this is the convolution grid and it gets stored in + the object. if rows2 and/or columns2 are odd numbers, + then the centre of convolution is the middle of the convolution + grid. if they are even numbers, then the chosen centre will + be slightly more to the left and/or to the top, because the + actual middle is between cells of the grid. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns rest...)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#contrast">#contrast</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23contrast-icon.png" alt="[#contrast]" border="0"><br clear="left"><br><br><a href="#contrast"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>iwhiteness<b>, </b>contrast<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> + produces a grid like the incoming grid but with + different constrast. <br> + <p><kbd><font color="#007777">[#contrast]</font></kbd> adjusts the intensity in an image. + resulting values outside 0-255 are automatically clipped.</p> <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> + this is the secondary contrast (inverse whiteness). + it makes the incoming black + correspond to a certain fraction between output black and the + master contrast value. no effect is 256. default value is 256. <br> + <br><b>inlet 2 </b><b>method</b> int <b>(</b><b>)</b> + this is the master contrast. it makes the incoming white + correspond to a certain fraction between output black and output + white. no effect is 256. default value is 256. <br> + <br><b>outlet </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#posterize">#posterize</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23posterize-icon.png" alt="[#posterize]" border="0"><br clear="left"><br><br><a href="#posterize"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p><kbd><font color="#007777">[#posterize]</font></kbd> reduces the number of possible intensities in an image; + it rounds the color values.The effect is mostly apparent with a low + number of levels.</p> <br><b>method</b> init <b>(</b>levels<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> + produces a posterized picture from the input picture. <br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><b>)</b> + this is the number of possible levels per channel. the + levels are equally spaced, with the lowest at 0 and the + highest at 255. the minimum number of levels is 2, and the + default value is 2. <br> + <p>example: simulate the 216-color "web" palette using 6 levels. + simulate a 15-bit display using 32 levels.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#solarize">#solarize</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23solarize-icon.png" alt="[#solarize]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>makes medium intensities brightest; formerly brightest colours + become darkest; formerly darkest stays darkest. This filter is linear: + it's like a 200% contrast except that overflows are <i>mirrored</i> + instead of clipped or wrapped.</p> <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(rows columns channels)</i> grid<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#checkers">#checkers</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23checkers-icon.png" alt="[#checkers]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x {y x})</i> grid<b>)</b> + result from a <kbd><font color="#007777">[#for {0 0} {height width} {1 1}]</font></kbd> <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b> + checkered pattern of 50%/75% greys + in 8x8 squares <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#layer">#layer</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23layer-icon.png" alt="[#layer]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x {r g b a})</i> grid<b>)</b> + a picture that has an opacity channel. + will be used as foreground. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b> + a picture that has NO opacity channel. + will be used as background. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x {r g b})</i> grid<b>)</b> + a picture that has NO opacity channel. + the opacity channel of the foreground is used as + a weighting of how much of either picture is seen + in the result. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#draw_image">#draw_image</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23draw_image-icon.png" alt="[#draw_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid(y,x,channels)</i> picture<b>, </b><i>grid({y x})</i> position<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + picture onto which another picture will be superimposed. <br> + <br><b>inlet 0 </b><b>method</b> tile <b>(</b><i>0 or 1</i> flag<b>)</b> + if enabled, inlet 1 picture will be repeated to cover the inlet 0 picture. <br> + <br><b>inlet 0 </b><b>method</b> alpha <b>(</b><i>0 or 1</i> flag<b>)</b> + if enabled, inlet 1 picture will be combined with inlet 0 picture using + the selected operator, + and then blended with inlet 0 picture according to transparency of + the inlet 1 picture, and then inserted in the result. + if disabled, the blending doesn't occur, as the transparency level + is considered to be "opaque". note that with alpha enabled, + the last channel of inlet 1 picture is considered to represent transparency. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + picture that will be superimposed onto another picture. <br> + <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid({y x})</i> grid<b>)</b> + position of the inlet 0 picture corresponding to top-left corner + of inlet 1 picture. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + resulting picture. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#draw_polygon">#draw_polygon</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23draw_polygon-icon.png" alt="[#draw_polygon]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>numop2</i> operator<b>, </b><i>grid(channels)</i> color<b>, </b><i>grid(vertices,{y x})</i> vertices<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + picture on which the polygon will be superimposed. <br> + <br><b>inlet 1 </b><b>method</b> grid <b>(</b><i>grid(channels)</i> grid<b>)</b> + color of each pixel <br> + <br><b>inlet 2 </b><b>method</b> grid <b>(</b><i>grid(vertices {y x})</i> grid<b>)</b> + vertices of the polygon. <br> + <br><b>outlet 0 </b><b>method</b> grid <b>(</b><i>grid(y x channels)</i> grid<b>)</b> + modified picture. + note: starting with 0.7.2, drawing a 1-by-1 + square really generates a 1-by-1 square, and + so on. This is because the right-hand border of a + polygon is excluded, whereas it was included + before, leading to slightly-wider-than-expected polygons. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#text_to_image">#text_to_image</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23text_to_image-icon.png" alt="[#text_to_image]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>inlet 2 receives a font grid, for example, [#in grid file lucida-typewriter-12.grid.gz]</p> <p>inlet 1 receives a 2 by 3 matrix representing the colours to use (e.g. (2 3 # 0 170 0 255 255 0) means yellow on green)</p> <p>inlet 0 receives a bang, transforming the data into an image suitable for #draw_image.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#hueshift">#hueshift</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23hueshift-icon.png" alt="[#hueshift]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>inlet 1 receives an angle (0..36000)</p> <p>inlet 0 receives a RGB picture that gets hueshifted by a rotation in the colorwheel by the specified angle; it gets sent to outlet 0.</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="Other_Objects"></a><h4>Other Objects</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="rtmetro">rtmetro</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/rtmetro-icon.png" alt="[rtmetro]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> +This class has been removed (0.7.7).<br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="bindpatcher">bindpatcher</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/bindpatcher-icon.png" alt="[bindpatcher]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>sets the receive-symbol for the Pd patcher it is in.</p> <p>has no inlets, no outlets.</p> <p>EXPERIMENTAL.</p> <br><b>method</b> init <b>(</b><i>symbol</i> symbol<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="pingpong">pingpong</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/pingpong-icon.png" alt="[pingpong]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Transforms linear counting (0, 1, 2, 3, 4, ...) into a back-and-forth counting (0, 1, 2, 1, 0, ...) + from 0 to a specified upper bound. <br><b>method</b> init <b>(</b><i>int</i> top<b>)</b> <br> + <br><b>inlet 1 </b><b>method</b> float <b>(</b><i>float</i> top<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> float <b>(</b><b>)</b> + a value to be transformed. + If, for example, top=10, then values 0 thru 10 are left unchanged, + values 11 thru 19 are mapped to 9 thru 1 respectively, and 20 thru 30 + are mapped to 0 thru 10, and so on. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="#global">#global</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/%23global-icon.png" alt="[#global]" border="0"><br clear="left"><br><br><a href="#global"><img src="images/see_screenshot.png" border="0"></a><br clear="left"><br></td><td><br> + <p> + objects of this class do nothing by themselves and are just + an access point to features that don't belong to any object in + particular. </p> <br><b>method</b> profiler_reset <b>(</b><b>)</b> + resets all the time counters. <br> + <br><b>method</b> profiler_dump <b>(</b><b>)</b> + displays the time counters in decreasing order, with + the names of the classes those objects are in. this is + an experimental feature. like most statistics, + it could be vaguely relied upon if + only you knew to which extent it is unreliable. more on this + in a future section called "profiling". <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="fps">fps</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/fps-icon.png" alt="[fps]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>symbol(real|user|system|cpu)</i> clocktype<b>, </b><i>symbol(detailed)</i> detailed<b>)</b> <br> + <br><b>method</b> init detailed <b>(</b><b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> + Times at which bangs are received are stored until a large + enough sample of those is accumulated. Large enough is defined + to be whenever the timespan exceeds one second. Then a report + is made through the outlet. <br> + <br><b>inlet 0 </b><b>method</b> (else) <b>(</b><b>)</b> + messages other than bangs are ignored. <br> + <br><b>outlet 0 </b><b>method</b> float <b>(</b><b>)</b> + non-detailed mode only. + this is the messages-per-second rating. <br> + <br><b>outlet 0 </b><b>method</b> list(float,6) <b>(</b><b>)</b> + detailed mode only. + this is: messages-per-second, followed by five values of + milliseconds-per-message: minimum, median, maximum, average, + standard deviation. + (the average happens to be simply 1000 divided by the + messages-per-second, but it is convenient to have it anyway) <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="unix_time">unix_time</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/unix_time-icon.png" alt="[unix_time]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object returns the Unix timestamp. The first + outlet does so with ASCII, the second in seconds and the third outlet + outputs the fractions of seconds up to 1/100 000 th of a second which is useful for creating + filenames. </p> <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> +Outputs the time and date in ASCII format <br><b>outlet 1 </b><b>method</b> float <b>(</b><b>)</b> <br> +Outputs the Unix timestamp in seconds <br><b>outlet 2 </b><b>method</b> float <b>(</b><b>)</b> <br> +Outputs the fractions of a second up to 10 microseconds (?) (actual precision is platform-dependent afaik) <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="ls">ls</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/ls-icon.png" alt="[ls]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object is similar to the Unix list command + 'ls'. It returns the names of files in a given + directory. May be used with [listlength] to retrieve the number of files. + Hidden files are displayed. </p> <br><b>inlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="exec">exec</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/exec-icon.png" alt="[exec]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object launches a Unix shell program or script. </p> <br><b>inlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="renamefile">renamefile</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/renamefile-icon.png" alt="[renamefile]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object accepts a list of two elements as arguments. + The current file name being the first and the second is the desired change + in name. </p> <br><b>inlet 0 </b><b>method</b> list <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="plotter_control">plotter_control</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/plotter_control-icon.png" alt="[plotter_control]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p> + This object produces HPGL instructions in ASCII form + that can be sent to the comport object in order to control an HPGL + compatible plotter. </p> <br><b>inlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> symbol <b>(</b><b>)</b> <br> +Outputs the HPGL commands in ASCII format <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="rubyarray">rubyarray</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/rubyarray-icon.png" alt="[rubyarray]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>inlet 0 float : sends the specified array entry to outlet 0</p> <p>inlet 1 list: writes that list as an array entry in position last specified by inlet 0.</p> <p>inlet 0 save(symbol filename): writes the array contents to a file of the given filename as a CSV</p> <p>inlet 0 save(symbol filename, symbol format): same thing but using a sprintf string such as %x,%f or whatever</p> <p>inlet 0 load(symbol filename): replace all array contents by the contents of a CSV file</p> <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="jMax_emulation"></a><h4>jMax emulation</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td></td><td></td><td><p>those classes emulate jMax functionality, + for use within PureData and Ruby.</p></td></tr> +<tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="fork">fork</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/fork-icon.png" alt="[fork]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Every incoming message is sent to inlet 1 and then sent to + inlet 0 as well. Messages remain completely unaltered. Contrast + with PureData's "t a a" objects, which have the same purpose but + transform bangs into zeros and such.</p> <br><b>inlet 0 </b><b>method</b> (any) <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="jmax_udpsend">jmax_udpsend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/jmax_udpsend-icon.png" alt="[jmax_udpsend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Sends messages (but not grids nor dspsignals) via UDP (which + does not involve a connection, and may lose packets in case of + network overload or noise or etc). <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> <br><b>method</b> init <b>(</b><i>host</i> host<b>, </b><i>integer</i> port<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> <any> <b>(</b><b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="jmax_udpreceive">jmax_udpreceive</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/jmax_udpreceive-icon.png" alt="[jmax_udpreceive]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <p>Counterpart of jmax_udpsend</p> <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> <br><b>method</b> init <b>(</b><i>integer</i> port<b>)</b> <br> + <br><b>outlet 0 </b><b>method</b> <any> <b>(</b><b>)</b> <br> + <br><b>outlet 1 </b><b>method</b> list <b>(</b>protocol_name<b>, </b>sender_port<b>, </b>sender_host<b>, </b>sender_ip_address<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="foreach">foreach</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/foreach-icon.png" alt="[foreach]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs N messages, one per list element, in order. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="rubysprintf">rubysprintf</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/rubysprintf-icon.png" alt="[rubysprintf]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>symbol</i> format<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b><b>)</b> + Outputs the format string with %-codes replaced + by elements of the list formatted as the %-codes say. + To get a list of those codes, consult a Ruby manual + (Equivalently, Perl, Python, Tcl and C all have equivalents of this, + and it's almost always called sprintf, or the % operator, or both) <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listflatten">listflatten</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listflatten-icon.png" alt="[listflatten]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listmake">listmake</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listmake-icon.png" alt="[listmake]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Emulation of jMax's [list] (but there cannot be a class named [list] in Pd) <br><b>method</b> init <b>(</b>list...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> bang <b>(</b><b>)</b> send "list" to outlet 0<br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b><b>)</b> as sending to inlet 1 and then banging; that is, passes thru and remembers.<br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listlength">listlength</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listlength-icon.png" alt="[listlength]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b><b>)</b> + outputs the number of elements in the incoming list. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listelement">listelement</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listelement-icon.png" alt="[listelement]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>int</i> index<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs one element of the list, as selected by "index". + Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listsublist">listsublist</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listsublist-icon.png" alt="[listsublist]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>int</i> index<b>, </b><i>int</i> length<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs consecutive elements of the list, as selected by "index" and "length". + Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listprepend">listprepend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listprepend-icon.png" alt="[listprepend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>list...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs the stored list followed by the incoming list, all in one message. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listappend">listappend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listappend-icon.png" alt="[listappend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>list...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs the incoming list followed by the stored list, all in one message. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="listreverse">listreverse</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/listreverse-icon.png" alt="[listreverse]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>inlet 0 </b><b>method</b> list <b>(</b>...<b>)</b> + Outputs the incoming list, from last element to first element. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="oneshot">oneshot</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/oneshot-icon.png" alt="[oneshot]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Like [spigot], but turns itself off after each message, so you have to turn it on + again to making it pass another message. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="inv+">inv+</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/inv+-icon.png" alt="[inv+]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>float</i> b<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> float <b>(</b><i>float</i> a<b>)</b> + outputs b-a <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="inv*">inv*</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/inv*-icon.png" alt="[inv*]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b><i>float</i> b<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> float <b>(</b><i>float</i> a<b>)</b> + outputs b/a <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="messageprepend">messageprepend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/messageprepend-icon.png" alt="[messageprepend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + (This is not in jMax, but is there to help port $* messageboxes) <br><b>method</b> init <b>(</b>list...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> <any> <b>(</b>...<b>)</b> + Like [listprepend], but operates on whole messages, that is, including the selector. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="messageappend">messageappend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/messageappend-icon.png" alt="[messageappend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + (This is not in jMax, but is there to help port $* messageboxes) <br><b>method</b> init <b>(</b>list...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> <any> <b>(</b>...<b>)</b> + Like [listappend], but operates on whole messages, that is, including the selector. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="shunt">shunt</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/shunt-icon.png" alt="[shunt]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + Compatible with jMax's [demux]. <br><b>method</b> init <b>(</b>n<b>, </b>i<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> <any> <b>(</b>...<b>)</b> + Routes a message to the active outlet. <br> + <br><b>inlet 1 </b><b>method</b> int <b>(</b><i>int</i> i<b>)</b> + Selects which outlet is active. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="demux">demux</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/demux-icon.png" alt="[demux]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + please use shunt instead (name conflict with another Pd external) <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="range">range</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/range-icon.png" alt="[range]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + <br><b>method</b> init <b>(</b>separators...<b>)</b> <br> + <br><b>inlet 0 </b><b>method</b> float <b>(</b><b>)</b> + a value to be sent to one of the outlets. The first outlet is for values + smaller than the first argument; else the second outlet is for values smaller + than the second argument; and so on; and the last outlet is for values greater + or equal to the last argument. <br> + <br><b>inlet 1..n </b><b>method</b> float <b>(</b><b>)</b> + sets the corresponding separator in the separator list. <br> + <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <tr><td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"><a name="PureData_emulation"></a><h4>PureData emulation</h4></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="pd_netsend">pd_netsend</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/pd_netsend-icon.png" alt="[pd_netsend]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + same as jmax_udpsend but for PureData UDP connections. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td colspan="4" bgcolor="#ffb080"><b> class </b><a name="pd_netreceive">pd_netreceive</a></td></tr><tr><td></td><td valign="top"><br> +<img src="flow_classes/pd_netreceive-icon.png" alt="[pd_netreceive]" border="0"><br clear="left"><br><br><br clear="left"><br></td><td><br> + + same as jmax_udpreceive but for PureData UDP connections. <br></td></tr><tr><td></td><td></td><td> </td></tr> +<tr><td> </td></tr> + <td colspan="4" bgcolor="black"> +<img src="images/black.png" width="1" height="2"></td></tr> +<tr><td colspan="4"> +<p><font size="-1"> +GridFlow 0.8.0 Documentation<br> +Copyright © 2001,2002,2003,2004,2005 by Mathieu Bouchard +<a href="mailto:matju@sympatico.ca">matju@artengine.ca</a> +</font></p> +</td></tr></table></body></html> + + diff --git a/externals/gridflow/doc/reference.xml b/externals/gridflow/doc/reference.xml new file mode 100644 index 00000000..8a5f8f7e --- /dev/null +++ b/externals/gridflow/doc/reference.xml @@ -0,0 +1,1591 @@ +<?xml version="1.0" standalone="no" ?> +<!DOCTYPE documentation SYSTEM 'gridflow.dtd'> +<documentation title="Reference Manual: Flow Classes" indexcols="3"> +<!-- $Id: reference.xml,v 1.1 2005-10-04 02:09:43 matju Exp $ --> +<!-- + GridFlow Reference Manual: Class Reference + Copyright (c) 2001,2002,2003,2004 by Mathieu Bouchard and Alexandre Castonguay +--> + +<section name="Objects for making grids and breaking them down"> + <class name="#import"> + <icon text="[#import {240 320 3}]"/> + <help text="[#import {240 320 3}]" image="#importexport" /> + <p>This object allows you to produce grids from non-grid data, such as + integers and lists of integers. This object also reframes/resyncs + grids so that multiple grids may be joined together, or + single grids may be split. That kind of operation is already done implicitly in many + cases (e.g. sending an integer or list to a grid-receiving inlet), + but using this object you have greater flexibility on the conversion.</p> + <attr name="shape" type="GridShape|symbol(per_message)" default="per_message"> + a list specifying a grid shape that the numbers + will fit into; or "per_message" indicating each incoming message + will be turned into a vector. + </attr> + <attr name="cast" type="NumberType" default="int32"/> + <method name="init"> + <arg name="shape" isattr="yes"/> + <arg name="cast" isattr="yes"/> + </method> + <inlet id="0"> + <method name="int"> + begins a new grid if there is no current grid. + puts that integer in the current grid. + ends the grid if it is full. + the constructed grid is not stored: it is streamed. + the stream is buffered, so the output is in packets + of about a thousand numbers. + </method> + <method name="list"> + just like a sequence of ints sent one after another, + except in a single message. + </method> + <method name="symbol"> + considered as a list of ascii characters. + </method> + <method name="reset"> + aborts the current grid if there is one. + </method> + <method name="grid"> + <arg name="grid" type="grid(dims...)"/> + this is the equivalent of filtering this grid through + an <k>[#export]</k> object and sending the resulting integers + to this <k>[#import]</k> object, except that it's over + 10 times faster. + </method> + </inlet> + <inlet id="1" attr="shape"> + <method name="per_message"> + old synonym for "shape per_message" + </method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/> + the grid produced from incoming integers and/or grids. + </method> + </outlet> + </class> + + <class name="#export"> + <help text="[#export]" image="#importexport" /> + + <p>this object is the opposite of #import.</p> + <method name="init"> + this object is not configurable because there isn't + anything that could possibly be configured here. + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + transforms this grid into a sequence of integer messages. + </method> + </inlet> + <outlet id="0"> + <method name="int"> + elements of the incoming grid. + </method> + </outlet> + </class> + + <class name="#export_list"> + <help text="[#export_list]" image="#importexport" /> + + <p>this object is another opposite of <k>[#import]</k>, which puts + all of its values in a list.</p> + <method name="init" /> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + transforms this grid into a single message containing + a list of integers. + </method> + </inlet> + <outlet id="0"> + <method name="list"> + elements of the incoming grid. + </method> + </outlet> + </class> + + <class name="#export_symbol"> + <p>this object is another opposite of #import, which constructs a symbol + from its input. The values are expected to be valid ASCII codes, but no check + will be performed for that, and additionally, no check will be made that the generated + symbol only contains characters that can be put in a symbol.</p> + <method name="init" /> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + transforms this grid into a single message containing + a list of integers. + </method> + </inlet> + <outlet id="0"><method name="symbol">generated symbol</method></outlet> + </class> + + <class name="#pack"> + <p>Similar to <k>[#join]</k>, but takes individual integers, and builds a Dim(N) vector out of it. + </p> + + <attr name="trigger_by" type="TriggerBy" default="any"> + The value "any" (and the only available value for now) causes an output + to produced when an integer is received thru any inlet, contrary to most + other object classes, that only act upon reception of a value thru inlet 0. + </attr> + + <method name="init"> + <arg name="inputs" type="integer">how many inlets the object should have.</arg> + </method> + <inlet id="*"><method name="int"/></inlet> + <outlet id="0"><method name="grid"> + combination of inputs given in all inlets. + this is produced according to the value of the trigger attribute. + </method></outlet> + </class> + + <class name="#color"> + <p>Triple slider for the selection of RGB values.</p> + <method name="init"> + <arg name="min" type="float"></arg> + <arg name="max" type="float"></arg> + <arg name="hidepreview" type="0,1"></arg> + </method> + <inlet id="0"><method name="grid"> + Produces a Dim(3) grid of RGB values. + </method></inlet> + </class> + + <class name="#unpack"> + <method name="init"> + <arg name="outputs" type="integer"> + how many outlets the object should have. + (depending on the version of the software, the number of visible outlets + may have been frozen to 4. If it is so, then the value of this argument + must not exceed 4; and if it is below 4, then don't use the extraneous outlets.) + </arg> + </method> + <inlet id="0"><method name="grid(N)"> + the input vector is split in N parts containing one number each. + numbers are sent left-to-right, that is, outlet 0 is triggered first, then outlet 1, etc. + </method></inlet> + <outlet id="*"><method name="int"> + </method></outlet> + </class> + + <class name="#centroid"> + <method name="init"/> + <inlet id="0"><method name="grid(rows,columns,1)"> + will compute the centroid of the given grid, which + is a weighted average, namely, the average position weighted + by the pixel values. + </method></inlet> + <outlet id="0"> + <method name="grid(2)"> + result + </method> + </outlet> + </class> + <class name="#centroid2"> + a new experimental and faster version of #centroid. + <method name="init"/> + <inlet id="0"><method name="grid(rows,columns,1)"> + will compute the centroid of the given grid, which + is a weighted average, namely, the average position weighted + by the pixel values. + </method></inlet> + <outlet id="0"> + <method name="grid(2)"> + result + </method> + </outlet> + </class> + + <class name="#for"> + <icon text="[#for 0 320 1]"/> + <help text="[#for 0 320 1]"/> + + <p>when given scalar bounds, works like a regular <k>[for]</k> object plugged + to a <k>[#import]</k> tuned for a Dim(size) where size is the number of values + produced by a bang to that <k>[for]</k>.</p> + + <p>when given vector bounds, will work like any number of [for] objects + producing all possible combinations of their values in the proper order. + This replaces the old <k>[#identity_transform]</k> object.</p> + + <method name="init"> + <arg name="from" type="integer"/> + <arg name="to" type="integer"/> + <arg name="step" type="integer"/> + </method> + <inlet id="0"><method name="grid"><arg name="grid" type="grid(index)"/> + replaces the "from" value and produces output. + </method></inlet> + <inlet id="1"><method name="grid"><arg name="grid" type="grid(index)"/> + replaces the "to" value. + </method></inlet> + <inlet id="2"><method name="grid"><arg name="grid" type="grid(index_steps)"/> + replaces the "step" value. + </method></inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid(size)"/> + where size is floor((to-from+1)/step) + [for scalar bounds] + </method> + <method name="grid"><arg name="grid" type="grid(*size,dimension)"/> + where *size is floor((to-from+1)/step) + [for vector bounds] + </method> + </outlet> + </class> +</section> + +<section name="Objects for Computing"> + <class name="#"> + <icon text="[# +]" image="images/op/add.png" /> + <help text="two-input operators"/> + + <attr name="op" type="grid"/> + <attr name="right_hand" type="grid" default="0"> + + </attr> + + <p>This object outputs a grid by computing "in parallel" a same + operation on each left-hand element with its corresponding right-hand + element. + </p> + + <method name="init"> + <arg name="op" isattr="yes"/> + <arg name="right_hand" isattr="yes"/> + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + on each element of this grid, perform the operation + together with the corresponding element of inlet 1. + in the table of operators (at the top of this document) + elements of inlet 0 are called "A" and elements of inlet 1 + are called "B". the resulting grid is the same size as the + one in inlet 0. + </method> + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + any grid, preferably shaped like the one that will be put + in the left inlet, or like a subpart of it (anyway the contents + will be redim'ed on-the-fly to fit the grid of inlet-0, + but the stored grid will not be modified itself) + </method> + <method name="int"> + stores a single int in the right inlet; the same int will + be applied in all computations; this is like sending a + Dim(1) or Dim() grid with that number in it. + </method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/> + </method> + </outlet> + + </class> + + <class name="@complex_sq"> + <p>this object computes the square of complex numbers. + If seeing imaginary as Y and real as X, then this operation squares + the distance of a point from origin and doubles the angle between it + and the +X half-axis clockwise. (fun, eh?) + </p> + <p>used on an indexmap, this makes each thing appear twice, + each apparition spanning half of the original angle.</p> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(dims... {imaginary real})"/> + </method></inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(dims... {imaginary real})"/> + </method></outlet> + </class> + + <class name="#fold"> + <icon text="[#fold +]"/> + <help text="[#fold +]" image="#foldinnerouter"/> + + <p><list> + <li><k>[#fold +]</k> computes totals</li> + <li><k>[#fold inv+]</k> is an alternated sum (+/-)</li> + <li><k>[#fold * 1]</k> can compute the size of a grid using its dimension list</li> + <li><k>[#fold & 1]</k> can mean "for all"</li> + <li><k>[#fold | 0]</k> can mean "there exists (at least one)"</li> + <li><k>[#fold ^ 0]</k> can mean "there exists an odd number of..."</li> + <li><k>[#fold ^ 1]</k> can mean "there exists an even number of...".</li> + </list></p> + + <method name="init"> + <arg name="operator" type="numop2"/> + <arg name="seed" type="grid" default="0"/> + <arg name="right_hand" type="grid"/> + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims..., last)"/> + replaces every Dim(last) subgrid by the result of a cascade on that subgrid. + Doing that + with seed value 0 and operation + on grid "2 3 5 7" will compute + ((((0+2)+3)+5)+7) find the total "17". + produces a Dim(dims) grid. + </method> + </inlet> + <inlet id="1" attr="seed"/> + <outlet id="0"></outlet> + </class> + + <class name="#scan"> + <icon text="[#scan +]"/> + <help text="[#scan +]"/> + + <p><k>[#scan +]</k> computes subtotals; this can be used, for example, + to convert a regular probability distribution into a cumulative one. + (or in general, discrete integration) + </p> + + <method name="init"> + <arg name="operator" type="numop2"/> + <arg name="seed" type="grid" default="0"/> + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims..., last)"/> + + replaces every Dim(last) subgrid by all the results of + cascading the operator on that subgrid, + producing a Dim(dims,last) grid. + + For example, with base value 0 and operation + on grid "2 3 5 + 7" will compute 0+2=2, 2+3=5, 5+5=10, 10+7=17, and give the + subtotals "2 5 10 17". + + </method> + </inlet> + <inlet id="1" attr="seed"/> + <outlet id="0"> + </outlet> + + </class> + + <class name="#outer"> + <icon text="[#outer +]"/> + <help text="[#outer +]" image="#foldinnerouter"/> + + <method name="init"> + <arg name="operator" type="numop2"/> + <arg name="value" type="grid"/> + the operator must be picked from the table of two-input operators. + the grid is optional and corresponds to inlet 1. + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(anyA...)"/></method> + produces a grid of size Dim(anyA..., anyB...), where numbers + are the results of the operation on every element of A and + every element of B. the resulting array can be very big. Don't + try this on two pictures (the result will have 6 dimensions) + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(anyB...)"/></method> + stores the specified grid, to be used when inlet 0 is activated. + </inlet> + <outlet id="0"> + </outlet> + + <p>When given a grid of Dim(3) and a grid of Dim(5) <k>[#outer]</k> will + produce a grid of Dim(3,5) with the selected two-input operation + applied on each of the possible pairs combinations between numbers + from the left grid and the ones from the right. for example : + (10,20,30) [#outer +] (1,2,3) will give : + ((11,12,13),(21,22,23),(31,32,33)) </p> + + </class> + + <class name="#inner"> + <help text="[#inner]"/> + + <p>think of this one as a special combination of <k>[#outer]</k>, <k>[#]</k> and + <k>[#fold]</k>. this is one of the most complex operations. It is very useful + for performing linear transforms like rotations, scalings, shearings, + and some kinds of color remappings. A linear transform is done by + something called matrix multiplication, which happens to be <k>[#inner * + + 0]</k>. <k>[#inner]</k> also does dot product and other funny operations.</p> + + <method name="init"> + <arg name="op_para" type="numop2"/> + <arg name="op_fold" type="numop2"/> + <arg name="base" type="integer"/> + <arg name="right_hand" type="grid"/> + op_para and op_fold are two operators picked from the table + of two-input operators. + the base value has to be specified (has no default value yet). + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(anyA..., lastA)"/> + + Splits the Dim(anyA...,lastA) left-hand grid into Dim(anyA...) + pieces of Dim(lastA) size. + + Splits the Dim(firstB,anyB...) right-hand grid into + Dim(anyB...) pieces of Dim(firstB) size. + + On every piece pair, does <k>[#]</k> using the specified + op_para operation, followed by a <k>[#fold]</k> using + the specified op_fold operator and base value. + + creates a Dim(anyA...,anyB...) grid by assembling all + the results together. + + (note: lastA must be equal to firstB.) + </method> + </inlet> + <inlet id="1"> + <method name="int"> + changes the base value to that. + </method> + </inlet> + <inlet id="2"> + <method name="grid"><arg name="grid" type="grid(anyB..., lastB)"/> + changes the right-hand side grid to that. + </method> + </inlet> + <outlet id="0"> + </outlet> + </class> + + <class name="@join"> + <method name="init"> + <arg name="which_dim"/> + Which_dim is the number of the dimension by which the join will + occur. For N-dimensional grids, the dimensions are numbered from 0 + to N-1. In addition, negative numbers from -N to -1 may be used, to + which N will be added. + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid"/> + The left grid and right grid must have the same number + of elements in all dimensions except the one specified. + The result will have the same number of elements in all + dimensions except the one specified, which will be the + sum of the two corresponding one. + + <p>For example, joining a RGB picture Dim[y,x,3] and a + greyscale picture Dim[y,x,1] on dimension 2 (or -1) could + make a RGBA picture Dim[y,x,4] in which the greyscale image + becomes the opacity channel. + </p> + </method> + </inlet> + <inlet id="1"><method name="grid"><arg name="grid" type="grid"/></method></inlet> + <outlet id="0"> + </outlet> + </class> + + <class name="#finished"> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>any grid</method> + </inlet> + <outlet id="0"> + a bang is emitted every time a grid transmission ends. + </outlet> + </class> + + <class name="#cast"> + <method name="init"> + <arg name="numbertype" type="numbertype"/> + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>any grid</method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>a grid of the same shape containing all the same + values after type conversion. note that while casting to + a smaller type, values that are overflowing will be truncated. + </method> + </outlet> + </class> + + <class name="#ravel"> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet> + <outlet id="0"><method name="grid"><arg name="grid" type="grid"/> + like <k>[#redim]</k> but always produce a 1-D grid + with the same total number of elements. + </method></outlet> + </class> + + <class name="#grade"> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet> + <outlet id="0"><method name="grid"><arg name="grid" type="grid"/> + <p>splits a Dim[A...,B] grid into Dim[B] vectors, + producing new Dim[B] vectors that each contain numbers from + 0 to B-1 indicating the ordering of the values. The result is + a Dim[A...,B] grid.</p> + <p>for example, connecting a [#grade] to a <k>[#outer ignore {0}]</k> + to a <k>[#store]</k> object, storing a single vector into <k>[#store]</k>, and + sending the same vector to <k>[#grade]</k>, will sort the values of the + vector. however for higher-dimensional grids, what should go + between <k>[#store]</k> and <k>[#grade]</k> to achieve the same result would + be more complex.</p> + <p>you may achieve different kinds of sorting by applying various + filters before <k>[#grade]</k>. the possibilities are unlimited.</p> + <p>if you plug <k>[#grade]</k> directly into another <k>[#grade]</k>, you will + get the inverse arrangement, which allows to take the sorted values + and make them unsorted in the original way. note that this is really + not the same as just listing the values backwards.</p> + </method></outlet> + </class> + + <class name="#perspective"> + <method name="init"> + <arg name="depth" type="integer"/> + </method> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/>any grid</method></inlet> + <outlet id="0"><method name="grid"><arg name="grid" type="grid"/> + <p>transforms a Dim[A...,B] grid into a Dim[A...,B-1] grid. + There is a projection plane perpendicular to the last axis and + whose position is given by the "depth" parameter. Each vector's + length is adjusted so that it lies onto that plane. Then the + last dimension of each vector is dropped.</p> + + <p>useful for converting from 3-D geometry to 2-D geometry. Also + useful for converting homogeneous 3-D into regular 3-D, as + homogeneous 3-D is really just regular 4-D...(!)</p> + </method></outlet> + </class> + + <class name="#transpose"> + <method name="init"> + <arg name="dim1" type="integer"/> + <arg name="dim2" type="integer"/> + </method> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/> + swaps the two specified dimensions; dimension numbers are as in <k>[#join]</k>. + </method></inlet> + </class> + + <class name="#fade"> + <method name="init"> + <arg name="rate" type="integer"/> + </method> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/> + produces on outlet 0 a linear recurrent fading according to the flow of + incoming messages. For example, if rate=5, then 20% (one fifth) + of each new message will be blended with 80% of the previous output. + </method></inlet> + </class> + + <class name="#fade_lin"> + <method name="init"> + <arg name="maxraise" type="integer"/> + <arg name="maxdrop" type="integer"/> + </method> + <inlet id="0"><method name="grid"><arg name="grid" type="grid"/> + produces on outlet 0 a piecewise-linear nonrecurrent fading according to the flow of + incoming messages. For example, if maxraise=2 and maxdrop=4, then with each + new message an output is produced that is at most 2 more or 4 less than the + previous output. + </method></inlet> + </class> + + <class name="#reverse"> + <method name="init"> + <arg name="whichdim"/> + Whichdim is the number of the dimension by which the reverse will + occur. For N-dimensional grids, the dimensions are numbered from 0 + to N-1. In addition, negative numbers from -N to -1 may be used, to + which N will be added. + </method> + </class> +</section> + +<section name="Objects for Coordinate Transforms"> + <class name="#redim"> + <icon text="[#redim {2}]"/> + <help text="[#redim 2]"/> + + <method name="init"> + <arg name="dims" type="dim_list"/> + a list specifying a grid shape that the numbers + will fit into. + (same as with <k>[#import]</k>) + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + the elements of this grid are serialized. if the resulting grid + must be larger, the sequence is repeated as much as necessary. + if the resulting grid must be smaller, the sequence is truncated. + then the elements are deserialized to form the resulting grid. + </method> + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(rank)"/> + this grid is a dimension list that replaces the one + specified in the constructor. + (same as with <k>[#import]</k>) + </method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/> + redimensioned grid potentially containing repeating data. + </method> + </outlet> + + <p>example: with a 240 320 RGB image, <k>[#redim 120 640 3]</k> will visually + separate the even lines (left) from the odd lines (right). contrary + to this, <k>[#redim 640 120 3]</k> will split every line and put its left half + on a even line and the right half on the following odd line. <k>[#redim]</k> + 480 320 3 will repeat the input image twice in the output image. + <k>[#redim]</k> 240 50 3 will only keep the 50 top lines.</p> + + </class> + <class name="#store"> + <help text="[#store]"/> + + <p>A <k>[#store]</k> object can store exactly one grid, using the right + inlet. You fetch it back, or selected subparts thereof, using the left + inlet.</p> + + <method name="init"> + <arg name="contents" type="grid"/> + </method> + + <inlet id="0"> + <method name="bang"> + the stored grid is fully sent to the outlet. + </method> + <method name="grid"><arg name="grid" type="grid(dims..., indices)"/> + in this grid, the last dimension refers to subparts of + the stored grid. sending a Dim(200,200,2) on a <k>[#store]</k> + that holds a Dim(240,320,3) will cause the <k>[#store]</k> to handle + the incoming grid as a Dim(200,200) of Dim(2)'s, where each + Dim(2) represents a position in a Dim(240,320) of Dim(3)'s. + therefore the resulting grid will be a Dim(200,200) of + Dim(3) which is a Dim(200,200,3). in practice this example + would be used for generating a 200*200 RGB picture from a + 200*200 XY map and a 240*320 RGB picture. this object can + be logically used in the same way for many purposes + including color palettes, tables of probabilities, tables + of statistics, whole animations, etc. + </method> + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + replace the whole grid, or a subpart of it (see other options on inlet 1) + </method> + </inlet> + <inlet id="1"> + <method name="reassign">(Future Use): + makes it so that sending a grid to inlet 1 detaches the old buffer from [#store] + and attaches a new one instead. This is the default. + </method> + <method name="put_at"><rest name="indices"/>(Future Use): + makes it so that sending a grid to inlet 1 writes into the existing buffer of [#store]. + <p> + example: suppose you have <k>[#store {10 240 320 3}]</k>. then "put_at 3" + will allow to write a Dim[240,320,3] grid in indices (3,y,x,c) where y,x,c are indices of the incoming grid; + in other words, if that's a buffer of 10 RGB frames, you'd be replacing frame #3. Furthermore, + it also allows you to write a Dim[n,240,320,3] grid at (3+f,y,x,c) where f,y,x,c are indices of the incoming grid, + replacing frame #3, #4, ... up to #3+n-1. Here n is at most 7 because the last frame in the buffer is #9. + </p> + <p>that way of working extends to other kinds of data you'd put in Grids, in any numbers of dimensions; + because, as usual, [#store] wouldn't know the difference. + </p> + </method> + </inlet> + <outlet id="0"> + grids as stored, as indexed, or as assembled from multiple + indexings. + </outlet> + </class> + + <class name="#scale_to"> + <help text="[#scale_to]"/> + + <method name="init"> + <arg name="size">{height width} pair.</arg> + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>a 3-channel picture to be scaled.</method> + </inlet> + <inlet id="1"> + <method name="int">a {height width} pair.</method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>a scaled 3-channel picture.</method> + </outlet> + </class> + + <class name="#scale_by"> + <help text="[#scale_by]"/> + + <method name="init"> + <arg name="factor" type="grid dim() or dim(2)"/> + factor is optional (default is 2). + if it's a single value, then that factor is to be used + for both rows and columns. + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + duplicates each pixel several times in width and several times in height, + where the number of times is determined by the factor described above. + twice those of the incoming grid. It is several times faster. + </method> + </inlet> + <inlet id="1"><method name="grid"><arg name="grid" type="grid(1 or 2)"/>sets factor</method></inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid((factor*y) (factor*x) channels)"/> + </method> + </outlet> + </class> + + <class name="#downscale_by"> + <method name="init"> + <arg name="factor" type="+integer"/> + <arg name="how" type="optional symbol(smoothly)"/> + factor is optional (default is 2). + if it's a single value, then that factor is to be used + for both rows and columns. + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + Scales down picture by specified amount. (See scale factor above) + </method> + </inlet> + <inlet id="1"><method name="grid"> + <arg name="grid" type="grid(1 or 2)"/>sets scale factor</method></inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid((factor/y) (factor/x) channels)"/> + </method> + </outlet> + </class> + + <class name="#spread"> + <help text="[#spread]"/> + + <p>typically you plug a <k>[#for]</k> into this object, + and you plug this object into the left side of a <k>[#store]</k>. it will + scatter pixels around, giving an "unpolished glass" effect.</p> + + <p>if you put a picture in it, however, it will add noise. The + resulting values may be out of range, so you may need to clip them + using min/max.</p> + + <method name="init"> + <arg name="factor">same as inlet 1</arg> + </method> + + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>a coordinate map.</method> + </inlet> + <inlet id="1"> + <method name="int">a spread factor.</method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid"/>a coordinate map.</method> + </outlet> + + + <p><k>[#spread]</k> scatters the pixels in an image. Not all original pixels + will appear, and some may get duplicated (triplicated, etc) + randomly. Some wrap-around effect will occur close to the edges. + </p> + + <p> Sending an integer to inlet 1 sets the amount of spreading in + maximum number of pixels + 1. even values translate the whole image + by half a pixel due to rounding.</p> + + </class> + + <class name="#rotate"> + <p>performs rotations on indexmaps and polygons and such.</p> + + <method name="init"> + <arg name="angle" type="0...35999"/> + </method> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(anyA 2)"/></method></inlet> + <inlet id="1"><method name="int">rotation angle; 0...36000</method> + </inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(anyA 2)"/> + </method></outlet> + </class> + + <class name="#remap_image"> + <p>if you chain indexmap (coordinate) transformations from outlet 1 + to inlet 1, then sending an image in inlet 0 will emit its + deformation out of outlet 0.</p> + + <inlet id="0"/> + <inlet id="1"/> + <outlet id="0"/> + <outlet id="1"/> + </class> +</section> + +<section name="Objects for Reporting"> + <class name="#dim"> + <help text="[#dim]"/> + + <p>Returns list of dimensions as a grid. Given a grid sized like Dim(240,320,4), + <k>[#dim]</k> will return a grid like Dim(3), whose values are 240, 320, 4. </p> + + <method name="init"> + no arguments. + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + ignores any data contained within. + sends a grid dim(length of dims) containing dims. + </method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid(rank)"/> + the list of dimensions of the incoming grid. + </method> + </outlet> + </class> + + <class name="#type"> + <p>gives a symbol representing the numeric type of the grid received. + </p> + <outlet id="0"><method name="<numeric type symbol>"/></outlet> + </class> + + <class name="#print"> + <method name="init"/> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(dims...)"/> + prints the dimensions of the grid. + prints all the grid data if there are 2 dimensions or less. + </method> + </inlet> + </class> + + <class name="rubyprint"> + This is only for testing the translation from PD to Ruby. + <method name="init"/> + <inlet id="0"> + <method name="(any)"> + prints the message to the console. + </method> + </inlet> + </class> + + <class name="printargs"> + This is only for testing the translation from PD to Ruby. + <method name="init"> + <rest name="any"/> + prints everything. + </method> + </class> + + <class name="display"> + GUI object equivalent to [print] and [#print]. + <method name="(any)"> + Displays the received message in the box, resizing the box so that the message fits exactly. + </method> + </class> +</section> + +<section name="Objects for Color Conversion"> + <class name="#apply_colormap_channelwise"> + <p>This object is useful for color correction. For each pixel + it takes it apart, looks up each part separately in the colormap, + and constructs a new pixel from that. You may also color-correct + colormaps themselves.</p> + + <p>Only works for things that have 3 channels.</p> + + <p>Note: if you just need to apply a palette on an indexed-color + picture, you don't need this. Just use #store instead.</p> + + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/> + picture + </method></inlet> + <inlet id="1"> + <method name="grid"> + <arg name="grid" type="grid(intensities channels)"/> + colormap ("palette") + </method></inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/> + picture + </method></outlet> + </class> + + <class name="#rgb_to_greyscale"> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + </method></inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {white})"/></method> + </outlet> + </class> + + <class name="#greyscale_to_rgb"> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {white})"/></method> + </inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + </method></outlet> + </class> + + <class name="#yuv_to_rgb"> + <p>note: may change slightly to adapt to actual video standards.</p> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {y u v})"/></method> + </inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/> + </method></outlet> + </class> + + <class name="#rgb_to_yuv"> + <p>note: may change slightly to adapt to actual video standards.</p> + <inlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {red green blue})"/></method> + </inlet> + <outlet id="0"><method name="grid"> + <arg name="grid" type="grid(rows columns {y u v})"/> + </method></outlet> + </class> +</section> + +<section name="Objects for Miscellaneous Picture Processing"> + <class name="#convolve"> + <help text="[#convolve]"/> + + <p>this is the object for blurring, sharpening, finding edges, + embossing, cellular automata, and many other uses.</p> +<!--NYI + <attr name="seed"> + + </attr> +--> + <method name="init"> + <arg name="op_para" type="numop2"/> + <arg name="op_fold" type="numop2"/> + <arg name="seed" type="grid"/> + <arg name="right_hand" type="grid" default="none"/> + </method> + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns rest...)"/> + splits the incoming grid into dim(rest...) parts. + for each of those parts at (y,x), a rectangle of such + parts, centered around (y,x), is combined with the + convolution grid like a <k>[#]</k> of operation op_para. Then + each such result is folded like <k>[#fold]</k> of operation + op_fold and specified base. the results are assembled + into a grid that is sent to the outlet. near the borders of + the grid, coordinates wrap around. this means the whole grid + has to be received before production of the next grid + starts. + </method> + </inlet> + <inlet id="1"> + <method name="grid"> + <arg name="grid" type="grid(rows2 columns2)"/> + this is the convolution grid and it gets stored in + the object. if rows2 and/or columns2 are odd numbers, + then the centre of convolution is the middle of the convolution + grid. if they are even numbers, then the chosen centre will + be slightly more to the left and/or to the top, because the + actual middle is between cells of the grid. + </method> + </inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns rest...)"/> + </method> + </outlet> + </class> + + <class name="#contrast"> + <help text="[#contrast]"/> + + <method name="init"> + <arg name="iwhiteness" default="256">same as inlet 1.</arg> + <arg name="contrast" default="256">same as inlet 2.</arg> + </method> + + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/> + produces a grid like the incoming grid but with + different constrast. + </method> + <p><k>[#contrast]</k> adjusts the intensity in an image. + resulting values outside 0-255 are automatically clipped.</p> + </inlet> + <inlet id="1"> + <method name="int"> + this is the secondary contrast (inverse whiteness). + it makes the incoming black + correspond to a certain fraction between output black and the + master contrast value. no effect is 256. default value is 256. + </method> + </inlet> + <inlet id="2"> + <method name="int"> + this is the master contrast. it makes the incoming white + correspond to a certain fraction between output black and output + white. no effect is 256. default value is 256. + </method> + </inlet> + <outlet> + <method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/> + </method> + </outlet> + </class> + + <class name="#posterize"> + <help text="[#posterize]"/> + + <p><k>[#posterize]</k> reduces the number of possible intensities in an image; + it rounds the color values.The effect is mostly apparent with a low + number of levels.</p> + + <method name="init"> + <arg name="levels">same as inlet 1</arg> + </method> + + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/> + produces a posterized picture from the input picture. + </method> + </inlet> + + <inlet id="1"> + <method name="int"> + this is the number of possible levels per channel. the + levels are equally spaced, with the lowest at 0 and the + highest at 255. the minimum number of levels is 2, and the + default value is 2. + </method> + </inlet> + + <outlet id="0"> + </outlet> + + <p>example: simulate the 216-color "web" palette using 6 levels. + simulate a 15-bit display using 32 levels.</p> + </class> + + <class name="#solarize"> + <p>makes medium intensities brightest; formerly brightest colours + become darkest; formerly darkest stays darkest. This filter is linear: + it's like a 200% contrast except that overflows are <i>mirrored</i> + instead of clipped or wrapped.</p> + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/></method> + </inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(rows columns channels)"/></method> + </outlet> + </class> + + <class name="#checkers"> + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(y x {y x})"/> + result from a <k>[#for {0 0} {height width} {1 1}]</k> + </method> + </inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(y x {r g b})"/> + checkered pattern of 50%/75% greys + in 8x8 squares + </method> + </outlet> + </class> + + <class name="#layer"> + <inlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(y x {r g b a})"/> + a picture that has an opacity channel. + will be used as foreground. + </method> + </inlet> + <inlet id="1"> + <method name="grid"> + <arg name="grid" type="grid(y x {r g b})"/> + a picture that has NO opacity channel. + will be used as background. + </method> + </inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(y x {r g b})"/> + a picture that has NO opacity channel. + the opacity channel of the foreground is used as + a weighting of how much of either picture is seen + in the result. + </method> + </outlet> + </class> + + <class name="#draw_image"> + <method name="init"> + <arg name="operator" type="numop2"> + Normally you would use the "put" operator here; + but abnormally I recommend + and ^ for psychedelic effects. + </arg> + <arg name="picture" type="grid(y,x,channels)"/> + <arg name="position" type="grid({y x})"/> + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + picture onto which another picture will be superimposed. + </method> + <method name="tile"><arg name="flag" type="0 or 1"/> + if enabled, inlet 1 picture will be repeated to cover the inlet 0 picture. + </method> + <method name="alpha"><arg name="flag" type="0 or 1"/> + if enabled, inlet 1 picture will be combined with inlet 0 picture using + the selected operator, + and then blended with inlet 0 picture according to transparency of + the inlet 1 picture, and then inserted in the result. + if disabled, the blending doesn't occur, as the transparency level + is considered to be "opaque". note that with alpha enabled, + the last channel of inlet 1 picture is considered to represent transparency. + </method> + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + picture that will be superimposed onto another picture. + </method> + </inlet> + <inlet id="2"> + <method name="grid"><arg name="grid" type="grid({y x})"/> + position of the inlet 0 picture corresponding to top-left corner + of inlet 1 picture. + </method> + </inlet> + <outlet id="0"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + resulting picture. + </method> + </outlet> + </class> + + <class name="#draw_polygon"> + <method name="init"> + <arg name="operator" type="numop2"> + Normally you would use the "put" operator here; + but abnormally I recommend + and ^ for psychedelic effects. + </arg> + <arg name="color" type="grid(channels)"/> + <arg name="vertices" type="grid(vertices,{y x})"/> + </method> + <inlet id="0"> + <method name="grid"><arg name="grid" type="grid(y x channels)"/> + picture on which the polygon will be superimposed. + </method> + </inlet> + <inlet id="1"> + <method name="grid"><arg name="grid" type="grid(channels)"/> + color of each pixel + </method> + </inlet> + <inlet id="2"> + <method name="grid"><arg name="grid" type="grid(vertices {y x})"/> + vertices of the polygon. + </method> + </inlet> + <outlet id="0"> + <method name="grid"> + <arg name="grid" type="grid(y x channels)"/> + modified picture. + note: starting with 0.7.2, drawing a 1-by-1 + square really generates a 1-by-1 square, and + so on. This is because the right-hand border of a + polygon is excluded, whereas it was included + before, leading to slightly-wider-than-expected polygons. + </method> + </outlet> + </class> + + <class name="#text_to_image"> + <p>inlet 2 receives a font grid, for example, [#in grid file lucida-typewriter-12.grid.gz]</p> + <p>inlet 1 receives a 2 by 3 matrix representing the colours to use (e.g. (2 3 # 0 170 0 255 255 0) means yellow on green)</p> + <p>inlet 0 receives a bang, transforming the data into an image suitable for #draw_image.</p> + </class> + <class name="#hueshift"> + <p>inlet 1 receives an angle (0..36000)</p> + <p>inlet 0 receives a RGB picture that gets hueshifted by a rotation in the colorwheel by the specified angle; it gets sent to outlet 0.</p> + </class> +</section> + +<section name="Other Objects"> + <class name="rtmetro">This class has been removed (0.7.7).</class> + + <class name="bindpatcher"> + <p>sets the receive-symbol for the Pd patcher it is in.</p> + <p>has no inlets, no outlets.</p> + <p>EXPERIMENTAL.</p> + <method name="init"> + <arg name="symbol" type="symbol"/> + </method> + </class> + + <class name="pingpong"> + Transforms linear counting (0, 1, 2, 3, 4, ...) into a back-and-forth counting (0, 1, 2, 1, 0, ...) + from 0 to a specified upper bound. + <method name="init"> + <arg name="top" type="int"/> + </method> + <inlet id="1"> + <method name="float"><arg name="top" type="float"/></method> + </inlet> + <inlet id="0"> + <method name="float"> + a value to be transformed. + If, for example, top=10, then values 0 thru 10 are left unchanged, + values 11 thru 19 are mapped to 9 thru 1 respectively, and 20 thru 30 + are mapped to 0 thru 10, and so on. + </method> + </inlet> + </class> + + <class name="#global"> + <help text="[#global]" /> + + <p> + objects of this class do nothing by themselves and are just + an access point to features that don't belong to any object in + particular. + </p> + <method name="profiler_reset"> + resets all the time counters. + </method> + <method name="profiler_dump"> + displays the time counters in decreasing order, with + the names of the classes those objects are in. this is + an experimental feature. like most statistics, + it could be vaguely relied upon if + only you knew to which extent it is unreliable. more on this + in a future section called "profiling". + </method> + </class> + + <class name="fps"> + <method name="init"> + <arg name="clocktype" type="symbol(real|user|system|cpu)"> + which clock to use. "real" uses wallclock time. "user" uses + the amount of time spent in the process. "system" uses the + amount of time spent in the kernel on behalf of the process. + "cpu" uses the Pentium clock, which is like a more precise + version of "real" if you have a Pentium. + </arg> + <arg name="detailed" type="symbol(detailed)">optional</arg> + </method> + <method name="init detailed"> + </method> + <inlet id="0"> + <method name="bang"> + Times at which bangs are received are stored until a large + enough sample of those is accumulated. Large enough is defined + to be whenever the timespan exceeds one second. Then a report + is made through the outlet. + </method> + <method name="(else)"> + messages other than bangs are ignored. + </method> + </inlet> + <outlet id="0"> + <method name="float"> + non-detailed mode only. + this is the messages-per-second rating. + </method> + <method name="list(float,6)"> + detailed mode only. + this is: messages-per-second, followed by five values of + milliseconds-per-message: minimum, median, maximum, average, + standard deviation. + (the average happens to be simply 1000 divided by the + messages-per-second, but it is convenient to have it anyway) + </method> + </outlet> + </class> + + <class name="unix_time"> + <p> + This object returns the Unix timestamp. The first + outlet does so with ASCII, the second in seconds and the third outlet + outputs the fractions of seconds up to 1/100 000 th of a second which is useful for creating + filenames. + </p> + <inlet id="0"><method name="bang"/></inlet> + <outlet id="0"><method name="symbol"/>Outputs the time and date in ASCII format</outlet> + <outlet id="1"><method name="float"/>Outputs the Unix timestamp in seconds</outlet> + <outlet id="2"><method name="float"/>Outputs the fractions of a second up to 10 microseconds (?) (actual precision is platform-dependent afaik)</outlet> + </class> + + <class name="ls"> + <p> + This object is similar to the Unix list command + 'ls'. It returns the names of files in a given + directory. May be used with [listlength] to retrieve the number of files. + Hidden files are displayed. + </p> + <inlet id="0"><method name="symbol"/></inlet> + </class> + + <class name="exec"> + <p> + This object launches a Unix shell program or script. + </p> + <inlet id="0"><method name="symbol"/></inlet> + </class> + + <class name="renamefile"> + <p> + This object accepts a list of two elements as arguments. + The current file name being the first and the second is the desired change + in name. + </p> + <inlet id="0"><method name="list"/></inlet> + </class> + + <class name="plotter_control"> + <p> + This object produces HPGL instructions in ASCII form + that can be sent to the comport object in order to control an HPGL + compatible plotter. + </p> + <inlet id="0"><method name="symbol"/></inlet> + <outlet id="0"><method name="symbol"/>Outputs the HPGL commands in ASCII format</outlet> + </class> + + <class name="rubyarray"> + <p>inlet 0 float : sends the specified array entry to outlet 0</p> + <p>inlet 1 list: writes that list as an array entry in position last specified by inlet 0.</p> + <p>inlet 0 save(symbol filename): writes the array contents to a file of the given filename as a CSV</p> + <p>inlet 0 save(symbol filename, symbol format): same thing but using a sprintf string such as %x,%f or whatever</p> + <p>inlet 0 load(symbol filename): replace all array contents by the contents of a CSV file</p> + </class> +</section> + +<section name="jMax emulation"> + <p>those classes emulate jMax functionality, + for use within PureData and Ruby.</p> + + <class name="fork"> + <p>Every incoming message is sent to inlet 1 and then sent to + inlet 0 as well. Messages remain completely unaltered. Contrast + with PureData's "t a a" objects, which have the same purpose but + transform bangs into zeros and such.</p> + + <inlet id="0"><method name="(any)"/></inlet> + <outlet id="0"/> + <outlet id="1"/> + </class> + <class name="jmax_udpsend"> + Sends messages (but not grids nor dspsignals) via UDP (which + does not involve a connection, and may lose packets in case of + network overload or noise or etc). + + <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> + + <method name="init"> + <arg name="host" type="host"/> + <arg name="port" type="integer"/> + </method> + + <inlet id="0"><method name="<any>"/></inlet> + </class> + <class name="jmax_udpreceive"> + <p>Counterpart of jmax_udpsend</p> + + <p>This works with jMax 2.5 and 4.1 but not 4.0.</p> + + <method name="init"> + <arg name="port" type="integer"/> + </method> + <outlet id="0"><method name="<any>"/></outlet> + <outlet id="1"><method name="list"> + <arg name="protocol_name"/> + <arg name="sender_port"/> + <arg name="sender_host"/> + <arg name="sender_ip_address"/> + </method> + </outlet> + </class> + <class name="foreach"> + <inlet id="0"><method name="list"><rest/> + Outputs N messages, one per list element, in order. + </method></inlet> + </class> + <class name="rubysprintf"> + <method name="init"> + <arg name="format" type="symbol"/> + </method> + <inlet id="0"><method name="list"> + Outputs the format string with %-codes replaced + by elements of the list formatted as the %-codes say. + To get a list of those codes, consult a Ruby manual + (Equivalently, Perl, Python, Tcl and C all have equivalents of this, + and it's almost always called sprintf, or the % operator, or both) + </method></inlet> + <inlet id="1" attr="format" type="symbol"/> + </class> + <class name="listflatten"> + <inlet id="0"><method name="list"><rest/> + </method></inlet> + </class> + <class name="listmake"> + Emulation of jMax's [list] (but there cannot be a class named [list] in Pd) + <method name="init"> + <rest name="list" isattr="yes"/> + </method> + <inlet id="0"> + <method name="bang">send "list" to outlet 0</method> + <method name="list">as sending to inlet 1 and then banging; that is, passes thru and remembers.</method> + </inlet> + <inlet id="1" attr="list"/> + </class> + <class name="listlength"> + <inlet id="0"><method name="list"> + outputs the number of elements in the incoming list. + </method></inlet> + </class> + <class name="listelement"> + <method name="init"> + <arg name="index" type="int" isattr="yes"/> + </method> + <inlet id="0"><method name="list"><rest/> + Outputs one element of the list, as selected by "index". + Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. + </method></inlet> + <inlet id="1" attr="index"/> + </class> + <class name="listsublist"> + <method name="init"> + <arg name="index" type="int" isattr="yes"/> + <arg name="length" type="int" isattr="yes"/> + </method> + <inlet id="0"><method name="list"><rest/> + Outputs consecutive elements of the list, as selected by "index" and "length". + Also accepts negative indices (e.g.: -1 means "last"), like Ruby, but unlike jMax. + </method></inlet> + <inlet id="1" attr="index"/> + <inlet id="2" attr="length"/> + </class> + <class name="listprepend"> + <method name="init"> + <rest name="list" isattr="yes"/> + </method> + <inlet id="0"><method name="list"><rest/> + Outputs the stored list followed by the incoming list, all in one message. + </method></inlet> + <inlet id="1" attr="list"/> + </class> + <class name="listappend"> + <method name="init"> + <rest name="list" isattr="yes"/> + </method> + <inlet id="0"><method name="list"><rest/> + Outputs the incoming list followed by the stored list, all in one message. + </method></inlet> + <inlet id="1" attr="list"/> + </class> + <class name="listreverse"> + <inlet id="0"><method name="list"><rest/> + Outputs the incoming list, from last element to first element. + </method></inlet> + </class> + <class name="oneshot"> + Like [spigot], but turns itself off after each message, so you have to turn it on + again to making it pass another message. + </class> + <class name="inv+"> + <method name="init"> + <arg name="b" type="float" isattr="yes"/> + </method> + <inlet id="0"><method name="float"><arg name="a" type="float"/> + outputs b-a + </method></inlet> + <inlet id="1" attr="b"/> + </class> + <class name="inv*"> + <method name="init"> + <arg name="b" type="float" isattr="yes"/> + </method> + <inlet id="0"><method name="float"><arg name="a" type="float"/> + outputs b/a + </method></inlet> + <inlet id="1" attr="b"/> + </class> + <class name="messageprepend"> + (This is not in jMax, but is there to help port $* messageboxes) + <method name="init"><rest name="list" isattr="yes"/></method> + <inlet id="0"><method name="<any>"><rest/> + Like [listprepend], but operates on whole messages, that is, including the selector. + </method></inlet> + <inlet id="1" attr="list"/> + </class> + <class name="messageappend"> + (This is not in jMax, but is there to help port $* messageboxes) + <method name="init"><rest name="list" isattr="yes"/></method> + <inlet id="0"><method name="<any>"><rest/> + Like [listappend], but operates on whole messages, that is, including the selector. + </method> + </inlet> + <inlet id="1" attr="list"/> + </class> + <class name="shunt"> + Compatible with jMax's [demux]. + <method name="init"> + <arg name="n">number of outlets</arg> + <arg name="i" default="0">initial selected outlet</arg> + </method> + <inlet id="0"><method name="<any>"><rest/> + Routes a message to the active outlet. + </method></inlet> + <inlet id="1"><method name="int"><arg name="i" type="int"/> + Selects which outlet is active. + </method></inlet> + </class> + <class name="demux"> + please use shunt instead (name conflict with another Pd external) + </class> + <class name="range"> + <method name="init"> + <rest name="separators" type="float"></rest> + </method> + <inlet id="0"><method name="float"> + a value to be sent to one of the outlets. The first outlet is for values + smaller than the first argument; else the second outlet is for values smaller + than the second argument; and so on; and the last outlet is for values greater + or equal to the last argument. + </method></inlet> + <inlet id="1..n"><method name="float"> + sets the corresponding separator in the separator list. + </method></inlet> + </class> +</section> + +<section name="PureData emulation"> + <class name="pd_netsend"> + same as jmax_udpsend but for PureData UDP connections. + </class> + <class name="pd_netreceive"> + same as jmax_udpreceive but for PureData UDP connections. + </class> +</section> + +</documentation> |