A newer version of Max is available. Click here to access the latest version of this document.

jit.matrix

The Jitter Matrix!

Description

The jit.matrix object is a named matrix which may be used to matrix data storage and retrieval, resampling, and matrix type and planecount conversion operations.

Messages

bang Outputs the currently stored matrix.
int Equivalent to the setall [int] message, followed by the bang message.
float Equivalent to the setall [float] message, followed by the bang message.
list Equivalent to the setall [list] message, followed by the bang message.
clear Sets all matrix values to zero.
exportimage filename [symbol]
file-type [symbol]
use-dialog [int]
Export the current frame as an image file with the name specified by the first argument. The optional second argument sets the file type (default = png). Available file types are png, bmp, jpeg, macpaint, photoshop, pict, qtimage, sgi, tga and tiff. An optional use-dialog argument of 1 will open a file dialog to allow you to enter the image file settings.
exportmovie filename [symbol]
FPS [float]
codec [symbol]
quality [symbol]
timescale [int]
Exports a matrix as a QuickTime movie. The exportmovie message takes an optional argument to specify a file name. If no filename is specified, a file dialog will open to let you choose a file.

The default FPS is 30. frames per second

The default codec is raw . Supported codecs are raw , cinepak , graphics , animation , video , componentvideo , jpeg , mjpega , mjpegb , sgi , planarrgb , macpaint , gif , photocd , qdgx , avrjpeg , opendmljpeg , bmp , winraw , vector , qd , h261 , h263 , dvntsc , dvpal , dvprontsc , dvpropal , flc , targa , png , tiff , componentvideosigned , componentvideounsigned , cmyk , microsoft , sorenson , indeo4 , argb64 , rgb48 , alphagrey32 , grey16 , mpegyuv420 , yuv420 , and sorensonyuv9 .

The default quality is max . Supported quality settings are lossless , max , min , low , normal , and high . Note that minimum quality is, in many cases, the codec's default quality. Use "low" quality for consistent results.

The default timescale is 600 units per second.

exprfill plane [int]
expression [symbol]
Evaluates expression to fill the matrix. If a plane argument is provided, the expression is applied to a single plane. Otherwise, it is applied to allphanes in the matrix. See jit.expr for more information on expressions. Unlike the jit.expr object, there is no support for providing multiple expressions to fill multiple planes at once with different expressions. Call this method multiple times once for each plane you wish to fill.
getcell position [list]
Sends the value(s) in the cell specified by position out the right outlet of the object as a list in the form cell cell-position0 ... cell-positionN val plane0-value ... planeN-value .
fillplane plane [int]
value [int]
The word fillplane, followed by an integer that specifies a plane number and a value, will fill the specified plane with the single value.
importmovie filename [symbol]
time-offset [int]
Imports a QuickTime movie into the matrix. If no filename is specified, a file dialog will open to let you choose a file. The time-offset argument may be used to set a time offset for the QuickTime movie being imported (the default is 0).
jit_gl_texture texture-name [symbol]
Copies the texture specified by texture-name to the matrix.
op The word op, followed by the name of a jit.op object operator and a set of values, is equivalent to including a jit.op object with the specified operator set as an attribute and this jit.matrix object specified as the output matrix. The additional value arguments may either be a matrix name or a constant. If only one value argument is provided, this matrix is considered both the output and the left operand. For example, "op + foo bar" is equivalent to the operation thismatrix = foo + bar, and "op * 0.5" is equivalent to the operation thismatrix = thismatrix * 0.5.
read filename [symbol]
Reads Jitter binary data files (.jxf) into a matrix set. If no filename is specified, a file dialog will open to let you choose a file.
setall value [list]
Sets all cells to the value specified by value(s). Position is specified of a list whose length is equal to the number of dimensions (dimcount).
setcell position [list]
val [literal]
value [list]
Sets the cell specified by position to the value specified by value. Position is specified of a list whose length is equal to the number of dimensions (dimcount). The optional arguments plane plane-number can be used to specify a plane. If a plane is specified, value should be a single number, otherwise it should be a list of numbers of size planecount - 1.
setcell1d The word setcell1d, followed by a number specifying an x coordinate and a list of values, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (1) is fixed.
setcell2d The word setcell2d, followed by a pair of numbers specifying x and y coordinates and a list of values, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (2) is fixed.
setcell3d The word setcell3d, followed by three numbers specifying x , y , and z coordinates and a list of values, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (3) is fixed.
setplane1d The word setplane1d, followed by a number specifying an x coordinate, a number specifying a plane, and a value, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (1) is fixed, or use the "plane" token to specify which plane to set.
setplane2d The word setplane2d, followed by a pair of numbers specifying x and y coordinates, a number specifying a plane, and a value, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (2) is fixed, or use the "plane" token to specify which plane to set.
setplane3d The word setplane3d, followed by three numbers specifying x , y , and z coordinates, a number specifying a plane, and a value, is similar to the setcell message but without the need to use a "val" token to separate the coordinates from the value since the dimension count (1) is fixed, or use the "plane" token to specify which plane to set.
val value [list]
Equivalent to the setall message, followed by the bang message.
write filename [symbol]
Writes matrix set as a Jitter binary data file (.jxf). If no filename is specified, a file dialog will open to let you choose a file.

Attributes

Name Type g/s Description
name symbol The name of the matrix (default = UID)
planemap int Maps input places to output planes (default = 0 1 2 3 ...)
srcdimstart int The source dimension start position (default = all 0)
srcdimend int The source dimension end position (default = all dim values minus 1)
dstdimstart int The destination dimension start position (default = all 0)
dstdimend int The destination dimension end position (default = all dim values minus 1)
adapt int Matrix adaptation flag (default = 0 if matrix arguments are present, otherwise 1) When the flag is set, the jit.matrix object will adapt to the incoming matrix planecount, type, and dimensions.
thru int Thru mode flag (default = 1) When the flag is set, a matrix is output when another one is received.
interp int Matrix interpolation flag (default = 0) When the flag is set, the input matrix will be interpolated when copied to the internal matrix.
usesrcdim int Srcdim use flag (default = 0) When the flag is set, the source dimension's attributes are used when copying an input matrix to an internal matrix.
usedstdim int Destdim use flag (default = 0) When the flag is set, the destination dimension's attributes are used when copying an input matrix to an internal matrix.
dim int The dimensions of matrix data (default = 1 1)
dimstride int (get) The byte stride per dimension
planecount int The number of planes in matrix data (default = 4)
size int (get) Total byte size of matrix
type symbol The matrix data type (default = char
Supported data types are char, long, float32, or float64.

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.coerce Coerce a matrix into different types/planecount
jit.fill Fill a matrix with a list
jit.matrixset A set of matrices for storage/resequencing
jit.matrixinfo Report matrix planecount, type, dimensions
jit.peek~ Read matrix data as an audio signal
jit.poke~ Write an audio signal into a matrix
jit.spill Unroll a matrix into a list
jit.submatrix Reference a sub-region of a matrix
Tutorial 2: Create a Matrix Tutorial 2: Create a Matrix
Tutorial 11: Lists and Matrices Tutorial 11: Lists and Matrices
Tutorial 14: Matrix Positioning Tutorial 14: Matrix Positioning
Tutorial 16: Using Named Jitter Matrices Tutorial 16: Using Named Jitter Matrices
Tutorial 18: Iterative Processes and Matrix Re-Sampling Tutorial 18: Iterative Processes and Matrix Re-Sampling
Tutorial 20: Importing and Exporting Single Matrices Tutorial 20: Importing and Exporting Single Matrices
Tutorial 31: Rendering Destinations Tutorial 31: Rendering Destinations
Tutorial 39: Spatial Mapping Tutorial 39: Spatial Mapping
Tutorial 42: Slab: Data Processing on the GPU Tutorial 42: Slab: Data Processing on the GPU