Hi,
I have a device with multiple midi ports. And Cubase seems to be able to auto detect these. This is the code I tried that doesn’t work. Like this the device is not detected. I can only add it manually:
midiInput[0] = deviceDriver.mPorts.makeMidiInput('Port')
midiOutput[0] = deviceDriver.mPorts.makeMidiOutput('Port Out')
deviceDriver.makeDetectionUnit().detectPortPair(midiInput[0], midiOutput[0])
.expectInputNameEquals('CustomDev')
.expectOutputNameEquals('CustomDev')
midiInput[1] = deviceDriver.mPorts.makeMidiInput('Port2')
midiOutput[1] = deviceDriver.mPorts.makeMidiOutput('Port2 Out')
deviceDriver.makeDetectionUnit().detectPortPair(midiInput[1], midiOutput[1])
.expectInputNameEquals('MIDIIN2 (CustomDev)')
.expectOutputNameEquals('MIDIOUT2 (CustomDev)')
If I do it with only one port the code works just fine and Cubase detects my device:
midiInput[0] = deviceDriver.mPorts.makeMidiInput('Port')
midiOutput[0] = deviceDriver.mPorts.makeMidiOutput('Port Out')
deviceDriver.makeDetectionUnit().detectPortPair(midiInput[0], midiOutput[0])
.expectInputNameEquals('CustomDev')
.expectOutputNameEquals('CustomDev')
The port name also is not the problem because this also works:
midiInput[0] = deviceDriver.mPorts.makeMidiInput('Port')
midiOutput[0] = deviceDriver.mPorts.makeMidiOutput('Port Out')
deviceDriver.makeDetectionUnit().detectPortPair(midiInput[0], midiOutput[0])
.expectInputNameEquals('MIDIIN2 (CustomDev)')
.expectOutputNameEquals('MIDIOUT2 (CustomDev)')
Is this even possible?