Cabbage Logo
Back to Cabbage Site

Side-chaining

@Gerbo and I have been working together for some time on support for side-chaining in the most popular VST and AU hosts. We had to halt our efforts due to other commitments a few months back so I’m started this thread to get the ball rolling. @gerbo can you remind me of the current state of things with the latest dev build? That would be great :wink:

With pleasure @rorywalsh :wink:
These are the conclusions that I have drawn, reviewing and contrasting the tests that we did previously, with those that I have carried out in recent days, starting from version 2.4.5 of Cabbage.
A work of many months, which is already paying off … :+1:

SIDECHAIN TEST v2.4.5 02 October 2020

ARCHIVE : Sidecomp_TEST_01.csd (3.0 KB)

Audio Units:
Logic = mono, mono-stereo, stereo (OK)
Live = (OK)
Reaper = NO AUDIO

VST2:
Liive = (OK)
Reaper = (OK)
Cubase = No sidechain option

VST3
Live = No audio when inserting the plugin, which by default appears as “No Input”
When side channel is assigned, audio appears, doing the correct side channel compression functions. Returning to “No Input” stops audio again.
Reaper = (OK)
Cubase STEREO = Audio when inserting the plugin.
When side channel is assigned it does the correct side channel compression functions, but turning off the sidechain option stops audio. Audio returns by activating the sidechain button.
Cubase MONO = (OK)

Thanks Gerbo. I don’t think we can ever support side-chaining with VST2 on Cubase? But that’s a good list of other hosts to get started with :wink:

I was just curious. :thinking:

Modification of the output code, to make signal compatible (Mono-> Stereo) in Audio Units (Logic), (without active Sidechain). Compatible with Reaper.

if nchnls_i == 1 then 

outs aC_L, aC_L

    elseif nchnls_i == 2 then

outs aC_L, aC_R

    elseif nchnls_i == 4 then

outs aC_L, aC_R

else

outs aC_L, aC_R

endif

I"m getting strange output in the Cabbage output window. On Reaper it’s reported 4 out channels and 8 inputs channels? @Gerbo, are you seeing this too?

This code is for when sidechain is not used in Audio Units.
It is for mono, mono-> stereo and stereo to work, in Logic, when the sidechain (2) code is removed. Reaper also works well, in 2 and 4 outputs.
Live accepts it too.
We are only talking about Audio Units, in VST it is not necessary.
The fact of disabling sidechain (2), is so that it does not show the window in logic and the selector in Live.

Sorry, I wasn’t clear earlier. When I test the .csd you posted, and load it into Reaper as an AU, Csound is telling me that I have 4 outputs and 8 inputs. That surely can’t be correct? The channel count should be 4 in, 2 out. I’m not sure what’s going on.

That is the problem that appears in Reaper, with sidechain (2) active.
However, both Logic and Live work correctly:
instr 1: nchnls = 2,000
instr 1: nchnls_i = 4,000
In Reaper:
instr 1: nchnls = 4,000
instr 1: nchnls_i = 8,000

I’m starting to think the issues is with AudioUnits in general, with Reaper. I just tested a non side-chain AU in Reaper and it didn’t work. Good to know. I’ll start by trying to fix that :+1:

That’s right, because with VST its operation is correct.
That’s why I managed with that exit code, to make both Logic, Live and Reaper work without sidechain.
Without sidechain, Logic still has the Mono-> Stereo incompatibility problem.
This code also fixes that problem with Logic, when we don’t have an active sidechain.

if nchnls_i == 1 then 

outs aC_L, aC_L

elseif nchnls_i == 2 then

outs aC_L, aC_R

elseif nchnls_i == 4 then

outs aC_L, aC_R

else
outs aC_L, aC_R

endif

I’ve added this to the code. Here is the current .csd file I’m working with.
(removed - see updated file below)
I pushed through a fix for the Reaper channel issue. And it seems to be loading the right configuration for the side chaining now, but for some reason the compress instrument doesn’t work. But it’s definitely getting the side chain signal. Can you test it when you get a chance. It should be cooked and ready to test in a few moment. You can access it here:
https://dev.azure.com/rorywalsh/cabbage/_build/results?buildId=840&view=results
Alternatively you can just build from the dev branch.

In Live it works fine
In Logic, stereo correct, not mono, not mono-stereo
In Reaper, no signal comes

I get a signal in reaper. I can access the side chain channels without any problem. Did you try my csd file, there is a bypass button that will cause the plugin to output only the sidechain channels. It’s not in a very good position but you can find it on top of the output widget.

I can’t see the disconnect button anywhere. Are you sure it’s that .csd

Sorry, that’s clearly not the correct .csd file :see_no_evil: This is the right one.

CabbagePlugin.csd (3.3 KB)

Do I have to build the new branch from a few minutes ago or does 2.4.9 from yesterday work?

Yesterday’s will be fine. The one from a few moments ago doesn’t contain any relevant changes.

I had a test error, the mouse crashed and clicks where it shouldn’t :upside_down_face: but now it works for me in Reaper, Logic and Live :+1:

Actually, I have it working here now. But I didn’t change any of the source code. I just didn’t have Reaper set up to deal with the sidechain channels properly. Here’s my IO config stuff…

I have the compressor on the second track: