RFC anti-pop bypasses

Thinking here about a simple anti-pop system for bypass/gate switches like the Vactrol. It seems (naively) that a simple exponentially weighted average could be used to deal with the problem and simulate the resistor designs I’ve seen for general bypass circuits.

To set the bypass

Set the bypass target to true or false (this could be 1.0 or 0.0 to get around type converting a boolean.)

To test the bypass

Check if the EWMA is greater than zero.

Rationale

We have to attenuate the signal over N samples after turning on the bypass, which means we cannot rely on the desired state. Testing the EWMA’s output tells us whether the bypass is fully in effect.

Circuitry

If the bypass is not in effect (see 2), run the circuit and multiply the output by the EWMA weight. Otherwise do nothing and return zero.

Overhead

If the sample size is fixed N, then we are only adding to every sample:

  • A single branch and,
  • Three multiplications and an addition

Allowing a changeable N (based on sample rate) is the same, but also adds one read to each sample.

It’s worth experimenting to see if the resistance gate needs to be relative to sample rate or can just be some short fixed value (enough to kill the DC offset.)

1 Like

Was trying to implement this a while back with a crossfade on the signal (swapping channels) kind of worked. Other solutions where a slew on the signal exponential decay and filtering. Have not seen the great need to implement them yet as I had some other issues that got more priority but a simple solution for this would be very welcome to see how it might be implemented.

There is anti-pop in the Fundamental Sequential Switches in case you haven’t seen them yet:

2 Likes

To avoid a pop due to a discontinuous jump from V_1 to V_2, you can

  • Add a continuous signal that falls from V_2 - V_1 to 0 in 100ms to the output signal, such as a straight line, exponential decay, sigmoid, or even a minBLEP. If you have too many jumps per second, this method has DC offset problems, so only use it for non-CV things like a mute button.
  • Crossfade using a straight line, signoid, etc between the two signals. This works at audio-rate, but you have to continue processing the two (or more) signals until they reach 0 level.

I can’t think of any more methods. Everything I can imagine fits into either of the above.

2 Likes

The EWMA-based anti-pop is what I merged with the Vactrol. The bypass open/close state is averaged over 5% of the sample rate worth of frames and used to attenuate the signal. So basically a crossfader to nothing.