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.