AAX 1-2 (mono in/stereo out) only Bypasses on one side - created a hack that works

I’m having a problem with the Pro Tools plugin bypass (“hard bypass”) on a 1-2 (mono in/stereo out) plugin. When PT plugin bypass is engaged there is only sound on one side - the other side has no sound. The mono input should be bypassed/copied to BOTH (L&R) outputs.

It does this on both Windows and Mac.

It seems to be an issue with IPlugProcessor::PassThroughBuffers. It’s acknowledging two outputs (n=2) but I think it’s assuming 2 channel input - so with a mono input one side is blank.

Anyone else come across this? How to fix?

After studying this for awhile it appears iPlug code is designed for channel pairs. In the mono in/mono out case having a blank channel (data array) on one side has no effect since we’re only using 1 output. But in the 1-2 config case it seems we need to make a “hack” to bypass properly and here’s what I did:

I created a simple function to copy input channel[0] data to input channel[1] when the plugin is hard-Bypassed in 1-2 config.

  1. In IPlugAAX.cpp I added a check for the 1 in 2 out config in the bypass section where it runs the copy function if that’s the case:
  if (bypass)
    {
    if (numInChannels == 1 && numOutChannels == 2)//--------- fix for Pro Tools 1in/2out bypass 05_8_25
        {
            FixPT12Bypass(numSamples);//copy Inchl[1] to Inchl[0] data
        }
    PassThroughBuffers(0.0f, numSamples);
    }
  1. Then I added a new function to iPlugProcessor.cpp that does the copy:
void IPlugProcessor::FixPT12Bypass(int nFrames)//--------- fix for Pro Tools 1in/2out bypass 05_8_25
{
  sample** inputs = mScratchData[ERoute::kInput].Get();
  memcpy(inputs[1], inputs[0], nFrames * sizeof(sample));
}

I know it is not “proper” to modify framework files like this but it works, has no apparent side effects, and was easy to do. Perhaps it can be added as an official update to these iPlug files?

Otherwise, if there is better way please let me know!

1 Like