[quote=“Pukeweed”]Could someone give an example of how to use the midibuffer in JAP. Like say, how one would loop though it and filter out everything except note on and off messages… or whatever really.
[/quote]
the following works for me - just loops through looking for note on/offs- ignoring the time-stamps:
[code]//midiMessages is passed into processBlock
MidiBuffer::Iterator midi_buffer_iterator(midiMessages);
MidiMessage midi_message(0);
int sample_number;
while(midi_buffer_iterator.getNextEvent(midi_message,sample_number))
{
if( midi_message.isNoteOff())
{
//note on at sample_number samples after
//the begining of the current buffer
}
else if( midi_message.isNoteOff())
{
}
}[/code]
i believe the same buffer is used for in and out - ie. if you don’t clear it the events will be passed on to the next plugin. It doesn’t really make sense to set a time stamp greater than the buffer size - i’m sure, you could do it, but depending how the follwoing plugins process midi events, they may either ignore it or do something bad (or work just fine ). probably not a good thing to do though 
Hope that helps.