I am trying to learn about frequency domain and I am using audacity software. I selected a small YouTube video (link below):


I converted it to .wav format using the link below: https://youtubeto.org/en/youtube-wav.html

When I imported this .wav file into my audacity and tried to analyze its frequency spectrum, I got a new frequency analysis window (as shown in attached snap). But I am unable to understand it as I have two confusions:

  1. In our books we saw frequency spectrum where zero frequency is at center and here in this plot zero frequency is at left.

  2. Why do we have here a negative sign with db values, what does that mean? -11 db has lowest magnitude/amplitude and 90 db has highest magnitude/amplitude or is it the opposite ?

enter image description here

  • 3
    $\begingroup$ Audacity adds functionality to make it a better tool for audio, and easier to use for people who aren't learning signal processing. If you are trying to learn signal processing theory, that functionality gets in the way. I suggest you use a mathematical analysis package. Python with numpy, scipy, and matplotlib is a complete scientific package that's hard to learn from scratch and easy to do projects ranging from medium sized to huge. Matlab spoon-feeds you the programming stuff, and costs a lot. Octave is a direct Matlab clone and is free. Scilab is a free, kissing cousin of Matlab. $\endgroup$
    – TimWescott
    Commented Aug 11, 2022 at 14:59
  • $\begingroup$ "kissing cousin" w@T $\endgroup$ Commented Jun 11, 2023 at 17:04

1 Answer 1

  1. The frequency domain representation of a signal can be computed using the Fourier Transform. Practically the Fourier Transform is computed as the Discrete Fourier Transform (DFT) via a Fast Fourier transform (FFT) algorithm.
    • One of the properties of the DFT of a real-valued time signal (such as your .wav file) is that it is an even function of frequency: it is symmetric about $0$ (and spans the bandwidth $-f_s/2\,\texttt{Hz}$ to $f_s/2\,\texttt{Hz}$ , $f_s$ being the sampling frequency). This is what you're accustomed to seeing in your book.
    • Because it is symmetric, the information you get when using the DFT is redundant: the negative part is the flipped version of the positive part. Therefore we usually discard the negative part (from $-f_s/2\,\texttt{Hz}$ to $0\,\texttt{Hz}$). This is what you're seeing in the frequency analysis window. The negative part has been discarded, and the $0\,\texttt{Hz}$ frequency is now at the left.
  1. Per the manual:

The amplitudes are normalized such that a $0\,\texttt{dB}$ sine (pure tone) will be (approximately) $0\,\texttt{dB}$ on the graph

A $0\,\texttt{dB}$ sine (pure tone) would be a sine wave with amplitude $2$ (going from $-1.0$ to $1.0$ on your time window). As such, $-11\,\texttt{dB}$ is your peak magnitude (at $47\,\texttt{Hz}$). $-90 \,\texttt{dB}$ is the lowest.

  1. Adding a little side-note here: the software isn't computing a straight FFT of the signal. It's computing a Power Spectrum by averaging spectra computed on successive time frames of size Size. You're using Size = 1024, i.e. calculating the FFT on $1024$ points. This will give you $f_s$ / $N_{FFT}$ $= 48000$ / $1024 = 46.875\,\texttt{Hz}$ of frequency resolution. This resolution is probably ok for your purposes, but if you want higher resolution, you can increase the size of each block FFT (to $2048$ for example).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.