We are currently working hard at revising the multibus API and a sneak peek can be found under the experimental/multibus
branch.
This branch is unstable and for testing only, most notably the branch does not currently support RTAS, AAX or AU v3 (in fact compiling these will fail).
This branch now also supports hosting multibus plug-ins. For a quick overview I’ve recorded two tutorial videos:
It would be great if anybody interested in multibus plug-ins could watch the above video and comment on the new API.
This new API does introduce breaking changes for any JUCE plug-in using multibus. However, any plug-in not using multibus (in particular any plugin built before JUCE 4.1) will work without any modifications.
The new API has been greatly simplified to the previous multibus API. In essence, only an additional callback (isBusLayoutSupported
) and a new base class constructor are necessary to create a multi-bus plug-in. For example, the NoiseGate plug-in has the following relevant additions to support multi-bus:
class NoiseGate : public AudioProcessor
{
public:
//==============================================================================
//==============================================================================
NoiseGate()
: AudioProcessor (AudioIOProperties().withInput ("Input", AudioChannelSet::stereo())
.withOutput ("Output", AudioChannelSet::stereo())
.withInput ("Sidechain", AudioChannelSet::mono()))
{
addParameter (threshold = new AudioParameterFloat ("threshold", "Threshold", 0.0f, 1.0f, 0.5f));
addParameter (alpha = new AudioParameterFloat ("alpha", "Alpha", 0.0f, 1.0f, 0.8f));
}
.
.
.
//==============================================================================
bool isBusLayoutSupported (const AudioBusLayouts& layouts) const override
{
// the sidechain can take any layout, the main bus needs to be the same on the input and output
return (layouts.getMainInputChannelSet() == layouts.getMainOutputChannelSet() &&
(! layouts.getMainInputChannelSet().isDisabled()));
}
There are many more callbacks which you can override for more fine-grain control, however, for most plug-ins only the above callback is necessary. Have a look at AudioProcessor.h for documentation on these new callbacks.
Please let me know your thoughts on the new API.