Does anybody know the math required to convert a logarithmic decibel scale to a linear value between 0 and 1, for an automation lane?
In this particular case - the linear value 1 = +15dB, the linear value 0 = -∞dB.
Sound Design Stack Exchange is a question and answer site for sound engineers, producers, editors, and enthusiasts. It only takes a minute to sign up.
Sign up to join this communityDoes anybody know the math required to convert a logarithmic decibel scale to a linear value between 0 and 1, for an automation lane?
In this particular case - the linear value 1 = +15dB, the linear value 0 = -∞dB.
dB → gain-multiplier:
g = 2d / 6
gain-multiplier → dB:
d = 6 · log2(g)
I find these definitions far more handy than the ones below: changing the amplitude by a factor of two is quite an intuitively relevant change. But, alas, in pre-computer times people couldn't seem to like logarithms of bases other than ten, so...
dB → gain-multiplier:
g = 10d / 20
gain-multiplier → dB:
d = 20 · log10(g)
IMO base-10 is silly, but if you need to do exact calibrations, better use the official version. (Alternatively, use the base-2 version, but replace 6 with the factor 20 · log102 ≈ 6.020599913; this is then exactly equivalent to the base-10 definition.)
So if we set that 0 dB gain is 1.0 factor, and -∞ db gain is 0.0 factor, it means that (if we are considering voltage gain as in a mixing desk fader) :
gain = 20.0*log10(factor)
therefore :
factor = 10^(gain/20.0)
If, as described in a comment, the 0 dB gain is at 0.65 factor, it means the ref is 0.65.
gain in db = 20*log10(factor/0.65)
factor = 0.65*10^(gain/20.0)