Midi device notification callback?

Hi there,

I’d like to be able to know when a midi device is connected / disconnected, on Win32 and Mac. Or at least if there has been any change in the number of devices connected. As far as I can see, Core Midi should be capable of doing such a thing, but the necessary method (juce_mac_CoreMidi.cpp::globalSystemChangeCallback) is not implemented.

Any news on if / when this will happen?

Cheers,
Tim

1 Like

AFAIK there is no way of doing this using the Win32 API, or on Linux or Android. CoreMidi and the WinRT MIDI API do provide ways of getting a notification when the devices change but adding this for a couple of platforms and not others isn’t ideal.

If you look at the MidiDemo the way we get around this is by starting up a timer which polls the connected devices every 500ms to check if they have changed.

Right, that is a solution I hadn’t thought off, thanks!