We have a plugin host that hosts VST instruments using the
AudioProcessorGraph. Everything works fine for stereo instrument plugins but we are having issues instrument plugins that support other bus/channel layouts, specifically HALion 7:
When we host HALion 7, all 32 channels show up in the HALion mixer and we don’t get any sound from the output.
When hosted in Ableton Live, the mixer in HALion 7 only shows a stereo master channel and everything works fine.
We only support a stereo bus so we want HALion 7 to behave like it does when hosted in Ableton.
I understand that the host calls
isBusesLayoutSupported() to determine the supported configurations, but how do I make
AudioProcessorGraph tell the plugin to only use a single stereo bus (although other configurations are supported)?
We fixed the issue with missing sound on the output which turned out to be unrelated. We still want to tell plugins only to use a single stereo bus though.
There is setPlayConfigDetails(), if you don’t care about additional buses.
Otherwise you need to set the buses using setBusesLayout() and call setRateAndBufferSizeDetails() afterwards.
All this followed by prepareToPlay ofc.
Hope that helps
Thanks for chiming in, Daniel.
I tried calling
setPlayConfigDetails in my
prepareToPlay method as follows:
void CatalystProcessor::prepareToPlay(double sampleRate, int samplesPerBlock)
graphProcessor->setPlayConfigDetails(0, 2, sampleRate, samplesPerBlock);
Which didn’t make a difference. I also tried calling
setPlayConfigDetails on the
graphProcessor before adding the plugin node, and on the
AudioPluginInstance itself. No difference.
However, if I omit the call to
graphProcessor instance in the code above, the
setPlayConfiguration actually does the job and only the main channel shows up in the HALion mixer. I don’t get any sound though and I obviously don’t want to omit the
Somehow, it seems that the
prepareToPlay call overrides the changes made with
graphProcessor? If it’s the
AudioProcessorGraph that’s probably not what you want. If you want inner nodes of the graph to have specific bus layouts, you need to explicitly set those layouts on the inner nodes.
Thanks for the tip but I’m still not able to reproduce the beviour HALion 7 has in Ableton Live.
When I instantiate HALion 7 in my host it creates 1 stereo input bus and 33 output buses with 0 channels each. I have tried checking different layouts but it seems that the default layout is the only one that is supported.
Does that even make sense?
Have you tried running HALion in the AudioPluginHost? If you right-click on the plug-in after loading, you can find an option to “Configure Audio I/O”. There, you should be able to enable and disable buses, and change the number of channels on each bus.
If HALion doesn’t produce any sound after configuring the desired bus layouts in this way, then it’s possible there’s a bug in JUCE somewhere. However, if it does work, then that would indicate that the problem is somewhere in your code. You can inspect the source of the AudioPluginHost to see how it handles bus configurations of hosted plug-ins.
Thanks, very helpful. As I found out previously, it is not possible to change the busses layout on HALion but it looks like disabling the additional busses in the PluginAudioHost GUI gets me what I want