Interpretation of negative decibels

Hello everyone,
I need help but not directly with Audacity…
I am a mobile application developer and I want to make an application that detects noises.
I managed to do the measurements but I get negative values ​​(ex: -54db). I think that it is correct but I do not know how to interpret the values.
I know that 130db corresponds to a very very loud noise but what about a sound at -54db?
I read somewhere that with the sensitivity of the microphone, you could convert a “negative” decibel to a “positive” decibel.
Does anyone have a formula or a clue that could help me?
Thanks in advance

There are different 0dB references for acoustic, digital, and electrical levels.

0dB SPL is the acoustic reference. It’s approximately the quietest sound that can be heard and SPL levels are usually positive.

0dBFS (zero decibels full scale) is the digital reference and it’s the “digital maximum” so digital dB levels are usually negative. With integer formats, 0dB is the “highest you can count to” with a given number of bits. 24-bit audio files have “bigger numbers” than 8-bit files, but when you play the file everything is automatically scaled to match your DAC so a 0dB 24-bit file isn’t louder than a 0dB 8-bit file.

There are various electrical references. 0dBV means 0dB is 1 volt, etc.

There is no standard calibration between digital and acoustic levels. Acoustic loudness depends on many things… Your volume control, the gain and power of your amplifier, the sensitivity of your speakers, how close you are to your speakers, etc. But there is a direct correlation. If you turn down the digital level by 3dB (3dB more negative) the acoustic loudness also drops by 3dB.

Since there is no standard calibration you can’t normally measure acoustic loudness with a microphone and Audacity. But there are calibrated USB microphones and associated software.

There is an additional complication… SPL loudness is usually averaged, and frequency-weighted because our ears are more sensitive to mid-frequencies. With digital we are usually concerned with peaks because of the 0dB maximum limit. Peaks don’t correlate well with loudness so for example, if you normalize (“maximize”) all of your music for 0dB peaks, some songs will sound louder than others.

“Detection” is different from “measuring”. For measuring you’ll need an SPL meter to calibrate your phone. Most phones of the same model will be “close” and maybe “close enough”, but different brands/models of phones will have different microphone sensitivity. And you should include A-weighting.

That’s for a full-scale sine wave. Square waves are “louder” than sine waves by about 3 dB, so you could have a +3 dBFS square wave.

In other words, higher bit depths have higher precision, not larger amplitudes. Basically it’s like having more digits available after a decimal point.

Not quite - This is true for RMS measurements used by some standards, which assert that RMS of a sine is 0dBFS. Audacity uses the mathematical definition of RMS, which has sine waves at -3dBFS RMS. You can see this in Audacity itself; the light blue area of the waveform (which shows RMS) never goes above -3dBFS for sine waves.

Note that these are RMS values, not peak values. RMS is a loudness estimation (with LUFS being a better estimation), not a volume measurement.

Would it then be accurate to say Audacity uses the dBov scale, which designates the RMS of a full-scale square wave as 0 dBov (and a full-scale sine wave is about -3 dBov)?

And… dBFS is an instantaneous calculation… One sample at a time. But usually we are talking about the peak of a wave, file, or selection, because it’s the peaks that can cause clipping.

I suppose it technically is true, but it isn’t massively helpful because it’s rarely used.

Slight aside: dB itself is ambiguous anyway. From the same rec G.100.1 which specifies dBov:

8.2 The unit “dB”
This basic unit is mainly used for losses, gains, return losses, etc., i.e., as a logarithmic ratio between two values which can be voltages, currents, powers, acoustic pressures, etc. If the ratio is X for voltages, currents or pressures, the dB expression is 20 log (X). If the ratio is Y for powers, the dB expression is 10 log (Y).

why is it 20 log(x) and 10 log(x)? Essentially, because there’s an “x²” some of the physical properties which is getting log-ged out of the rest of the formula and put in front instead, with 10 log(x²)= 2*10 log(x) = 20 log(x). At the end of the day, dBs are all just ratios of some description - in theory you replace all instances of % with dB in your life.

Anyway, in the context of digital audio, you generally only find dBFS, perhaps with a setting somewhere which lets you specify whether for RMS it uses square or sine waves for 0dBFS. For individual sample values (amplitudes) it is never wrong to say dBFS.

We probably should push the industry away from using RMS for loudness estimates and use LUFS instead.

Not really. dBFS is a specific term defined and used in a number of standards which all say that the RMS of a full-scale sine wave is 0 dBFS. “RMS” suggests, and a sine wave requires, multiple samples.

The RMS of a single sample is just the absolute value of that sample’s value. A single sample at one of the extremes, either -1 or +1, has an RMS of 1 and is +3 dBFS and 0 dBov.

dBFS is a specific term defined and used in a number of standards which all say that the RMS of a full-scale sine wave is 0 dBFS

dBFS has been used long before these standards specified what to do about the RMS. The way Audacity calculates RMS is the mathematically correct method, and doing it this way is the informal standard across audio editors. Arguably that’s more relevant than standards with the intention to be applied to broadcasts, telephony, circuits etc.

I had to look that up as “dBov” is not a common term outside of telephony.
Wikipedia says:

The unit dBov is defined in the ITU-T G.100.1 telephony standard such that the RMS value of a full-scale square wave is designated 0 dBov.

So yes, that’s the same as Audacity, which uses the mathematical definition of RMS.

LUFS is a reasonable approximation of loudness for music and speech, but it fails spectacularly with high frequency narrow band signals. (It totally ignores human hearing’s reduced sensitivity to very high audio frequencies).

In my experience as an audio engineer, the term “dB FS” is most commonly used to refer to peak level, and “dB RMS” is used to refer to (mathematical) RMS. Unless there have been recent changes that I’ve missed, that is also how Audacity uses the terms.