Standalone Application MIDI I/O Not Working


#1

What’s the correct way to reset my MidiMessageCollector in a MIDI effect plugin running standalone? I am getting an assertion here as soon as I play a note:

void MidiMessageCollector::addMessageToQueue (const MidiMessage& message)

{
#if JUCE_DEBUG
jassert (hasCalledReset); // you need to call reset() to set the correct sample rate before using this object
#endif

My effect does work as a plugin under the JUCE test host.


#2

Calling its reset method within prepareToPlay: https://docs.juce.com/master/classMidiMessageCollector.html#ab9f16c8ff3d5d1b45ec409a6fb297b51

Btw: most of the JUCE assertions will tell you what’s wrong and what you have to do in order do avoid them :wink:


#3

Thanks, it works great now. The assertions answered the rest of my questions :joy: