I’m working on an application built on JUCE making heavy use of MIDI and threads.
Part of what I am trying to accomplish is to aggregate in coming MIDI messages from multiple inputs and send them to a single output. Additionally, distributing a single MIDI input to multiple MIDI outputs. It could be thought of as a MIDI input/output mixer with analysis of all of the MIDI data.
My questions are...
Given multiple MIDI inputs, is the incoming MIDI data guaranteed to be handled on the same thread?
Can I call MidiOutput::sendMessageNow from multiple threads?
On a similar line of thought, I see that MidiMessage can allocate memory. I’m a little surprised to see this happening on the main MIDI input thread as it could cause issues. Does anyone have insight to why this does NOT cause any performance problems?
Thanks so much for any insight.