What JUCE class would be best to use to give myself a loop or callback that continuously processes some data?
Overview of my Goal
I have an external controller that will input raw data (not MIDI) into my application via a 3rd party API. I want my application to take this raw data and turn it into MIDI Messages to send to a MidiOuptut
that can be accessed by my DAW.
In my MainComponent I need some kind of callback that will continuously pull in the raw data from the controller, convert it, and send it to a MidiOutput
.
Potential Solutions
I see that Timer
works on the Message Thread and could potentially be blocked, so I don’t think I should use that.
I also see HighResolutionTimer
, which seems promising since it’s running its own threads to achieve the callback. I’d just implement the callback to process my data.
My other option could be the Thread
class. And I guess I would just set it to be a high priority thread and then implement the run()
function to process my data.
Would the HighResolutionTimer
or Thread
classes be what I am looking for? Or is there a different class better suited to this?
Thanks!
Also, Merry Christmas!