How to schedule many Events on the fly ?
I am just trying to figure out the best strategy for a sequencer, that is creating events on the fly.
I learned, that I have to add an audiochannel in the main thread, so I cannot create new channels from inside the callback function of AEBlockScheduler, right?
What, if I want to add many audiochannels (say thousands), that have to be played in a sequence? I know, I can schedule them just in time a second before the event should happen from a timer on the main thread.
But if the mainthread is blocked, no events would be created.
Or is this the wrong approach? Should I try to reuse existing audiochannels? But also then, I have to create them somewhere, because I do not know in advance, how many channels on what group will be needed.
I learned, that I can use the channelIsPlaying property to except a channel from being processed. Is it expensive, if I had thousands of channels?