Bitwig / VST3 / prepareToPlay not called after sidechain activation

Juce 6.1.6, Windows 11, VST3, Bitwig 4.2.2

I have a plugin with an external sidechain.

in processBlock

if sidechain is off

  • input-block buffer channel count is 2 and
    and getChannelCountOfBus(true,1) returns 0 in processBlock

if sidechain is on

  • input-block buffer channel count is 4 and
    and getChannelCountOfBus(true,1) returns 2 in processBlock

so far so good, but

when I turn sidechain on (assign another output to the sidechain input in the bitwig-GUI) Bitwig doesn’t call prepareToPlay(), so I have no chance to prepare my buffers.

Shouldn’t prepareToPlay be called when the channel configuration has changed?

Could this be a bug in Bitwig or in the JUCE VST3-wrapper?

PS: just had a déjà vu

You can detect bus changes in processorLayoutsChanged.

  • Jussi
1 Like

According to the VST3 spec, buses are only supposed to be enabled/disabled while the plugin is in a deactivated state. Normally, activating the plugin triggers the prepareToPlay call, so prepareToPlay will always be called after changing the bus configuration in a well-behaved host.

The last time I checked (Bitwig 4.1.6), the host was changing the bus configuration while the plugin was already activated, which is a misuse of the VST3 API. I reported the issue to Bitwig, so they’re aware of the problem.

2 Likes

Thanks for clarification. I will probably first of all create a workaround.