Where is my sidechain chooser?


#1

Hello,
I try to add sidechain chooser in Logic (drop down menu), but can’t figure it out how to do that. I tried to study JUCE/examples/PlugInSamples/NoiseGate
where sidechain chooser works great.
So I added additional input in the constructor of my AudioProcessor class, and additional input works well, but there is no sidechain dropdown in logic.
Could anyone help?
In NoiseGate example the AudioProcessor constructor looks like that:

NoiseGate()
    : AudioProcessor (BusesProperties().withInput  ("Input",     AudioChannelSet::stereo())
                                         .withOutput ("Output",    AudioChannelSet::stereo())
                                         .withInput  ("Sidechain", AudioChannelSet::stereo()))
{
    addParameter (threshold = new AudioParameterFloat ("threshold", "Threshold", 0.0f, 1.0f, 0.5f));
    addParameter (alpha  = new AudioParameterFloat ("alpha",  "Alpha",   0.0f, 1.0f, 0.8f));
}

My AudioProcessor looks like that:

WojtekFilterTestAudioProcessor::WojtekFilterTestAudioProcessor()
#ifndef JucePlugin_PreferredChannelConfigurations
     : AudioProcessor (BusesProperties()
                     #if ! JucePlugin_IsMidiEffect
                      #if ! JucePlugin_IsSynth
                       .withInput  ("Input",  AudioChannelSet::stereo(), true)
                      #endif
                       .withOutput ("Output", AudioChannelSet::stereo(), true)
                       .withInput  ("Sidechain", AudioChannelSet::stereo(), true)
                     #endif
                       )
#endif
{    
}

Is it all about that line?

#ifndef JucePlugin_PreferredChannelConfigurations
Or the dropdown sidechain is declared somewhere else? I can’t find where.


#2

This line is set in the projucer:

Make sure you leave that empty, otherwise everything you write between the ifndef and endif is ignored.

TBH, usually I remove that #ifndef JucePlugin_PreferredChannelConfigurations and it’s #endif completely from my code, it just clutters it and makes it hard to read. It is only useful for trivial cases or for backwards compatibility.

HTH


#3

Daniel thanks for reply,
but actually i have in Projucer in Project Settings “Plugin channel Conf.” empty, as you advice. To be more precise, it is empty by default, when you create in Projuce new Audio Plug-in. And I’ve never changed it.

I also tried to remove

#ifndef JucePlugin_PreferredChannelConfigurations

and it’s

#endif

but in Logic Pro X there is still no sidechain dropdown menu.
So the problem should be somewhere else. Don’t you think?


#4

I just tried adding a side chain to an old compressor I wrote a while back, and it worked out of the box.

The difference I see between your version and the NoiseGate example (and mine) is that you set the side chain as activated by default (the true in withInput). I assume that logic doesn’t offer buses that are already activated as side chain.

Please try using .withInput ("Sidechain", AudioChannelSet::stereo())

Good luck!


#5

Hello Daniel,
thanks for your support. Actually I even haven’t seen that difference with activation state.

But unfortunately it didn’t help. I even try to remove activation state true from all buses, like that:

WojtekFilterTestAudioProcessor::WojtekFilterTestAudioProcessor()
: AudioProcessor (BusesProperties()
.withInput (“Input”, AudioChannelSet::stereo())
.withOutput (“Output”, AudioChannelSet::stereo())
.withInput (“Sidechain”, AudioChannelSet::stereo())
)

But it also didn’t help. So I am still looking for the solution.


#6

I’ve just also tried to set all buses to false:

WojtekFilterTestAudioProcessor::WojtekFilterTestAudioProcessor()
: AudioProcessor (BusesProperties()
.withInput (“Input”, AudioChannelSet::stereo(), false)
.withOutput (“Output”, AudioChannelSet::stereo(), false)
.withInput (“Sidechain”, AudioChannelSet::stereo(), false)
)

But it also didn’t help.


#7

Very strange… do you have anything special in your isBusesLayoutSupported()?


#8

No, but I am not sure. When you create new Audio Plug-in project in Projucer, there is some code with some

#ifndef

But due to your first advice I removed all of that. And now I have code exactly just copied from Noise Gate example, so it looks like that:

bool WojtekFilterTestAudioProcessor::isBusesLayoutSupported (const BusesLayout& layouts) const
{

return (layouts.getMainInputChannelSet() == layouts.getMainOutputChannelSet() &&
        (! layouts.getMainInputChannelSet().isDisabled())
        );

}


#9

In Noise Gate example there is also such comment above return:

// 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())
);

Maybe it would explain something, but I am not sure what


#10

Did you try to reset & rescan the plug-in?
validation can keep old plug-in I/O configurations even if you re-compile…


#11

If what @ttg offered doesn’t help, try to see if renaming your plugin and changing its identifiers help. Logic has caches which tend to cause mysterious problems like this.


#12

Ha ha ha. Guys!!! Whole day, and finally it works.
Great great thanks.
Actually just rescan the plug-ins didn’t work. But due to yairadix advice I just created whole new project in Projucer, with new name, and just copied whole project.
OK I know you didn’t say to create new project but instead just change the name.
But I am not sure how it all works. I remember when I tried to change just company name in projucer, I made a lot of changes, but in Logic, and other apps it was always under old company folder. So I gave up, and created just new project. The same I decided to do now. And it helped.
But there should be some Logic Pro cache file, which I could just remove or do something fancy to reset all things like that. Don’t you think? Maybe anybody know location of that file? And how to treat that? Best regards.