# Multi-bus synth plugin: routing bus buffers in processBlock( ) when using the Synthesiser class

**URL:** <https://forum.juce.com/t/multi-bus-synth-plugin-routing-bus-buffers-in-processblock-when-using-the-synthesiser-class/24892>\
**Category:** Audio Plugins\
**Created:** [October 30, 2017, 10:23pm UTC](https://forum.juce.com/t/multi-bus-synth-plugin-routing-bus-buffers-in-processblock-when-using-the-synthesiser-class/24892 "2017-10-30T22:23:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![naslash](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@naslash](https://forum.juce.com/u/naslash)\
**Post date:** [October 30, 2017, 10:23pm UTC](https://forum.juce.com/t/multi-bus-synth-plugin-routing-bus-buffers-in-processblock-when-using-the-synthesiser-class/24892/1 "2017-10-30T22:23:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![fr810](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/fr810/32/841_2.png) [@fr810](https://forum.juce.com/u/fr810)\
**Post date:** [November 2, 2017, 9:37am UTC](https://forum.juce.com/t/multi-bus-synth-plugin-routing-bus-buffers-in-processblock-when-using-the-synthesiser-class/24892/2 "2017-11-02T09:37:05Z")

</div>

This is currently not possible without adding multiple synthesisers. Have a look at the [MultiOutSynth example code](https://github.com/WeAreROLI/JUCE/blob/fae4cf656710eec695a080670ac9c94224b0e6d0/examples/PlugInSamples/MultiOutSynth/Source/MultiOutSynth.cpp) to see how this can be achieved.

---

<div class="post-metadata">

**Author:** ![naslash](https://avatars.discourse-cdn.com/v4/letter/n/f9ae1b/32.png) [@naslash](https://forum.juce.com/u/naslash)\
**Post date:** [November 6, 2017, 4:24am UTC](https://forum.juce.com/t/multi-bus-synth-plugin-routing-bus-buffers-in-processblock-when-using-the-synthesiser-class/24892/3 "2017-11-06T04:24:45Z")

</div>

I see, brilliant! I should have looked through the JUCE examples more thoroughly.  
Thank you Fabian.
