Some useful Jitter attributes
Here are a few attributes of the jit.movie and jit.window objects that I find useful for initializing the objects to behave the way I want.
Here are a few attributes of the jit.movie and jit.window objects that I find useful for initializing the objects to behave the way I want.
The jit.qt.movie object (or jit.movie, or jit.movie~), for playing videos, has a great many attributes and understands
Did you know that the jit.movie (or jit.qt.movie) object will report when it has completed a read operation?
Here's an example of algorithmic video editing in Jitter. The goal is to create a stop action slideshow of single frames of video, stepping through a video in 1-second increments. And just to make it a bit weirder and more challenging, we'll step through the movie backward, from end to beginning.
This is a slightly more refined A/B video switcher patch than the simple one shown in "Simplest A/B video switcher". It has a more sophisticated user interface when viewed in Presentation mode. It will try to open two video files called "A.mov" and "B.mov", and it also provides buttons for the user to open any other videos to use as the A and B rolls.
This is the simplest possible way to switch between two videos. When the patch is opened we read in a couple of example video clips (which reside with the Max application folder, so they should normally be in the file search path). Because the default state of the 'autostart' attribute in jit.qt.movie is 1, the movies start playing immediately. Because the default state of the 'loop' attribute in jit.qt.movie is 1, the movies will loop continually.
The jit.qt.movie object has a large number of attributes that you can use either to modify the object's behavior or to get information about the video it's playing. To set an attribute, you send a message consisting of the name of the attribute followed by the value(s) you want that attribute to have. For example, to set the 'vol' attribute (the volume of the video) to 0.5, you send the message vol 0.5 to jit.qt.movie.
This shows a simple way to play a QuickTime movie using Jitter. When the jit.qt.movie object receives a read message, it opens a dialog box allowing you to select a movie file. As soon as you select a movie and click OK, jit.qt.movie begins to retrieve frames of video from that file and place them in memory, at the frames-per-second rate specified in the movie file itself.
This patch shows a way to capture and play back excerpts of live video. It uses jit.matrixset as a circular buffer to hold selected frames of live video from jit.grab, and it uses the decide and random objects to make arbitrary decisions regarding when to record and which excerpt to play back.