BusesLayout in Plugin host

I’m building a plugin that can host other plugins. The hosted plugin can change at runtime, so my plugin host needs to adapt to whatever bus layout the loaded plugin requires.

As far as I understand, JUCE does not allow adding or removing buses after the AudioProcessor has been constructed (just like parameters). This means that if my host plugin only declares a single stereo input bus and a single stereo output bus, it won’t be compatible with third-party plugins that use different layouts (sidechain, surround, etc.).

So my question is, how should a plugin host set up its BusesProperties so it can support the widest range of third-party plugin bus layouts?

Is the recommended approach to pre-declare many input/output buses (and possibly high channel counts) in the constructor, and then only enable or use the ones that match the currently loaded plugin’s layout? Or would there be a better way of doing this?

I’ve looked at the JUCE AudioPluginHost, but it doesn’t seem to have the same restriction about not being able to dynamically add/remove buses, probably because it’s a standalone application rather than a plugin. So I’m not sure its approach is directly comparable to what a “plugin-based” host is allowed to do.

It seems that MetaPlugin uses this way. It shows as 10ch->8ch in Reaper.

1 Like