Route midi from m4l to any midi capable vst audio effect in live set - possible?

Kamil Baczman's icon

Hi,

I'm looking for a solution that would be similar to concept from DRD_Send~ device but for midi events. Basically I want to build m4l device in which I could choose specific track and device (not necessarily vsti instrument but also vst audio effect that can also accept midi like Pro-Q or whatever) and then send it events like midi notes or cc. I know I could easily send notes to device by putting m4l on a midi track and routing that tracks output to specific device or I could embed vst in m4l patch and then use its inlets to do it. In my solution however I'd like to be able to choose existing device from m4l as destination and also possibly use many destinations. From my research on forums this is not possible, but maybe something has change since max 8 ?

Jay Walker's icon

Maybe it would help to use javascript to manipulate the api? For example, I'm attaching a midiIn directly into a JS inlet, and then listening for it. Then you can do whatever you want with the message. In this example it just moves the third parameter of the second device down:

function redirectMidi(v) {
if (v == "1,3") {
var live = new LiveAPI('live_set view selected_track devices 1 parameters 2');
var value = live.get('value');
var newVal = value - 10;
live.set('value', (newVal));
log(newVal);
}
}

You could also map to buttons/dials on a device and send those to a js script to control other tracks or devices in this way.