The values are linear gain multipliers (i.e. "magnitude" of gain). This means that the gain stage at any given point is logically a multiplicative combination of all these gain values ("volume levels") that are relevant at that time for a clip. Thus unity gain (0 dB) is a value of 1.0, and full attenuation ("gain" of -Inf dB) is 0.0. The nominal range of values is 0.0 through just under 4.0 (corresponding to +12 dB), but there are some contexts in which values may be outside of this range (FCP's Gain unit springs to mind, which has a huge range of gain).
The conversion from linear gain to decibels (and the inverse) is well-documented. One is able to get formulae via Google, for example:
Basically, for magnitude to decibels:
decibels = 20 * log10(magnitude)
and thus the inverse of converting decibels to magnitude:
magnitude = pow(10, (decibels / 20))
(These are for linear gain multipliers, so if you are trying to get a relative value between two amplitude values, the linear gain is the ratio of the two.)
Thus for 6 dB of gain (which we know is roughly a doubling of amplitude):
pow(10, 6/20) = 1.99526231497 ~= 2
Hope that helps.
Regards,
Helena
On Apr 7, 2008, at 10:39 AM, Rainer Standke wrote:
Could someone please shed light on the math behind the volume levels in FCP XMLs? Seems like 0 dB correspond to an encoded value of 1, and the level turned down all the way (infinity?) must correspond to level 0, since that seems to be the minimum. The maximum of +12 dB seems to correspond to 3.98109.
How does the math behind this work? How do you calculate the value to encode for, say, -15 dB? I am looking for a formula here.
Thanks,
Rainer