Virtual MIDI devices have empty identifiers since JUCE 8.0.11

Hi JUCE team,

Since JUCE 8.0.11, virtual MIDI devices created with with MidiOutput::createNewDevice() and MidiInput::createNewDevice() return empty identifiers.

It seems that the issue was introduced in commit ba7593df26.

JUCE 8.0.10 (with ID)

// modules/juce_audio_devices/native/juce_CoreMidi_mac.mm
std::unique_ptr<MidiOutput> MidiOutput::createNewDevice (const String& deviceName)
{
    auto deviceIdentifier = createUniqueIDForMidiPort (deviceName, false);
    // ...
    auto midiOutput = rawToUniquePtr (new MidiOutput (deviceName, String (deviceIdentifier)));
}

JUCE 8.0.11 (without ID)

// modules/juce_audio_devices/midi_io/juce_MidiDevices.cpp, line ~250
std::unique_ptr<MidiOutput> MidiOutput::createNewDevice (const String& name)
{
    // ...
    return rawToUniquePtr (new MidiOutput (session, std::move (connection), 0, 
                                          { name, {} },  // <-- empty identifier!
                                          std::move (port)));
}

This happen with MidiInput too.

As a workaround, I can compare virtual devices by name instead of by identifier.
However, I’d like to confirm whether this change was intentional or if it could be addressed on your side.

Thanks in advance.

Best,

Samuele

@dev4am thanks for reporting. I strongly expect this wasn’t intentional although most of the team are away for the Christmas holidays right now so I would need to confirm when they come back.

Thanks for your reply, I’ll wait. Could you roughly estimate when when you expect to have new updates?

We are planning a release around mid January.

In the meantime, I wish you a Merry Christmas.

Best,

Samuele

I suspect someone will take a look at this early to mid January. It couldn’t make any promises as to when this would actually change or what the change would even be. I would expect the old behaviour can be restored without too much trouble but without having actually investigated it further and effectively fixed the issue it’s always hard to say. We’ll keep this thread updated with more information when we have it.

Just to be clear any release by mid January would only be on the develop branch.

Merry Christmas to you too :christmas_tree:

Thanks for reporting! Identifiers for virtual ports have been reinstated here:

1 Like