[sharing] MIDI routing patch
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 http://www.midiox.com 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 :)
Peter
http://www.lividinstruments.com
Hi Peter,
This is really great! Thank you!
EDIT:
See next post.
There is a simple bug in the [p makeMIDIs] subpatcher.
The [midiinfo] object that specifies the MIDI inputs needs to be banged in its right inlet. The patch you uploaded was banging it in the left inlet. This essentially broke the use-ability of the patch.
Here is the fixed patch. You will still need the MIDIroute.js file from Peter's uploaded zip file.
Cheers,
Joe