MIDI input objects

Max has dedicated objects for parsing each particular type of MIDI channel message coming into the computer, such as notes, pitchbends, controllers, etc., and it has corresponding output objects for formatting and transmitting MIDI messages to be sent out of Max.


This example shows how to control glissando using MIDI. A little bit of revision: MIDI notes can only be played with whole numbers 0-127. Some synths allow you to specify an alternate tuning other than 12-tone equal temperament, but that’s not what we’re after in this case. So, let’s say, if you’re converting frequency to midi note values you will need to calculate the desired pitchbend from the fractional part of the value you obtain from ftom.

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.

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.

Routing MIDI to other applications

The easiest way to establish MIDI connection between Max and other applications on the same computer is via the "virtual" MIDI ports Max provides. Max creates two virtual input ports and two virtual output ports that can be accessed by other MIDI applications. (You can see those virtual ports listed in Max's MIDI Setup, by choosing MIDI Setup... from the Options menu.)