Matrix Operator Attributes and messages common to matrix operators

Since the matrix is Jitter’s focus, it is not surprising that the majority of Jitter objects fall in this category of Matrix Operators. Every Matrix operator has some number of matrix inputs and some number of matrix outputs. Matrix inputs are referred to by the names "in", "in2", "in3", etc., from left to right, and matrix outputs are referred to by the names "out", "out2", "out3", etc., from left to right--i.e. the names are appended by the input/output number except for the first (leftmost) input and first (leftmost) output which are simply named "in" and "out". We will refer to the input or output name names as the "i/o-name".

Matrix inputs and outputs typically each have their own matrices internally where information is kept. This is necessary because Jitter is an asynchronous framework (i.e. all the matrices don’t arrive at all inputs at the same time). Various aspects of matrix inputs and outputs can be set using the command [i/o-name] combined with one of the following suffixes: "_dim" which will set the dimensions of the specified i/o matrix, "_type" which will set the type of the specified matrix, "_planecount" which will set the plane of the specified matrix, or "_name" which will set the name of the specified matrix. There is one special case which does not have an internal matrix and this is the first input "in". This is the case since this special input actually triggers the calculation of the matrix operator, so it doesn’t need to be cached until a calulation takes place, unlike the other inputs. Therefore there is no mechanism to set the dim, planecount, type, or name of "in".

Matrix operators accept what we’ll refer to as "matrix args"--i.e. [planecount (int)] [type (symbol)] [dim (int list)]. if these arguments are present, the adapt attribute will be turned off, otherwise it will be turned on. If adapt mode is turned on, each time a matrix is received in the first input, there will also be the equivalent of setting the dim, planecount, and type attributes to that of the input matrix. If the other inputs and outputs are linked to these attributes, this will affect their linked attributes as well. See the "MOP" table to determine which inputs and outputs will be linked to which attributes when adapt mode is turned on. For the leftmost input this is not applicable, and hence all columns are labelled "n/a".

Attributes:
Name Type Description
adapt int Adapt to incoming matrix planecount, type, and dimensions (default = 0 if matrix arguments are present, otherwise 1)
dim int list[32] The matrix data dimensions (default = 1 1)
[in/out]_dim symbol Input or output dimensions (default = dim except in special cases)
[in/out]_name symbol The input or output name (default = UID)
[in/out]_planecount symbol The input or output planecount (default = planecount except in special cases)
[in/out]_type symbol The input or output type (default = type except in special cases)
outputmode int Output mode (default = 1 (calculate and output matrix))
0 = No output
1 = Calculate and output the matrix
2 = Pass input (no calculation)
3 = Pass output (no calculation)
planecount int The number of planes in matrix data (default = 4 except in special cases)
type symbol The type of matrix data. Supported types are char, long, float32, or float64 (default = char except in special cases)

Messages:
bang
Equivalent to the outputmatrix message.

clear
Sets all cell values in a matrix to zero.

jit_matrix [matrix-name (symbol)]
Handles input for the named matrix. If this message is received in the left inlet, output is typically triggered. If this message it is received in any other inlet, the data is typically cached until the jit_matrix message is received in the left inlet.

outputmatrix
Sends all output matrices out all the object’s matrix outlets.