I’m currently working on a synth plugin that requires multiple (at least 10) outputs. So far I’m unable to figure out a good way to route the buses in processBlock( ) while using the Synthesiser class. I’ve done it before while using AudioSource by having a separate AudioSource for each output buffer and it worked out great.
So for AudioSource, in processBlock( ) I had:
AudioBuffer<float> outputBus1 = getBusBuffer(buffer, false, 0); //here I have an AudioBuffer for each bus buffer, as seen on Fabian's helpful multi-bus API presentation on youtube
AudioBuffer<float> outputBus2 = getBusBuffer(buffer, false, 1);
...
source1->getNextAudioBlock(AudioSourceChannelInfo(outputBus1)); //an AudioSource for each output buffer
source2->getNextAudioBlock(AudioSourceChannelInfo(outputBus2));
...
However, it’s not as straight forward with Synthesiser since it is a single object that holds all of the sounds which will be separated into different output buffers depending on the user’s selection. With AudioSource I would just pass the audio from the main source to a specific AudioSource based on the user’s bus selection. Should I use a separate Synthesiser for each output buffer? If so, is there no better way? Is there something that I’m missing?