Re: Simple 3 band equalizer generate audio glitch
Re: Simple 3 band equalizer generate audio glitch
- Subject: Re: Simple 3 band equalizer generate audio glitch
- From: Richard Dobson <email@hidden>
- Date: Fri, 15 Feb 2013 17:48:38 +0000
On 15/02/2013 16:30, Alessandro Calzavara wrote:
Hi everyone
I implemented a simple 3 band equalizer (bass, mid and treble) in my audio graph.
The problem I'm having is that when I quickly drag the slider (on the UI) up and down to adjust the gain of one band, I ear an audio glitch, like a bit of distortion on my voice.
The range of the gain is -20..+5 db.
I did a lot of testing to understand where the problem came from but I didn't found the root cause of it.
I know that if I reduce the range of the gain, the problem will be reduced but it still there.
Can you give me some hint on how to look for fixing the problem?
Or tell me what I did wrong in my setup?
Sounds like the standard "zipper noise" problem associated with GUI
controls, and perhaps especially with sliders. Such things have very
limited precision - might be less that 100 steps from min to max value.
Thus the raw values emitted by the control jump instantly from one value
to the next. To control any audio effect (including simple gain) these
jumps have to be smoothed out, i.e. interpolated, over some moderately
small number of samples. the ear is remarkably sensitive to even most
amplitude glitches. However, simple linear ramping is sufficient in most
cases. This is equivalent to a basic low pass filter applied to the
control values. For gain a dB scale is expected, and a simple approach
is to interpret the fader values directly as dB, convert to amplitudes,
and ramp those as necessary.
If the user is permitted to flash-jump a fader from min to max
(automation might do that too), you clearly have to translate that into
a continuous attack envelope updating per sample, if a big glitch is to
be avoided. Like driving over a deep pothole. Think of the code as
implementing a shock absorber. One could argue that users who do such
things have only themselves to blame (after all, no analogue continuous
control can perform such a jump), but they generally expect software to,
somehow, "do what I mean".
Richard Dobson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden