Standalone Application MIDI I/O Not Working

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)

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

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

Calling its reset method within prepareToPlay:

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

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