# How to make sense of audio file's $\textrm{dBFS}$?

I'm trying to build a song visualizer using the FFT method. When I analyze the audio, I get the $\textrm{dBFS}$ value for each frequency range.

From my understanding,

• $\textrm{dBFS}$ is in the range $[-\infty, 0]$, where $0$ is the most loud.

• The formula for percentage loudness is $10^{\rm dBFS/20}$.

However, the $\textrm{dBFS}$ values I'm getting are consistently below $-20$, i.e., $10\%$ loudness, even at loud parts of the song. Why is this so? Am I calculating the loudness wrongly?

Also, how can I calculate the overall loudness at a point in time? Is it the sum of all the values, or the maximum?

• "Am I calculating the loudness wrongly?" How are you calculating it? – endolith Oct 20 '16 at 16:15
• @Code Try with an input audio file which is a single sinusoid normalized at 0 dBfs. The FFT should have one peak nearly at 0 dB IIRC. – Basj Oct 11 '18 at 20:25
• Might be linked to dsp.stackexchange.com/questions/32076/…. – Basj Oct 11 '18 at 20:33

However, the dbFS values I'm getting are consistently below -20, i.e., 10% loudness, even at loud parts of the song. Why is this so? Am I calculating the loudness wrongly?

Why should that be a problem? Human perception is roughly logarithmic. Sound that isn't "unbearably loud" shouldn't be much more than 10% of your "acoustic dynamic range".

By the way, with $\frac{}{20}$, this formula gives you amplitude, not power values, so this isn't truly loudness, just amplitude. But since that, in perception, is but a constant factor, these terms can be used interchangably.

Also, how can I calculate the overall loudness at a point in time? Is it the sum of all the values, or the maximum?

It's the sum, at least approximately: human perception has a different sensitivity for different frequencies, and also, frequencies can mask each other, so the energy in the signal is only proportional to the perceived loudness if we ignore these facts (see: psychoacoustic models).

• Wouldn't you say it's troublesome that he's not getting 0 dBFS at some point? There has to be a maximum somewhere. Or am I thinking about this wrong (in terms of his question)? – Envidia May 18 '17 at 20:54
• no, doesn't worry me at all. a) we don't know whether the DFT (FFT) OP uses scales, and if so, how, b) it's to be expected that not all energy in a recorded time-domain ends up in a single DFT element, and that's what I would scale to be 0dB, and c) you always want to stay clear of clipping. d) assuming AC-coupling, there's only one signal with max power, and that's an alternating +FS/2 and -FS/2. That signal is unlikely to be let through by the anti-aliasing filter. – Marcus Müller May 18 '17 at 21:08
• I didn't consider the DFT being used. I've been using the same FFT for so long that it's become de facto. I also didn't consider clipping. That would definitely deny you of any hopes of seeing 0 dB. – Envidia May 18 '17 at 21:12