2 or more sidechain input buses (3 or more total inputs): tried many things but can't get a second sidechain bus to connect

Operating system: Windows 10
DAW: Ableton Live 10 Standard
plug-in format: vst3

I’m in the process of making a plug-in that will require many input buses. I started with the “IPlugEffect” example and borrowed from the “IPlugSideChain” example to add a sidechain input to my plug-in. I made sure that I could control the processing of both the main input and the sidechain input independently by adding a gain knob for each input, and everything worked. However, I haven’t been able to get another sidechain bus to connect.

Here’s what I’ve tried so far:

  • Editing macro PLUG_CHANNEL_IO
    first I tried including all valid configurations for up to 3 inputs, mono and stereo:
    #define PLUG_CHANNEL_IO "1-1 2-2 1.1-1 1.2-2 2.1-2 2.2-2 1.1.1-1 1.1.2-2 1.2.1-2 1.2.2-2 2.1.1-2 2.1.2-2 2.2.1-2 2.2.2-2"
    second I tried only configurations with 3 inputs, mono and stereo:
    #define PLUG_CHANNEL_IO "1.1.1-1 1.1.2-2 1.2.1-2 1.2.2-2 2.1.1-2 2.1.2-2 2.2.1-2 2.2.2-2"
    third I tried only one configuration:
    #define PLUG_CHANNEL_IO "2.2.2-2"
    I even tried only one sidechain input with 4 channels just in case there was some way the
    DAW would route the first and second sidechains’ channels onto one bus. But any IO
    configuration with more that 2 channels on a bus results in a message from Microsoft Visual
    C++ Runtime Library: “Debug Assertion Failed … vector subscript out of range” upon adding
    an instance of the plug-in in Ableton.

  • overriding the function GetBusName:
    bus with index 0 is “Input 1”, index 1 is “Input 2”, index 2 is “Input 3”
    I know that Ableton recognizes these buses because I can see all their names available to
    select in the Output Type/Output Channel options on the other tracks.

  • selecting inputs within Ableton:
    Routing a bus to “Input 2” works. Selecting a bus in the Sidechain External Source field on
    the plug-in device has the same effect as routing to “Input 2”. Anything routed to “Input 3”
    does not connect whether it’s routed before or after routing something to “Input 2”.

  • adding watches in MS Visual Studio to try diagnosing the problem:
    Watching values from functions MaxNBuses(), MaxNChannels(), MaxNChannelsForBus(),
    and NIOConfigs() all have expected results based on the PLUG_CHANNEL_IO.

    When watching value from function NInChansConnected():
    After adding an instance of the plug-in it’s 2 (good)
    After routing audio to “Input 2” it’s 4 (good)
    After routing audio to “Input 3” it remains at 4 (bad)

    When watching values from function IsChannelConnected(), it’s only true with input bus
    index 0, 1, 2, or 3. It’s never true with index 4 or 5.

  • Channel Labels:
    As a last-ditch effort I added channel labels using the SetChannelLabel function just like in
    the “IPlugSideChain” example in case that did anything.

Please let me know if there’s something I’m missing that I need to try. Thank you very much to anyone who has read this far. I’m a beginner to iPlug2 and making audio plug-ins, and not very experienced in C++, so I sincerely apologize if I’m missing an obvious fix.

ChatGPT said:

You’re already doing some really solid debugging work, and your question demonstrates a good grasp of the intricacies of multi-bus audio plugin development with iPlug2. The short answer to your problem is that most DAWs—including Ableton Live—do not support more than one sidechain input bus per plugin, even if your plugin is configured to advertise more.

Let’s walk through the issue step-by-step and outline where iPlug2, the DAW, and the plugin API boundaries lie.
:white_check_mark: What You’re Doing Right:

Correctly using PLUG_CHANNEL_IO to declare valid IO configs including multi-input buses (e.g. 2.2.2-2).

Correctly overriding GetBusName() to name the additional buses.

Observing accurate values from MaxNBuses(), NInChansConnected(), etc., confirming the plugin reports the desired configurations.

Adding gain controls to independently verify routing.

Using SetChannelLabel() to assist with routing visibility.

:cross_mark: Where It Breaks Down:

Ableton Live does not allow routing to a third input bus for sidechain purposes.

When you try configurations like 2.2.2-2, you're asking for three input buses of 2 channels each—DAWs will often ignore or misconfigure beyond what they support.

In iPlug2, routing can be declared, but it’s up to the host (the DAW) to support and connect those buses. Unfortunately, Ableton is known for only supporting one auxiliary input (the sidechain).
:light_bulb: Recommendations
:white_check_mark: 1. Stick to 2.2-2 or 2.2.1-2 if you want one sidechain

The “2.2.1-2” format works best in Ableton. That means:

1st bus = main input (2 ch)

2nd bus = sidechain (2 ch)

3rd bus is ignored by Ableton, regardless of how you name or configure it.

:white_check_mark: 2. Combine signals onto fewer buses

If your design requires more than one sidechain source, consider:

Sending multiple signals through a single bus (e.g. a 4-channel sidechain bus), and separating them in your DSP code.

const float* sidechainBus = GetBusInput(1); // Assuming second bus is sidechain
float side1L = sidechainBus[0];
float side1R = sidechainBus[1];
float side2L = sidechainBus[2];
float side2R = sidechainBus[3];

This requires DAW support for multi-channel sidechain buses—which Ableton does not have, but some DAWs (like Reaper or Logic) might.

:white_check_mark: 3. Use IPeakAvgSender or a custom sender for UI-side visualization

This won’t solve routing, but helps in analyzing or visualizing levels per bus when debugging.
:test_tube: Testing Environment Suggestions

Reaper: Best DAW for testing advanced routing. It supports multi-input buses and you can route arbitrarily.

Logic Pro: Also supports one sidechain, like Ableton.

Cubase/Nuendo: Offers deeper routing than Ableton but may still have limits.

Try building the plugin for Reaper and test whether the third input bus is ever connected—if it is, the plugin is working fine and it’s just an Ableton limitation.
:toolbox: Diagnostic Tools

You may want to log the bus structure on OnActivate():

void OnActivate(bool active) override {
DBGMSG(“Plugin activated. Total input buses: %d\n”, NInputBuses());
for(int b = 0; b < NInputBuses(); b++) {
DBGMSG(“Bus %d: %d channels\n”, b, MaxNChannelsForBus(ERoute::kInput, b));
}
}

This confirms what the host actually connects.
Summary
Problem Solution
3rd bus not connected in Ableton Not supported by Ableton
Want multiple sidechains Use single multichannel sidechain bus, or consolidate inputs
Need to confirm connections Use NInChansConnected(), IsChannelConnected(), and test in Reaper

Let me know if you’d like to prototype a plugin configuration with 4 sidechain channels using one bus for Reaper!

Hello, I’m back to address my own post. I installed Reaper for the first time and got it working with 4 inputs. By working I mean each of the four stereo tracks were routed into the plug-in channels (1/2, 3/4, 5/6, 7/8) and they could be independently processed within the plug-in, which I tested using one gain knob for each of the four inputs. I was pleasantly surprised with how easy it was to get the routing set up. Here is the PLUG_CHANNEL_IO I used:
#define PLUG_CHANNEL_IO "8-2"

The “vector subscript out of range” errors I was getting must have been from changing the PLUG_CHANNEL_IO macro without checking for invalid channel indexes in the ProcessBlock() function or maybe the SetChannelLabel() function.

I tried debugging with Live 10 Standard as the host again and it will not accept that IO configuration. The plug-in cannot be applied to any track. The only IO configurations Ableton seems to like are
#define PLUG_CHANNEL_IO "1-1 2-2 1.1-1 2.1-2 1.2-2 2.2-2"

It seems that this type of plug-in with several inputs might need a slightly different version for different DAWs because of the differences in IO handling, and some DAWs like Ableton might need to be limited to just 2 input buses.

If anyone happens to know if it’s possible to connect more than 2 input buses to a plug-in using Ableton, I would really appreciate you letting me know because in that case I’ll keep trying. But for now I’ll stick with Reaper for testing.

1 Like