jit.matrix

Make an elliptical mask in Jitter

Video masking is a technique that allows you to focus an effect on some parts of an image, while leaving other parts uneffected. It's particularly effective when used in the alpha channel of a video, causing some parts of the image to be transparent while other parts remain opaque, allowing for one image to be composited on top of another. The "mask" is a shape, often simply a 1-plane black-and-white or grayscale image, that can be used in the alpha plane to designate which parts of an image should be transparent.

Change hue rotation

This examples shows how you can adjust the hue of an image by adjusting the value of hue angle of the object jit.hue. The left side of the example sets the time in milliseconds to change the hue angle over a certain amount of time. The right hand side of the example uses the incoming sound level to alter the angle. 

Create a go board in Max

This patch demonstrates how to create a 19x19 matrix that functions as a sort of "go" board, in which each mouse click alternates between placing a white or black square in a cell of the matrix. It's meant to demonstrate how a matrix can be used to store a multidimensional array of states or conditions.

Alpha masking

A video matrix, such as comes out of jit.movie, has four planes of data, representing alpha, red, green, and blue. The alpha channel contains information about the opacity of the other three planes—a factor that can be used when mixing/compositing with another image. Normally the values in the alpha channel are all set to 1., meaning full opacity. However, if some values in the alpha channel are 0., the image will be transparent in those pixels, allowing another image to show through.

Store matrices in a text file

To store an array of integers, you will usually use the table object. To store an array of floating point values, you can use the buffer~ object. Although the buffer~ object is normally used for storing audio data, it can easily be used simply as an array of floats, accessed by the peek~ object, which works even when MSP audio is not on.

Crossfade and blur movie files using jit.xfade and jit.matrix

This example shows a couple of different Jitter techniques. It shows how you can very simply use a MIDI control value to alter a Jitter attribute. In this case, the MIDI values from a modulation wheel (continuous controller 1), which range from 0 to 127, are divided by 127.0 to provide an xfade value from 0. to 1. to the jit.xfade object, to crossfade between two movie files.