Midi2 branch and virtual MIDI ports

Hi there! I am testing the Android virtual MIDI ports with the new Midi2 branch and am seeing two issues, although I am not sure whether they are bugs or just Android peculiarities:

  • The names of virtual MIDI ports are currently composed by the company name and project name. The deviceName passed in with createNewDevice() has no effect, nor has calling setName(). Is it not possible to set custom names for the virtual ports on Android?

  • The virtual ports of an app persist on other apps even after the app has been closed. They only disappear when the app is uninstalled. Is this normal?

Sort of - the name of the port must be set at buildtime, rather than at runtime. You can see the details of the ports in the generated files juce_midi_virtual_ump.xml and juce_midi_virtual_bytestream.xml. Currently we set the name based on the company name and the project name. We could look at adding a field in the Projucer to allow setting a custom name, but that feature doesn’t exist currently. In the meantime you could get the same behaviour by manually editing the generated xml files, but be mindful that these will be overwritten each time you resave the project from the Projucer.

I believe that this is normal, yes. I saw the same behaviour with other apps that provide virtual midi ports, such as the DRC synth which has a free demo.

Got it. Thank you!