What’s this MidiInput’s identifier? Why can’t find it in Midiinput class reference?

https://docs.juce.com/master/classMidiInput.html#details
Also its indexOf()?
https://docs.juce.com/master/tutorial_handling_midi_events.html [ MIDI input list section]

        for (auto input : midiInputs)
    {
        if (deviceManager.isMidiInputDeviceEnabled (input.identifier))
        {
            setMidiInput (midiInputs.indexOf (input));
            break;
        }
    }

It’s probably from this static function call, which returns an array.

auto midiInputs = MidiInput::getAvailableDevices();

https://docs.juce.com/master/classMidiInput.html#a99defa9b9f1296977289681c3ab2ea5c

See no variable named idenifier

see https://docs.juce.com/master/structMidiDeviceInfo.html which is what MidiInput::getAvailableDevices() returns an array of. There’s your identifier member variable.

1 Like

thanks