![]() ![]() Reaper gives us a sample of a sound's amplitude. There's the origin of the first equation. To express these amplitude sample values in decibels which depend on pressure, we need to know how amplitude relates to pressure: a sound's pressure relates to the square of the sound's amplitude that is, P = spl^2. These sample values range from -1 to 1 (or 0 to 1 in absolute terms, with the sign indicating phase). So if P is the sound's "acoustic pressure" (in units such as "watts per square meter") then log10(P) is the pressure in bel units, and 10 * log10(P) is the pressure in decibel (dB) units.īut - if I have this right - in Reaper we deal with digital samples ("spl") that measure the sound wave's amplitude, not its pressure. This value is then multiplied by 10 to get the equivalent "decibels" value (this 10-factor is solely for the convenience of making the resulting values bigger it has nothing to do with acoustical physics). A measurement of a sound in "bels" is the base-10 log of a measure of the sound's "acoustic pressure". The decibel (dB) scale is based on powers of ten (another clue that the 20 * log10(spl) approach is more appropriate). As sai'ke shows, to convert from natural to base-10 log use log10(x) = log(x)/log(10), (that is, divide by the natural log of the value 10, which illustrates another way to get confused between the two logs!). Natural log deals with powers of "e" which is the value 2.7182 e.g. Reaper's JSFX uses "log()" for the natural log and "log10()" for base-10 log (in contrast for example, Microsoft Excel uses "ln()" for natural log).īase-10 logs deal with powers of 10 e.g. As DarkStar notes, it's easy to get confused which is which, especially when dealing with the semantics of differing programming languages. There are two types of logs here: base-10 log and natural log (base e). I'm no expert - corrections, clarifications are welcome.įirst, clear up log semantics. But why? Which is theoretically, physically correct? I looked into it a bit more. From sai'ke and ashcat_lt's comments, it looks like the 20 * log10(spl) approach is more accurate than the 6/log(2) * log(spl) approach. I found this thread as I had the same question as DarkStar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |