Sure, you could create a static function which returns a BusesProperties instance, and then adjust the returned value based on the host.
// In your constructor
: AudioProcessor (getBusesProperties()),
...
// This is the function which returns the properties
static BusesProperties getBusesProperties()
{
static const PluginHostType hostType;
if (hostType.isLogic())
return BusesProperties().withInput (...).withOutput (...);
return BusesProperties().withOutput (...);
}
This wonāt work on M1 Macs, as the hosting is done by a new process that seems to be shared between MainStage, Garageband & Logic. The current host detection will NOT detect Logic on an M1.
It indeed seems to work when setting up all busses with same number of channels on each bus, there however seems to be issues with setting up a mix of stereo and mono output busses. We want logic to report 4xStereo, 10xMono. But, setting it up like below results in logic reporting 14xStereo and also not being able to actually load the plugin. It passes in auval though.
Any hints on how to create this mixed mono and stereo multi out channel setup?
The only thing that seems to fix the issue for us is to comment out the SupportedNumChannels() call in the au wrapper.
We are also trying to do this, with no success. The crazy thing is that the same AU in Ableton Live works exactly as expected.
If anyone figures this out weād be keen to know, but after wrestling with it for quite some time Iām thinking it must be a limitation imposed by the JUCE API.
Yes, both Addictive Drums and BFD show mixed mono/stereo with arbitrary bus counts for each.
Iāve been able to acheive 4xStereo, 4xMono if I declare (say) 8 buses with 2xStereo and 6xMono in my constructor. I had to be very permissive to acheive this in isBusesLayoutSupported(), i.e. allow any combination of mono/stereo buses. When I do that it also shows up with 8xStereo and 8xMono options, which I also donāt necessarily really want to expose.
I was hoping to expose just 2xStereo and 6xMono as I declared in the constructor, but if I donāt use that āpermissiveā isBusesLayoutSupported() then the plugin either fails validation or just offers 8xStereo (depending on precisely how I constrain things in isBusesLayoutSupported()).
I set up my VI projects to only use 16 stereo outputs for Logic. AD is a JUCE plugin, while BFD is not. AD2 shows 4 stereo and 10 mono outputs and does indeed work. Perhaps itās the order of the BusesProperties??
Interesting, I didnāt know Addictive Drums is a JUCE plugin. So it seems it is possible, unless theyāve patched the Audio Unit wrapper in their copy of JUCE. Not sure how to acheive it though, Iāve tried a bunch of things with no success.