Hi, I thought I should add this here as an issue with multiple midi ports in scripts, when we create a new (empty) project.
When we have a ports pair, no problem at all, Cubase immediately recognize it, and loads the script.
However, if we add another ports pair, it is not recognized automatically and gets us to the port setup window of the script.
Testing this is pretty straight forward:
var midiremote_api = require('midiremote_api_v1')
var deviceDriver = midiremote_api.makeDeviceDriver('test', 'test', 'multiple ports issue')
var midiInput = deviceDriver.mPorts.makeMidiInput()
var midiOutput = deviceDriver.mPorts.makeMidiOutput()
var midiInput2 = deviceDriver.mPorts.makeMidiInput()
var midiOutput2 = deviceDriver.mPorts.makeMidiOutput()
deviceDriver.makeDetectionUnit().detectPortPair(midiInput, midiOutput)
.expectInputNameEquals('loopMIDI Port')
.expectOutputNameEquals('loopMIDI Port 1')
deviceDriver.makeDetectionUnit().detectPortPair(midiInput2, midiOutput2)
.expectInputNameEquals('loopMIDI Port 2')
.expectOutputNameEquals('loopMIDI Port 3')
If we remove the second pair (midiInput2 & midiOutput2), no problem at all! If we include it, the issue arises.
I’ve intentionally used virtual ports here, in order for it to be easily reproduced, however it obviously happens with “real” midi ports as well.
As a workaround, I have setup a project template containing the script, so this isn’t a big trouble in the end, but anyway, I think that this should be taken care of.