MIDI Remote (API) exclusive MIDI port access

Hello. Two use cases here. Windows. Cubase Pro 12.0.52.

I have a virtual MIDI IN and MIDI OUT port that use MIDI messages to perform a variety of tasks, in Cubase and/or on the other end of the bidirectional link (mostly visual on the other end but some cause messages to be sent back to Cubase). Works well, and is happily talking to the software I’ve written for this purpose with Generic Remote. What I can’t then do with MIDI Remote is use the same ports for MMC - the MMC messages are sent to Cubase, e.g. “Get current position” but no response is sent from Cubase. Yes, I could create some more virtual ports for this, and doing so works, but that seems like a flaw in MIDI Remote.

I have a controller keyboard that has a footswitch. With Generic Remote I can assign the footswitch to trigger the mute action on a specific Cubase track (by index) and Generic Remote will then send the corresponding “mute on/off” message to the MIDI OUT port of my choosing (to my software, to cause it to perform an action), and I can still play the keyboard that uses the same MIDI IN port. MIDI Remote seems to ‘steal’ the MIDI IN port and if I do the same (using the API) I can no longer play the keyboard keys and have that routed to Cubase tracks.

Are these things on the roadmap to address in MIDI Remote? I prefer the concept of MIDI Remote API (scripting it) over making multiple XML files (still programming it but with the annoyance of having to re-import the whole lot of files if I make a small change) so would love to see this hurdle overcome.



Did you make the keyboard controller at your MIDI Remote script, please?

The full script below.

This is for an Alesis Q49 MKII keyboard. The MIDI IN port it uses handles the keybed, wheels, fader and the foot switch.

Q49 MKII has been un-checked in All MIDI Inputs. The script detects the keyboard and correctly routes the foot switch messages to the first Cubase track’s mute state.

A second Cubase track is a MIDI track with Q49 MKII explicitly set as its input. It receives no messages when I press keys on the keyboard or press the foot switch. I will want to be able to use the keyboard with any Cubase track, not just the one receiving the mute state changes.

var midiremote_api = require('midiremote_api_v1');

var driverVersion = 1;
var driverName = "Alesis Q49 MKII";
var driverNameFull = driverName + " v" + driverVersion;

var deviceDriver = midiremote_api.makeDeviceDriver('Skivington', driverNameFull, 'Sam Skivington');

const surface = deviceDriver.mSurface;

var midiInput = deviceDriver.mPorts.makeMidiInput();
var midiOutput = deviceDriver.mPorts.makeMidiOutput();

.detectPortPair(midiInput, midiOutput)
.expectInputNameEquals("Q49 MKII") // keybed, wheels, fader and footswitch
.expectOutputNameEquals("Q49 MKII")
.expectSysexIdentityResponse("00000E", "0059", "3030");

deviceDriver.mOnActivate = function(args) {
console.log(driverNameFull + " activated");

var page = deviceDriver.mMapping.makePage("Default");
const mixerBankZone = page.mHostAccess.mMixConsole.makeMixerBankZone("Default");


const channel = mixerBankZone.makeMixerBankChannel();

var btnFootswitch = surface.makeButton(0.0, 0.0, 0.25, 0.25);
.bindToControlChange(0, 64) // footswitch
.setValueRange(0, 0x7f);

page.makeValueBinding(btnFootswitch.mSurfaceValue, channel.mValue.mMute);

console.log(driverNameFull + " ran to end of script");


Add other control.


Or something like this. (Sorry I’m not at my DAW now).

It worked. Thank you!

I’ve also added Q49 MKII back into All MIDI Inputs and it continues to work.

It’s makePianoKeys btw :slight_smile:

1 Like