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

jit.shade

Map-based crossfader

Description

The jit.shade performs a linear crossfade between corresponding cells in two input matrices at a rate determined by the values of the cells of a third matrix (the "map"). The rate of the crossfade is calculated in terms of frames, rather than units of time.

Three fade modes are available. mode 0 crossfades unidirectionally from start to finish, and sends a done message out the right outlet when the fade is complete. While mode 1 and mode 2 are more continuous fade processes, the do not provide any feedback upon completion of a crossfade.

Generally, a 1-plane long matrix is sent to inlet 3 as the map. If you send a 2-plane matrix, plane 2 of the matrix can be used to set initial values for the crossfade.

Matrix Operator

matrix inputs:3, matrix outputs:1
Name IOProc Planelink Typelink Dimlink Plane Dim Type
in2 resamp 1 1 1 1 1 char long float32 float64
in3 adapt 0 0 1 2 1 long
out n/a 1 1 1 1 1 char long float32 float64

Information for Jitter Matrix Operator (MOP) messages and attributes to this object

Messages

reset Zeroes the fade counter, causing the fade to start over from the beginning. The fade counter is actually managed in the second plane of matrix 3. If initialization values were provided in that plane, they are lost after a reset message is received.

Attributes

Name Type g/s Description
max int Maximum rate (default = 255)
min int Minimum rate (default = 0)
mode int Crossfade mode (default = 0 (start to end))
0 = start to end crossfade: Fades from start to end without looping and sends a done message out the right outlet on completion.
1 = palindrome crossfade: Fades from start to end, then reverse direction.
2 = looped cellwise start to end crossfade: Once any cell has finished its fade, it begins again.

Information for box attributes common to all objects

Examples

See Also

Name Description
jit.alphablend Use the alpha channel of one image to blend two images together
jit.op Apply binary or unary operators