Spectrum calculation


I am struggling with units in dB on the vertical axis (y-axis) in the calculated spectrum in Audacity (say for a rectangular window). In my opinion the relevant formula for calculation is

20 * log10( [(2*Delta^2/T)|FFT|^2]^1/2) where Delta is the sampling interval (e.g. Delta = 1/fs = 1/44100) and T is the time of the segment of the FFT.

(I know that the real formula is more complicated due to averaging of neighbouring segments and windows etc).

My concern/question is about the constant since I am not able to reproduce the results by (say) MATLAB. I am obtaining the same shape of the spectrum but about 22 dB larger than Audacity (with 44100Hz and size 4096)

So my question is only about the norming 2Delta^2/T = 2/(fsN) (in this representation fs is the sampling rate, eg fs=44100Hz, and N is the number of data, eg N=4096).

Can please someone let me know what constant has been used in Audacity. Thank you very much. Kind regards.

Are you referring to Plot Spectrum (http://manual.audacityteam.org/man/plot_spectrum.html) or the track spectrogram view (http://manual.audacityteam.org/man/spectrogram_view.html)?

I am referring to Plot Spectrum (if I understand it correctly the spectrogram view only provides the magnitude of the spectrum in colours and not in dB).

(sorry for the slow response - I missed to activate the button "Notify me when a reply is posted)

The amplitude (dB) values in Plot Spectrum are normalized (scaled) such that a 0 dB (peak level) sine wave is plotted at 0 dB.

By implication, this means that if there are two sine waves, each with peak amplitudes of 0 dB, falling in the same FFT bin, then that bin will have a value of +3 dB.

10 * log(1 + 1)

Thank you very much!! So I think this means that the Fourier transform is devided by window sum / 2 before taking the 10*log10()-transform.