Hello, is it possible to use one value per midi CC to send command to cubase in a custom api remote script ? Seems like I only have success using distinct midi message, that limit the number of different midi message to how many ? I have a large template and need 3 different PLE per track in my custom script, which is a few thousands, the workaround would be to use multiple midi remote devices but asking just in case
var surface=deviceDriver.mSurface
var initMidiCCCustomVariable=surface.makeCustomValueVariable("initMidiCCCustomVariable")
initMidiCCCustomVariable.mMidiBinding
.setInputPort(midiInput)
.bindToControlChange(15,127)
var b1=surface.makeButton(0,0,1,1)
var b2=surface.makeButton(1,0,1,1)
page.makeCommandBinding(b1.mSurfaceValue,"Process Project Logical Editor","PresetA")
page.makeCommandBinding(b2.mSurfaceValue,"Process Project Logical Editor","PresetB")
initMidiCCCustomVariable.mOnProcessValueChange=function(activeDevice,value,diff){
var value127=Math.round(127*value)
switch (value127){
case 1:
b1.mSurfaceValue.setProcessValue(activeDevice,1)
break
case 2:
b2.mSurfaceValue.setProcessValue(activeDevice,1)
break
//And So on
}
}
Notice how the mOnProcessValueChange allows us to trigger different buttons’ surface values, which are then bound to commands. Notice also that these buttons don’t have any midi binding at all. We need just one custom variable.
Instead of 7-bit, you can even use 14bit MIDI, so that with just one custom var you can control more than 16000 commands.
Finally, you can always use midi sysex, but in the use case you presented I don’t see a benefit.