[LAD] Mixing audio: Noiseless volume changes

Fons Adriaensen fons at linuxaudio.org
Mon Mar 18 23:45:15 UTC 2013


On Mon, Mar 18, 2013 at 11:28:24PM +0000, James Morris wrote:
 
> I think the only time zero-crossings are any good is in hand-crafted
> cutting of (very) simple waveforms.

The only case where switching on zero-crossings  makes sense is when
the gain control element can't perform a continuous change and switching
is the only option. That is the case with many 'electronic volume control'
chips that have e.g steps of 1 dB (or worse). 

Using floating point, there is no reason to ever have sudden gain changes,
just smooth the gain value itself (at the sample rate). A critically damped
second order lowpass with a rise time of 30 ms or so will eliminate all
audible artefacts. It's very low on CPU and you only need to run it while
the gain is changing.

Ciao,

-- 
FA

A world of exhaustive, reliable metadata would be an utopia.
It's also a pipe-dream, founded on self-delusion, nerd hubris
and hysterically inflated market opportunities. (Cory Doctorow)



More information about the Linux-audio-dev mailing list