Hello,
sorry if I ask for something which probably was already answered. I found planty of threads on that forum which concern toisBusesLayoutSupported() method. But I don’t even know where should I start. But to the point.
how to provide in Logic Pro X three busses configurations:
- mono->mono
- stereo->stereo
- mono->stereo
Plus I need to have side chain input mono or stereo.
So my processor constructor looks as follows:
MyProcessor:: MyProcessor()
: AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo(), true)
.withOutput ("Output", AudioChannelSet::stereo(), true)
.withInput ("Sidechain", AudioChannelSet::stereo(), false))
{
}
But I encounter serious problems with configuration inside AudioProcessor::isBusesLayoutSupported().
I tried various implementation of isBusesLayoutSupported().
One of them is:
bool MyProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
if (layouts.getMainOutputChannelSet() != AudioChannelSet::mono()
&& layouts.getMainOutputChannelSet() != AudioChannelSet::stereo())
return false;
if (layouts.getMainOutputChannelSet() < layouts.getMainInputChannelSet())
return false;
return true;
}
And for such configuration I encounter issues as follows:
- In Logic Pro X there are still only two options to choose: mono->mono or stereo->stereo. But there is not option mono->stereo
- second issue is much more strange. Juce AudioPluginHost allows me to choose stereo input and mono output. But not mono input and stereo output which I expect.
So I tried to change second if statement to:
if (layouts.getMainInputChannelSet() < layouts.getMainOutputChannelSet())
return false;
Now the issues are:
- Juce AudioPluginHost works as I expect. So I can chose mono/mono, stereo/stereo and mono->stereo. That’s great but
ifstatement looks stupid in my opinion. - In Logic Pro X such configuration doesn’t even pass validation.
I also tried another configuration:
bool MyProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{
const int numInput = layouts.getMainInputChannelSet().size();
const int numOutput = layouts.getMainOutputChannelSet().size();
if(numOutput < numInput)
return false;
if((numInput != 1 && numInput != 2) || (numOutput != 1 && numOutput != 2))
return false;
return true;
}
In such configuration Juce AudioPluginHost works as I expect. And it can also be validated in Logic Pro X. But in Logic Pro there is still no option to choose mono->stereo version of plugin.
What I do wrong? Where is problem in my code?
For any help great thanks in advance.
Best Regards
