metro

MIDI note off messages

Every MIDI note-on message must be turned off at some time by a subsequent corresponding note-off message for the same pitch (or note-on message with velocity 0). This patch shows two ways to ensure that. One is a very simple way that's illustrative but not ideal; the second way is much more versatile and is the preferred way.

Beat divisions with transport

In the MIDI specification, and in most DAW software, and in Max, the smallest unit of metric timing is expressed in "ticks", which is to say, partial units of a beat. Commonly the number of ticks used is 480 or 960 parts per quarter note. That number makes sense because it's divisible by 2, 3, 4, or 5 (and multiples of those).

Choose new movie

In this example, when you turn on the two metro objects, one of the three movies are chosen randomly by the urm object every three seconds to be read by the jit.qt.movie object. Since the urm generates random numbers without duplicate, it can be used to switch to a new movie at a certain interval while playing.

Cause and effect

This example shows a series of events that causes a movie to start playing. 

First, when you click on the message read blading.mov or read, the message is sent to the object jit.qt.move, which then reports read <movie_name> 1 from the right outlet if successful.