dBFS = (20 * Math.log10( 2 * Math.abs(magnitude) / 2048)) - 100I think this is giving me what I'm looking for, and it correlates closely to what I'm seeing in other tools. And if I decrease the gain on a file by 20db, and then analyze the decreased file, the dBFS data I get back is 20db less than the original.
However, I noticed that when I view the spectrogram in Audacity (using plot spectrum), the dB values in Audacity seem to range between 4db and 9db higher than what I'm getting from musicg and the above equation.
Is there something I'm doing particularly wrong in the way I'm trying to calculate dBFS from the musicg absolute spectrogram data? (or perhaps I'm mistaken and what I'm calculating, and what Audacity is displaying, are not quite the same thing)