[chuck-users] Converting dB to chuck .gain

Ge Wang gewang at CS.Princeton.EDU
Thu Mar 9 00:42:09 EST 2006

slightly optimized:

fun float gaintodb( float gain )
{ return 4.3280851226668906 * math.log(gain); }

quick sanity check - gaintodb( 1/1000000000000.0 )
should yield close to 120 dB down, roughly the
dynamic range of hearing.

Should we put these in math/std?


More information about the chuck-users mailing list