3

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.

4
  • 'Decibel' is a ratio, not an absolute value. To answer this we'd need to know the range of decibel values and the scale reference.
    – Jim Mack
    Apr 8, 2016 at 19:47
  • Ok so the unit delivering these values actually gives -32768 for the fader right down, but 0 when it is right up. So when I have this value (call it N) it aligns exactly to the physical fader positions with this function (N / 10) + 10 - so that effectively gives the same value as shown on the fader which runs from +10dB down to - infinity with -60 the last number. The scale seems logarithmic to me on the fader. Apr 8, 2016 at 20:37
  • What is the automation lane to be used for?
    – n00dles
    Apr 9, 2016 at 13:28
  • @MarcW Volume on an audio track in a multi-track editor. The scale runs from +15db to -15dB in side the multitrack editor. In the session file which the multitrack editor loads, the value is stored as a linear point from 0 to 1 where 0.65 = 0dB, 0=-infinity dB and 1 = +15dB. Apr 9, 2016 at 15:18

2 Answers 2

6

Practical version

  • 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...

Official definition

  • 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.)

1

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)

6
  • How does this change if +15 dB gain is 1.0 factor and -∞ db gain is 0.0 factor? Apr 8, 2016 at 21:04
  • 1
    @JamesHarcourt: just add / remove 15 from the dB scale. Apr 8, 2016 at 21:47
  • @leftaroundabout that definitely doesn't work, the values that come out aren't anywhere near the linear values produced, i.e. 0dB = 0.65. Apr 9, 2016 at 15:18
  • @JamesHarcourt er, no! 10⁽⁰⁻¹⁵⁾’²⁰ ≈ 0.1778. What did you calculate? Apr 9, 2016 at 15:24
  • The application in question is Adobe Audition. Their volume automation is stored in XML, so when there is an automation point of 0dB, it is shown thus: <parameterKeyframe sampleOffset="95176" type="linear" value="0.65" />. So I actually want 0.65! Apr 9, 2016 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.