[LAD] Mixing audio: Noiseless volume changes

Fons Adriaensen fons at linuxaudio.org
Tue Mar 19 23:29:59 UTC 2013


On Tue, Mar 19, 2013 at 06:12:21PM -0500, Charles Z Henry wrote:

> If it was always a fixed time over which you need to fade in, I think you
> could find a good analytical function to use, or make a table that always
> has a predictable effect.

Raised cosine is a good solution, but you don't need
sines and cosines. Try e.g.

    x * x * (3 - 2 * x)

with x in [0...1].

This can even be generated using only additions.

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