[noteout] to multiple MIDI tracks (or MIDI channels?)

Stirring Desert's icon

My device essentially makes a midi note of choice when a button is pressed. I'd like to be able to play different instruments on different tracks with only a single instance of my device.

The send/recieve solution works but it's not the workflow I want for this device.

This has been discussed before, but most of the threads on issue are from 10 years ago, saying that Live merges MIDI into a single channel and there's nothing that can be done about it.

Did nothing change? Is there really no other solution?

tyler mazaika's icon

Same as ever.

Trevor being Trevor's icon

I am assuming you mean the send and receive objects in Max? What if you did something like this directly in Ableton? This is sending keyboard midi from the MaxDevice channel to the other two instruments on different tracks. Ignore that Operator is armed for recording, it works regardless of that.

Stirring Desert's icon

@Trevor that's the workflow I'd like to achieve, but this only works for a single channel. I'd like to essentially have different buttons send different midi to different tracks.

I've actually found an interesting solution for "sending midi" to other tracks inside the new Building Max Devices official ableton pack. There's an audio device called Midi Routing Output which uses LOM to let the user choose to which track the [noteout] midi will go. However, as far as I can tell right now, this is global for all the [noteout] objects you might have in a patch, so I can't send different MIDI to several tracks at once.

tyler mazaika's icon

yeah. you only get a single routing output with the Midi routing stuff in audio devices.

Stirring Desert's icon

@Tyler same with Instrument devices, right? :(

tyler mazaika's icon

Yah. I feel like I relearn this hard truth once every year or two. :-/

Julien Bayle's icon

This so hard reality, since 2011.

Max Doe's icon

please check if this works for your project:

imp.midi is a set of objects to get round an irritating limitation of Max For Live, in that devices hosted by Ableton cannot access any MIDI data other than a single channel provided to them by the track the device is created on. Additionally, it is impossible to access SysEx messages.

MIDI support in these externals is implemented using RtMidi, a very useful C++ cross-platform MIDI library.

Objects included:

  • imp.midiin

  • imp.midiout

  • imp.midiinfo

  • imp.sysexin

These objects are all drop-in replacements for their standard max equivalents and function exactly the same way, with the addition of an extra status outlet to provide feedback on whether the object has successfully connected to the port.

It’s free 👍

Thanks David Buttler

Uzo's icon

Was struggling with this myself recently. Finally got to the bottom of it.

Seems that we have 3 options for getting multiple midi channel data out of Ableton.

  1. Use send and receive objects with 16 dedicated midi out channels in Ableton routed to each midi channel. This is the easiest but is obviously not a streamlined solution.

  2. Use the LOM Control Surface API with the send_midi function (details below)

  3. Use a MIDI Remote Script calling the same send_midi function (not tried myself yet but pretty sure this should work)

The send_midi function is expecting midievent messages (right outlet of midiformat object) so add these onto the end of the function message that you send to live.object

e.g. “call send_midi 144 64 0”

This allows you to circumvent the singular midi channel issue without 16 separate send patches.

Also, seems to be the only way to get a send a Note On message with velocity 0 (besides a dedicated MIDI remote script) via Ableton) which leaves me with no options but to use the API or I cant turn my controllers LEDs off, ha!

No idea why the midi implementation of Ableton has these gaping quirks in 2024 but for those looking for a workaround, there ya go :)

FYI unfortunately the imp.midi externals didn't work for me. Was getting a “could not load due to incorrect architecture” when I tried to load the external. Thought it might be an Apple Silicon thing but had the same error when I loaded in Rosetta emulation. Would’ve been great if they worked though. Was trying with Max 8.6 on Ventura and Ableton Live 12.

Hope that helps!

Adam Murray's icon

The previous message from Uzo gave me hope I overlooked something and maybe there is a reasonable way to send MIDI to multiple other tracks from a Max for Live device using the Control Surface API. I thought that API was for interfacing with hardware, so I never considered it for this purpose.

It took a little while to figure out what I am supposed to do, but I think I have things setup correctly. I cannot receive any MIDI on other tracks though, and I am worried I got the wrong idea and this is yet another dead end.

I enabled the special MaxForLive control surface in settings. I found you need to not enable MPE or you can't control how the MIDI channels are routed (that makes sense, since MPE is a multi-channel protocol).

After that, I can seemingly receive per channel MIDI using MaxForLive (from Max 1):

I made a device patch that loops over all the control surfaces and finds the one named "MaxForLive". Then, I call it's send_midi function using the midievent-style list format that Uzo was explaining. I can see the MIDI activity light activating in the upper right of Live's interface (showing that Live is sending MIDI output), so some sort of MIDI activity is happening, but I never receive any MIDI at any of the tracks from the screenshot above.

I don't know if I have a bug in my patch, something is still setup incorrectly in Live, or do I have the wrong idea about how this is supposed to work?

AFAICT, my device is sending MIDI to the "to Max 1" MIDI port, but my Live tracks are listening to "from Max 1", and those are not connected together. I also tried using a macOS IAC Bus, and that doesn't help either. I feel like maybe this could work if I had a separate "MIDI loopback" app running to feed data from "to Max 1" into "from Max 1". But I don't want to jump through hoops like that. The point of this is to find a simple solution that works entirely inside Live with minimal fuss.

Any ideas? Here's the device I've been trying to get working along with the setup from the screenshots above. I feel like I am so close, but I'm about to give up on this again for another few years (sigh)...

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

"to Max 1" and "from Max 1"

could work only if you have max patch with

midiin - midiout loopback inserted, and that in standalone Max,

or as editor in live, but not in m4live device .

Also any midi loopback software with IAC buss as well could work,

to pass midi.

midipipe for example.

Adam Murray's icon

Ok, thanks. It seems like send and receive objects are still the only way to route multi-channel MIDI entirely within Max for Live.

Source Audio's icon

Is that tight enough compared to high priority midi which anyway is shaky in Live ?

Adam Murray's icon

Is that tight enough compared to high priority midi which anyway is shaky in Live ?

Probably not? I'm not striving to build things for use in live performance scenarios with MIDI over send/receive objects, so it's not a huge concern for me. It would be interesting to measure the timing of send/receive vs using a separate app as a MIDI loopback. There must be some overhead going back and forth between completely separate application processes, but I don't know what is going on under-the-hood with this stuff, and it might depend on the operating system too.

Personally, here's where I am at with MIDI processing in Max for Live:
- It's good for prototyping and experimenting
- It's good for generating clips and building MIDI transformer/generator devices for Live's clip editor (in other words, it's good during the composition stage, rather than for performance)
- Simple, single-track MIDI devices can probably work fine with good timing in real time
- For real time multitrack MIDI generators/processors (stuff like Modalics Beat Scholar), building an AU/VST plug-in in C++ & JUCE is probably the best option

Source Audio's icon

In that case I would not bother with external apps for midi.

send-receive should do.

same as with midi channels. one can assign ID's for messages and any

device can listen to it.