Why the RMS is negative in audacity?

Hi, guys. Recently I’m using audacity to measure the RMS of some sudio clips. And I wonder why the RMS measured is negative. Then I found that in the forum, there are other people who asked the same question as me. And after reading her post, I figured out that it is sth about the dbSPL and dbFS. Now my question is, what is the function for calculating the RMS of the dbFS?
Since at first, I searched online and found that normally, RMS is calculated by squaring the signal’s amplitude, averaging the squares, and then taking the square root. But obviersly it can’t be negative according to this method. So does anyone know how do we calculate the RMS in the audacity to make it negative? :face_with_raised_eyebrow:

RMS is also dBFS (decibels full scale). It’s relative to the peak, so you can have a 0dB RMS square wave, but not a 0dB RMS sine wave.

0dBFS is the highest you can “count to” with a given number of bits (1) so with integer data, you can’t get positive dB. 16-bits (signed) can hold values between −32,768 and +32,767. A wave that hits those positive & negative peaks has a peak value of 0dBFS.

(When you play a file, everything is automatically scaled to match your DAC so a 24-bit file is not louder than an 8-bit file. )

The RMS amplitude is positive but decibels are relative. dB = 20log(A/Aref). A is amplitude and it can be a voltage or a digital value, etc.

There is a different formula for power (wattage) because wattage is proportional to the square of the voltage. dB = 10log (P/Pref).

With SPL the 0dB reference is approximately the quietest sound that can be heard so SPL levels are positive.

There is no automatic calibration between dB SPL and dBFS but there is a direct correlation. i.e. If you lower the digital level by 3dB (3dB more negative) the SPL level also drops by 3dB. (Assuming everything is linear… The amplifier isn’t being over-driven into clipping, etc.)

(1) In floating point, a value of 1.0 represents 0dBFS. For practical audio purposes, there are no upper or lower limits.

That is correct.

The sample values are represented as floating point numbers, where +1 is the top of the audio track and -1 is the bottom of the audio track. Thus all sample values within the legal range (below 0dB, which is “Full Scale”) are in the range +/- 1.

This will give you a linear value for the RMS in the range +/- 1.

Converting to dB (Decibel), where A is the absolute linear amplitude (or linear scale RMS):

dB = 20log(A)

(base 10 log)

If A = 1, then dB = 0
If A = 0.5, then dB = −6.02

This is very clear, thank you! Now I know the connection between the two parameters.
Actually, I want to report the RMS value of some audio clips in a paper. Now as the RMS is negative in the audacity and not correspond to its definition, so can I still report it as ‘RMS’ and make some explanation or there is another concept for the negative RMS? I’m afraid that it will be a little confusing if I still leave it as RMS. I want to know how to make it easier for readers to understand. Thank you: )

Than you for your reply: ) So you mean, actually the RMS I get from the audacity can’t be considered as the proper RMS? And I wonder if I want to get the RMS corresponded to its original concept (positive), does it mean I can’t get it from the software. I can only measure the dB the sound makes in the real life and calculate the RMS through tha function?

No, I don’t mean that.

When measuring temperature (as an example), whether we measure in Celsius, Fahrenheit, or Kelvin, we are measuring the same thing, but using different measuring sticks. In the same way, whether we measure on a linear scale, or as dBFS, we are just using different measuring sticks. When dealing with audio signals it is very common to use dB.

To convert linear amplitude from “linear to dBFS”, the conversion formula is:

dB = 20log(A)

To convert amplitude from “dBFS to linear”, the conversion formula is:

A = 10^(dB/20)

Wow, So I can get the amplitude of the clip from dB? Then which kind of dB shoud I use? I don’t want the amplitude of a specific point on the audio clip. I want a kind of amplitude that can represent the whole loudness of the clip.

BTW, if the dBFS is negative, then how to use it in this fomula?

If you have an SPL meter it’s easy with pure tones and you can use peak or RMS. You just subtract. If 80dB SPL reads -6dBFS, then 75dB SPL will read -11dBFS. An xdB change is an xdB change in everything!

But with real-word sounds it gets complicated. Real world sound changes moment-to-moment and SPL is usually A-Weighted to account for the fact that our ears are most-sensitive to mid-frequencies, so mid frequencies sound louder (and measure louder when A-weighted) that low & high frequencies. SPL meters also have short-term averaging.

A-weighting is not “perfect” but it’s the standard for industrial noise measurements. Some SPL meters have selectable weighting.

For digital files there LUFS which also takes frequency into account. Audacity doesn’t have LUFS measurement built-in, but it it’s an option for Loudness Normalization so you can adjust your file to an LUFS target level.

Try it! It’s giving you a ratio or factor, not an absolute value.

A negative dB value will give you less than 1, and a positive value greater than 1.

-6dB gives you (about) 0.5. +6dB gives you 2. Both are factor of 2. If 1 Volt is 0dB then +6dB is 2V. If 0dB is 1mV, +6dB is 2mV.

I see. Can you help me with this question? I’m still confused about how to use RMS in my paper properly. :face_exhaling:

If you know the RMS measurement on a linear scale (relative to full scale), then yes you can convert that to “dB RMS” with nothing more than a calculator.

If you know the dB RMS measurement, then yes you can convert that to RMS FS.

Unfortunately there is an ambiguity in these conversions. The equations that I provided previously follow the mathematical definitions. Audacity uses the mathematical definitions, which are commonly used, but there is also an alternative definition of RMS FS, defined in AES17-1998 that is about 3.01 dB higher than the mathematical definition.

The mathematical definition states that a full scale (FS) square wave is 0 dB.
In this case, all sample values are either +1 or -1, so the square is +1, the mean is +1, and the square root of +1 is +1, and 20log(1) is 0dB.

The AES definition states that a full scale sine wave is 0dB, which is about 3.01 dB higher than the mathematical definition. The AES definition is widely used in audio chip specifications and associated electronics.

There is also yet another definition; ITU-T G.100.1, but this tends to be specific to telephony applications.

If you are writing an academic paper, and you are referring to “signal” levels, then I’d suggest you use the mathematical definition of RMS in dB, as reported by Audacity’s “Measure RMS” and “Contrast” analyzers. You can add a note the first time you use an RMS measurement with wording such as:

  1. RMS values are converted to decibels relative to the full-scale digital reference (dBFS).

If you are referring to “Sound Pressure Level” (how loud the sound is), then use whatever units your SPL meter uses, and copy the definition from the SPL Meter manual.

In case it is not clear already: It is NOT possible to convert signal levels to sound levels (SPL), or sound levels to signal levels. This is obvious when you think about it - a CD is louder when you turn up the volume of the amplifier, though the signal level (on the physical CD) is unchanged.

This is pretty clear for me. I really appreciate your reply. Thank you! :smiling_face_with_three_hearts: :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

This topic was automatically closed after 30 days. New replies are no longer allowed.