Studio One Input Buffer Not Matching Channel Config



I have a plugin which handles a sidechain input. In most DAWs that has been working fine, however in Studio One the plugin is crashing.

In ableton & logic while running stereo, as expected the total amount of channels on the processBlock audiobuffer is 3. The first stereo bus which is the main in/out, and a mono sidechain input buffer added using the suggested styles of Fabian’s multibus guide post.

However in Studio One with vst3 the numChannels of the audiobuffer of the processBlock is 2 on a stereo track. When the application attempts to grab and read from the second bus it seems to not exist and causes crashes when the application tries to use the data.

Has anyone else experienced this problem or have any idea what’s going on? In our setPreferredBusArrangement function all we do it cap the max number of in/out at 3. Is there something we can do to guarantee the audiobuffer runs with the desired number of channels?

It seems as though Studio One isn’t adding the sidechain input bus at all : (




Their VST3 implementation is just buggy still with respect to JUCE. I found a gross one yesterday too. There ARE plenty of VST3 plugins with sidechains that work in S1, so I bet your problem stems from the same place mine did…Go set some breakpoints and dig around in JUCE’s VST3 wrapper. JUCE still does some minor wonky stuff at places in there (and S1 clearly does some wonky stuff with VST3 in its own code) – it was one of those that caused my issue. You should be able to trace the problem to something in that wrapper clashing with S1 pretty easily.

Once you find it, send it onward to Presonus via their support. I sent my detailed findings yesterday and a dev already contacted me directly, so that’s probably the fastest way to actually get whatever fixed


Hmmm i tried this with the NoiseGate example in JUCE/examples/PluginSamples/NoiseGate and it works for me on the latest develop tip. I also tried to limit the sidechain to mono by changing the setPreferredBusArrangement from this:

    if (isVST2())
        if (isMainBus && numChannels != 2) return false;

        // we only allow mono sidechains in VST-2
        if (isSideChain && numChannels != 1)
            return false;

to this:

   // if (isVST2())
        //if (isMainBus && numChannels != 2) return false;

        // we only allow mono sidechains in VST-2
        if (isSideChain && numChannels > 1)
            return false;

That also worked fine.


Hey Fabian,

Thanks so much for pointing me to a working example which I could compare against. It’s solved the issue and is working now, quite strange though.

What I had in my code:

float* sideChainBuf = sideChainInput.getWritePointer (0);

this seemed fine because we know there is only a single channel, and was working in most hosts, however in S1 i was hitting the jassert of asking for a channel greater than the num channels.

When i switched to this like in noise gate:

for (int j = 0; j < buffer.getNumSamples(); ++j)
    for (int i = 0; i < sideChainInput.getNumChannels(); ++i)
        sidechainBuf[j] = sideChainInput.getReadPointer (i)[j];

It started acting happy in S1. Not sure because essentially seems like the same thing to me, glad it’s working though. Thanks!



I will keep an eye out : )


I think the issue is that Studio One disables the Sidechain when loading the plug-in. In JUCE, we indicate a disabled bus by setting the channel count to zero on that bus and therefore sideChainInput.getWritePointer (0); will assert in that situation.