Forums > MaxMSP

[sharing] MIDI routing patch

January 19, 2013 | 6:38 pm

Based on Emmanuel Jordan’s mgraphics-connector example.
This creates midiin and midiout objects for each port on startup.
The output from the JSUI scripts connections between midiin and midiout objects.
The use case that inspired this is the need to share a USB class-compliant device among several applications on Windows. The built-in drivers on Windows only allow one application to use one device. It’s annoying. Max erases this annoyance. You’ll of course need a MIDI loopback driver on your Windows machine (equivalent to Mac’s IAC driver) to make use of this. MIDI Yoke is one such driver.
The js is only slightly modified from EJ’s example. I added a "delete connection on doubleclick" function and made the rounded corners have a radius of 2. Rounded corners are SOOOOO Max 5 :)


January 20, 2013 | 7:37 am

Hi Peter,

This is really great! Thank you!

But there is an issue with my setup.

The jsui object does not show all of the midiin ports. Specifically, it is missing only one: "AU DLS Synth 1". (This port does however appear in the jsui midiout list).

The script that creates the midiin object for "AU DLS Synth 1" on loadbang does actually work though.

The result of this means that making connections in the jsui from in-ports to out-ports gets displaced by one in the actual patchcord connections below.

Hope that makes sense.

Thanks again,


Viewing 2 posts - 1 through 2 (of 2 total)