Win32 Midi nanoKONTROL Studio input fail

Hi !

I found an issue with new develop branch of Juce that do not happen with current master branch:

My Korg nanoKONTROL Studio input do not work with DemoRunner
But my Behringer XTouch Mini work perfectly well.

I’m not using JUCE_USE_WINRT_MIDI.

I found that Juce develop branch introduce indentifier system that rely on DRV_QUERYDEVICEINTERFACE.
And for this Korg device, Win32MidiDeviceQuery::getInterfaceIDForDevice() return an empty String.
(WrapperType::sendMidiMessage() always return MMSYSERR_NOERROR)
This message may be not supported by the this midi device driver (I use the last one by the way)
So to workaround this, I patch Win32MidiDeviceQuery::getAvailableDevices() like this:

    static Array<MidiDeviceInfo> getAvailableDevices()
        StringArray deviceNames, deviceIDs;
        auto deviceCaps = WrapperType::getDeviceCaps();

        for (int i = 0; i < deviceCaps.size(); ++i)
            deviceNames.add (deviceCaps[i].szPname);
            auto idendifier = getInterfaceIDForDevice((UINT)i);
            if (idendifier.isEmpty()) // driver do not support identifier query
              idendifier = deviceCaps[i].szPname; // name workaround
            deviceIDs.add (idendifier);

I’m using Visual Studio 2015 and build in x64.
My orperating system is Windows 10 Entreprise 2016 LTSB Version 1607 (Build 14393)

Hopping all of this can helps.
Best regards

Thanks for reporting!

1 Like

Hi Ed,
Many thanks for your reactivity,
All the bests.