I don’t post very often since I usually find the answers in JUCE’s code directly, but in this case I need some guidance…
When my osx app creates midi ports, it seems StudioOne users need to reconfigure the DAW everytime they reuse the app because it can’t recognize the ports as being the same from one launch to the other, despite being named the same.
StudioOne support said that it’s because I need to set the device’s
kMIDIPropertyUniqueID for them to recognize the port:
On every startup of your app, a new random value is assigned to the kMIDIPropertyUniqueID property of each MIDI port. This value is used by Studio One to do the matching.
From the Apple docu :
"After creating a virtual destination, it’s a good idea to assign it the same unique ID it had the last time your application created it. (Although you should be prepared for this to fail in the unlikely event of a collision.) This will permit other clients to retain persistent references to your virtual destination more easily."
While one could in theory invent some workaround on our side, using port labels, we’d advise against it. One should adhere to Apple’s recommendations.
Would it be possible to add a setter on
MidiInput classes for me to keep those unique IDs consistants between 2 launches?