gate

Using table to transpose a MIDI note

Pitch transposition of MIDI notes is easy; you simply add (or subtract) some number of semitones to the pitch value. However, whenever you transpose a MIDI note-on message you have to make sure to transpose the corresponding note-off message by the same amount. Otherwise, the note will not get turned off and you'll get a "stuck" note that never ends.

Detokenizing Stream of Numbers

A Max user was having trouble detokenizing a stream of number. In this case, given a stream of number, he wanted to route the number immediately following a 8 to a first output, the number immediately following a 9 to a second output, the four numbers immediately following a 10 to a third output, and all the rest to a fourth output.

Bypass video effect

To create an effects chain for video similar to a guitarist’s pedal board, one needs a bypass mechanism so that disabling one effect doesn’t stop video playback. This can be achieved using gate or ggate.

Managing transpositions for sustained MIDI notes

When transposing the pitch of sustained incoming MIDI notes, you need to be certain that the note-off message has the same transposition. Otherwise, any time more than one note is played, each subsequent note changes the transposition before the previous note receives its note-off message. To solve this you need to keep track of what transposition you give to each incoming note, as illustrated in this example.