Handy class to help keep audio buffer in sync with incoming MIDI events. To use it, create a local variable (on the stack) and call nextEvent() until it returns false. 
{
    float* const outL = amsh.outputs[0];
    float* const outR = amsh.outputs[1];
 
    for (uint32_t i=0; i<amsh.midiEventCount; ++i)
    {
        
    }
 
    renderSynth(outL, outR, amsh.frames);
}
Definition: DistrhoPluginUtils.hpp:104
 
bool nextEvent()
Definition: DistrhoPluginUtils.hpp:131
 
float * outputs[2]
Definition: DistrhoPluginUtils.hpp:106
 
Definition: DistrhoDetails.hpp:891
 
 Some important notes when using this class:
- MidiEvent::frame retains its original value, but it is useless, do not use it.
 
- The class variable names are the same as the default ones in the run function. Keep that in mind and try to avoid typos. :)