[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.
the following works for me - just loops through looking for note on/offs- ignoring the time-stamps:
[code]//midiMessages is passed into processBlock
//note on at sample_number samples after
//the begining of the current buffer
else if( midi_message.isNoteOff())
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.