Rotate, zoom, and offset video using jit.rota
This patch shows how to rotate, zoom, and offset video using jit.rota.
This patch shows how to rotate, zoom, and offset video using jit.rota.
This patch uses a rslider to set the minimum and maximum for random values of the brightness of red ouput by the jit.matrix and the frequency of an cycle~.
This patch will choose a new 1 second segment of a video to play every second.
One way to make video respond to audio in Max, is to detect some significant event in an MSP audio signal, and use that to trigger something in Jitter. This patch demonstrates one case of that. It uses an event in an audio stream to trigger the display of a frame of a movie. Every time the phasor~ jumps down to 0, a bang is sent to the jit.qt.movie causing it to display the current frame of the movie loaded into it.
Most Jitter objects have internal states, known as attributes, and you can get and set their values. The list of messages on the right hand side of the example are a few of the attributes of a jit.qt.movie object. When you click on one of the attribute-getting messages, its value is reported from the right outlet of jit.qt.movie.
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.
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.
This example shows a way to set the contents of a 2D Jitter matrix algorithmically in jit.gen. The task in this case is to fill an empty matrix with a checkerboard pattern of alternating black and white squares, which is to say alternating 0 and 1 cells.