Random movie edits

This is a program for random editing of a video by periodically leaping to randomly-chosen times in the video and playing from there. The jit.qt.movie object here has its attributes initialized such that: a) it will adapt the dimensions of its matrix based on the dimensions of the movie that is read in, b) it will not automatically start, c) it will not loop, and d) it will only send out new frames of video without repeating a frame. When a movie is read in, a read message comes out the right outlet of jit.qt.movie; if the read was successful (the flag at the end of the read message is 1) it will trigger queries for attributes of the movie, namely its time units, duration, frames per second, and dimensions. The results of those queries are used to set the size of the display window (using moviedim), the rate of the frame-displaying metronome (using fps), and the range to use for the random time choices (using duration and timescale). The random range is set as follows: the timescale of the movie (QuickTime time units per second) is multiplied by the interval between edits (in seconds) and subtracted from the total duration. That ensures that each random edit will start at a time in in the movie that will allow the edit to play without hitting the end of the movie. When the toggle is turned on the random location choosing metro is turned on to choose the first edit location, the movie is started, and the display qmetro is started. A new randomly-chosen time message will be sent to the jit.qt.movie object at the specified rate.

Chapter: