I just want to read the Midi data from my Midi input Device, and I tried this code (snippet):
std::unique_ptr<juce::MidiInput> device = juce::MidiInput::openDevice(juce::MidiInput::getAvailableDevices()[0].identifier, this);
if (device == nullptr) {
OutputDebugString("NULL");
}
else {
OutputDebugString(device.get()->getDeviceInfo().name.getCharPointer());
}
I check if it’s null and it is not null.
But even if I call the start() function the handleIncomingMidiMessage will not be called.
What am I missing ? I also looked up the MidiDemo, but it didn’t really helped.
This project is a plugin and not standalone.
I also tried the AudioDeviceManager Class and it worked, but I just want to understand why this isn’t working with the start() function.