Is there a maximum number of MIDI events that might be expected in the MidiBuffer that is passed to processBlock()?
I’d like to record the MIDI events into my own Note On/Off object list while processing (in certain cases), but can’t allocate them on the fly, so I’d like to pre-allocate a pool of buffers of my objects that the processBlock() function can copy data into (for a background thread to handle).
I suppose I could allocate buffers to the maximum buffer size set in prepareToPlay(), but that seems kind of arbitrary. Is there a reasonable maximum I could use?
Or… is there a better way to capture and remember MIDI data in JUCE (that is safe to capture within the processBlock() function)?