Stereo sidechain source on mono track

Hello,

  1. at first is there any way to determine if user route any source to Sidechain or it’s just empty?
    I thought Bus::isEnabled() does the job, but it doesn’t.

  2. And what is more important for me, when I put mu plugin on mono track and route to Sidechain stereo track it always use only one (first (left)) channel. Can I change it? Can I use both of channels? I’ve found out that even Logic built in Compressor works like that, so I have no hope. But maybe anyone could help?

Best regards

I found that when I use that:

float *channelData = buffer.getWritePointer (channel);
channelData[i] = getBusBuffer(buffer, **true** , 1).getSample(channel, i);

and my sidechain bus is set to “none” (in logic pro x) the plugin plays main bus buffer signal. But when I route some track to sidechain it immediatelly plays that routed track.
So it looks like in some way the processBlock() knows if there is or not any input in sidechain. But how? Is there any flag that I can use to determine if there is signal in sidechain or not?

It’s kind of up to the DAW in my experience… like your latest post mentions, Logic Pro just routes the main signal through even if the sidechain is “None”

In other hosts the bus may actually be empty if nothing is routed, but unfortunately I don’t think there’s a “standard behaviour” in this situation

We basically added a button so the user has to enable “Use Sidechain” in our plugins before we make use of the sidechain bus at all

Great thanks for your answer.
Yes I also think the “use sidechain” button is the best solution in that case.

But still have no idea what about number of channels? How to use stereo track as an input to sidechain in plugin that is on mono track?

1 Like

Unfortunately this may also be up to the DAW, if I recall correctly :sweat_smile:

You might try experimenting with the default channel configuration you created the sidechain with, and run the plugin in different hosts and print out the getNumChannels() for the sidechain bus when it’s connected