AnsweredAssumed Answered

Problem with "standard" stereo compressor circuit?

Question asked by SteveL on Jan 26, 2018
Latest reply on Jan 29, 2018 by DaveThib

Been away from this forum for a while, but still having fun with SigmaDSPs :-)


I have encountered a "gotcha" with this standard stereo compressor circuit as found in the AD Toolbox and elsewhere:


To maintain the stereo image, this circuit purportedly responds to whichever of the two input signals is the larger and applies the resulting gain reduction to both channels. It all appears to make complete sense. However...

Say we apply an identical sinewave signal to both input channels, measure the outputs, then mute one of the two inputs. Logically, we would expect the output level of the active channel to remain the same - after all, the "greater than" function ensures that the same signal reaches the compressor's External Control input in both cases.


But what actually happens is that the output level of the active channel goes up by 3dB. Why?

I think it is because the greater-than function is designed to work only with unipolar/integer/control signals and not bipolar/audio signals, i.e. it looks at the DC level rather than the magnitude. So for half of each audio cycle, the zero level of the "dead" input channel is seen as greater than the negative half-cycle of the active signal and is fed through to the compressor control input. Effectively, with one input muted, the remaining active signal is half-wave rectified before being fed to the compressor control input, and that will clearly affect the gain reduction.


Now, maybe I am the last person in the world to notice this but, based on how many times I have seen this circuit cut-and-pasted without any comment, I suspect not. It really does not seem like very desirable behaviour from a stereo compressor.


Fortunately the solution is quite straightforward:


Here, the two signals are rectified to positive-only values by the absolute-value blocks and whichever of the results is higher is allowed to route its associated audio signal through to the compressor control input. With this circuit, muting one input signal has no effect on the level of the other.


Is this a reasonable analysis of the situation?

(I am using an ADAU1701 and Sigmastudio 3.14, BTW)