Max

detonate demo

For producing a score out of time and then saving as a standard MIDI file, detonate is the best way to go, and it can save in either format 0 or format 1. Admittedly, you could save a format 0 MIDI file with text and seq by writing the text file, reading it back into seq, then writing that as MIDI, and it could all happen in a few milliseconds.

loadbang delay argument

Upon patch initialization, one might be tempted to use multiple loadbang objects attached to delay objects in order to control the order of operations. A different approach, however, would be to use a single loadbang at the top level and use send or forward to send the messages you want, where you want, and in the order you want.

text to video

This example shows a simple way of putting text into video, with the lines of text stored in a coll object. After loading the video sending a read message to jit.qt.movie, you can load each line by clicking the button in the middle of the patch.

Interleave two lists

If you have two lists that you want to combine, you can do so using zl object with an argument lace. However, it will only output a list that is twice as long as the shorter of the two lists. Hence, it's best if the two lists are the same length. 

Function Demo

If you have wondered how to setup the function object to remember its settings upon opening there 3 things to note:

1. preset and pattrstorage can give you all kinds of possibilities on loadbang.

Sine Wave into Buffer~

The cycle~ object allows you to read from a stored cosine function (use a phase offset of 0.75 to get a sine phase), and does high-quality interpolation to give you excellent resolution even though it only uses a 512-sample table. (See MSP Tutorial chapters 1-3).

But if you want to put a sine wave into a buffer~, here’s a way:

Grand Master Fader

Given a hypothetical grand master fader that can be controller with the continuous controller 13 (assuming for the sake of this example that your device is also set to receive on MIDI channel 1), you can send the message 176 13 127 to a midiout object to turn the fader up to full. Another way to do this would be to use a ctlout object, send the number 1 in the right inlet, the number 13 in the middle inlet, and then send 127 in the left inlet.

Detect end of video in imovie

The imovie object displays a video within a single UI object in a Max patch. To detect when the movie has ended, use the getduration message to determine the movie's duration, then use the gettime message to monitor the current time of the video as it plays. In this example, we use the grab object to get the duration once and store it in other objects (select and >=).

Count with incdec

The incdec object is a user interface object with an up arrow and a down arrow. It stores a number, and it also has an internal step size (increment attribute), which is 1 by default. When you click on the up or down arrow, incdec will increase or decrease its internal value by the increment, and send out the number.