DSPRelated.com
Forums

What step size (or frequency) to use to avoid audible pops?

Started by Daniel Grace December 1, 2015
I don't know if this is a good way to prevent pops from parameter jumps etc but here goes.

For a given signal let the current sample be x0 and let the previous sample be x.  Let s be a maximum step size used to determine the next value (output) y from x and x0 using the formula:

y = x0 if |x - x0| <= s,
y = x0 + s if x0 - x > s,
y = x0 - s otherwise

Assuming r is the sample rate e.g. r = 44.1kHz, my question is what is a practical value for s (to avoid audible pops)?  A similar question: what is a practical value for the maximum frequency of a triangle wave that will pass through this filter unaltered?

Thanks.
On 01.12.15 21.02, Daniel Grace wrote:
> I don't know if this is a good way to prevent pops from parameter jumps etc but here goes.
Common practice is to fade between the old and the new setup. [Maximum step size]
> Assuming r is the sample rate e.g. r = 44.1kHz, my question is what is a practical value for s (to avoid audible pops)?
There is no such relation. You probably not even notice a Step of 32000 if it is just a single sample. The old DDD mastering of Brothers in Arms is full of errors like this. Marcel
Daniel Grace wrote:
> I don't know if this is a good way to prevent pops from parameter > jumps etc but here goes. > > For a given signal let the current sample be x0 and let the previous > sample be x. Let s be a maximum step size used to determine the next > value (output) y from x and x0 using the formula: > > y = x0 if |x - x0| <= s, y = x0 + s if x0 - x > s, y = x0 - s > otherwise > > Assuming r is the sample rate e.g. r = 44.1kHz, my question is what > is a practical value for s (to avoid audible pops)?
I don't really think you want to slew rate limit the output. I'd ramp the parameter. This means that I would have a maximum rate of change - slew rate of the parameter - per sample, and increase the parameter by that for each sample until it matches the setting. Say the chosen slew rate is 0.1 for a parameter change from 0..100. Then it will take 1000 samples for the parameter change to fully take effect. @ 44.1 this is 44.1 msec. If you can't, a highpass filter can be used in post to attenuate pops. That might suggest an approach. You can also use a *lowpass* filter to ramp the parameter - a third order of alpha 0.01 is mighty smooth, but slow.
> A similar > question: what is a practical value for the maximum frequency of a > triangle wave that will pass through this filter unaltered? > > Thanks. >
-- Les Cargilll
Thanks for setting me straight on that.
On Tuesday, December 1, 2015 at 2:38:13 PM UTC-6, Marcel Mueller wrote:
> On 01.12.15 21.02, Daniel Grace wrote: > Common practice is to fade between the old and the new setup. > > There is no such relation. You probably not even notice a Step of 32000 > if it is just a single sample. The old DDD mastering of Brothers in Arms > is full of errors like this.
The cheapest way (and one that works quite well for regular sounds) is to graft a nearby segment in the time domain, assuming it is approximately sinusoidal (i.e. one dominant component) ... AND cross fade into the grafted region on the front end and out of it on the back end. A linear cross fade should suffice (i.e. a cross-fade function f(x) = x, for x = 0 to 1). To avoid any effects coming from discontinuity in the first derivative of the grafting, a second order fit (e.g. with the cross-fade function f(x) = x^2 (3 - 2x) for x = 0 to 1).