A spectrogram is a graphical representation of a sound signal that shows the evolution of frequencies over time. The horizontal axis represents time, the vertical axis represents frequencies, and intensity is encoded by color or brightness. The microphone of a smartphone or a computer is enough to draw one with FizziQ.
Discover FizziQ
How to measure it in class
With the FizziQ app, the spectrogram allows you to analyze any sound in real time.
Steps:
- Open FizziQ and select the “Spectrogram” instrument
- Produce a sound (voice, instrument, whistle) in front of the microphone
- Observe the scrolling: each vertical band corresponds to an instant
- Identify the frequencies present (horizontal bands = pure tones, complex patterns = rich sounds)
- Compare different sounds: vowels, sustained notes, glissandos
Scientific activities on this topic
- Analyze vowels and their formants: https://www.fizziq.org/en/activities/vowels/
- Study bird songs: https://www.fizziq.org/en/activities/bird-songs/
- Compare the timbres of different instruments
- Visualize the harmonics of a vibrating string
Learn more
How is it calculated?
The spectrogram is constructed by applying a fast Fourier transform (FFT) to short successive segments of the signal. Each FFT gives the instantaneous spectrum (the frequencies present at that moment). By aligning these spectra side by side, we obtain the spectrogram.
Reading the spectrogram:
- Horizontal lines: stable frequencies (sustained note, vowel)
- Rising diagonal lines: sound rising in frequency (siren, glissando)
- Falling diagonal lines: sound descending
- Wide bands: noise (all frequencies present)
- Parallel lines: harmonics of a musical sound
Applications:
- Bioacoustics: species identification by their calls
- Phonetics: speech analysis, accents
- Music: visualization of harmonics, tuning
- Medical diagnosis: pathological voice analysis
Formula
The spectrogram S(t,f) can be expressed as:
S(t,f) = |STFT(x)|^2
where STFT is the short-time Fourier transform:
STFT(t,f) = integral of x(tau) x w(tau-t) x e^(-2piiftau) d(tau)
with:
- x(tau): sound signal
- w(tau-t): analysis window (Hanning, Hamming…)
- f: analyzed frequency
Application examples
- A sung “a” shows several parallel harmonics with reinforced formants
- A blackbird’s song reveals melodic patterns characteristic of the species
- A siren draws an undulating diagonal line
- Background noise appears as uniform “fog”
FAQ
Q: What is the difference between a spectrum and a spectrogram? A: The spectrum shows the frequencies present at a given instant (a single vertical “slice”). The spectrogram shows the evolution of the spectrum over time (a stack of spectra).
Q: Why is the image sometimes blurry? A: It’s the time-frequency uncertainty principle: you cannot have perfect resolution in time AND frequency simultaneously. FizziQ optimizes this trade-off.
Q: How do you identify a bird with the spectrogram? A: Each species has a characteristic “signature”: frequency range, melodic patterns, rhythm. With practice, you recognize species like you recognize faces.
Related concepts
Fourier transform - Frequency - Sound spectrum - Harmonics - Formants - Acoustic analysis