Closed heuermh closed 10 years ago
From a very old thread on the chuck-users@ email list
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-March/000431.html
fun float dbtogain( float db ) { return math.pow( 2, db/3 ); } fun float gaintodb( float gain ) { return 3 * math.log(gain) / math.log(2); }
Slightly optimized
fun float gaintodb( float gain ) { return 4.3280851226668906 * math.log(gain); }
I just added linear <-> db (ccrma/chuck@0604f615af19fbe00382389dd059140b7d2db9c4) -- I think this the same thing, at least conceptual if not mathematically.
Yep, looks great, thanks @spencersalazar
From a very old thread on the chuck-users@ email list
https://lists.cs.princeton.edu/pipermail/chuck-users/2006-March/000431.html
Slightly optimized