[LAD] Mixing audio: Noiseless volume changes

Tim Goetze tim at quitte.de
Tue Mar 19 14:02:19 UTC 2013


[Fons Adriaensen]
>On Tue, Mar 19, 2013 at 04:26:21AM +0100, Tim Goetze wrote:
>> A 2nd-order IIR filter is often called a "biquad"; at musicdsp, look
>> for that instead. 
>
>Not really. A biquad is one way to implement a 2nd order IIR, and
>in many cases related to audio DSP, not really the best way.
>
>Anyway, using a biquad for something so simple is giant overkill.
[...]
>// Else run the filter:
>
>for (i = 0; i < nframes; i++)
>{
>    g1 += w * (gt - g1 - a * g2);
>    g2 += w * (b * g1 - g2);
>    out [i] = g2 * in [i];
>}

Surely you realise this version executes exactly as many additions and
multiplications per sample as a biquad?


More information about the Linux-audio-dev mailing list