Creating MIDI Effects

Creating MIDI Effects

Max for Live lets you create MIDI effects devices which receive MIDI information from the Live application, perform some operation on that data (e.g. mapping incoming notes to a user-definied musical scale), and then pass MIDI data downstream to another MIDI effect or to a MIDI Instrument - the last device in a MIDI effects chain (although the audio output of the instrument may be further processed by any number of Audio effects devices).

By convention, Max for Live gets all its MIDI data from the Live application using the midiin object, and all of that data must all be passed downstream to other MIDI devices by means of the midiout object. Max for Live provides a means to redirect portions of an incoming MIDI data stream for processing while leaving the rest of the stream unchanged, as described below.

Also by convention, all Max for Live MIDI devices receive audio on MIDI channel 1. You can receive receive MIDI data in your Max for Live MIDI Effects device on a channel number other than 1 by routing the MIDI input as described here.

Max for Live provides several tutorials and example MIDI effects devices you can try, study, and modify:

  • One of the Max for Live example devices contained in the Max for Live Essentials Live pack is an example of a classic MIDI effects device - a Step Sequencer effect that contains four independent step sequencers whose editor looks and acts like Live's native MIDI editor.
  • The MIDI Effect Tools and Building Blocks demonstrate techniques for processing and generating MIDI.

Finding the MIDI Effect Building Blocks

  • After you have installed the Live Pack, click on the Packs button in Live's File browser to display the list of currently installed Live Packs. In the column to the right, click on the arrow to the left of the M4L Building Tools folder to show the Live Pack contents.
  • The MIDI Effect Building Blocks are found in the Max MIDI Effect folder within the Building Blocks folder.

Capturing a portion of the MIDI data stream in Max for Live

Max for Live requires that all MIDI data coming into a MIDI Effects device be passed downstream. There are situations in which you may want to use only a portion of the incoming MIDI data stream - to select only MIDI notes in a given range, or input from specific MIDI continuous controllers for use in your device. The Max midiselect object lets you specify portions of an incoming MIDI data stream to filter out for further processing in your device, and passes any other MIDI data out unchanged.

Redirecting a part of a MIDI data stream

  • In your unlocked patch, add a midiselect object and connect its inlet to the outlet of the midiin object in your MIDI Effect or MIDI Instrument template file.
  • Following the name of the midiselect object enter the attributes corresponding to the MIDI data you want to filter out of the data stream, followed by any arguments that specify additional data (MIDI channel numbers, MIDI controller numbers, etc.). Attributes names begin with an at-sign (@), and there is no space following it and the type of data you want to filter out.
    The data types are:
    ch: MIDI channel (only used when routing MIDI data from a non-channel 1 source, as described below)
    note: MIDI note data
    ctl: MIDI controller data
    bend: pitchbend data
    pgm: MIDI program change messages
    touch: Aftertouch data
    poly: Polyphonic aftertouch data
  • Connect the input of the midiout object in your MIDI Effect or MIDI Instrument template file to the right outlet of the midiselect object. Any data you do not specify when you instantiate the object or data you select by sending messages to the midiselect object will be passed downstream without being edited.

See Also

Name Description
Max For Live Max For Live