Aist2010 03 Analysis
Aist2010 03 Analysis
VISUALIZATION
AIST2010 Lecture 3
Fourier Analysis Spectral Visualization MATLAB Programming
OUTLINE
AIST2010 L3 — AUDIO ANALYSIS AND VISUALIZATION 2
SUMMATION OF WAVES
Any continuous function, e.g. audio signal, can be expressed as a sum
of (infinite many) sinusoidal waves
Proved by French scientist and mathematician Jean Baptiste Fourier (1768–
1830)
Each sinusoidal wave has their
own amplitude and frequency
OTHER WAVEFORMS
Sawtooth wave
Sum of all harmonics, with each
decreasing in amplitude
Square wave
Sum of odd harmonics
Triangle wave Decomposing a square wave
Sum of odd harmonics, with a negative sign for alternating odd harmonics, and
each decreasing in amplitude
Some more animations of the square wave decomposition here: http://bilimneguzellan.net/fuyye-serisi/
ℱ 𝑔 𝑡 = 𝑔7 𝑓 = ∫9∈ℝ 𝑔 𝑡 𝑒 =>?@A9 𝑑𝑡
You may view it as counting the occurrence of frequencies in the waveform
Yet, this function for continuous 𝑓 and 𝑡 cannot be applied to digital
signals!
Read: https://betterexplained.com/articles/an-interactive-guide-to-the-fourier-transform/
for 0 ≤ 𝑘 ≤ 𝑁 − 1
Image from: https://blog.revolutionanalytics.com/2014/01/the-fourier-transform-explained-in-one-sentence.html
AIST2010 L3 — AUDIO ANALYSIS AND VISUALIZATION 9
DISCRETE FOURIER TRANSFORM (DFT)
NOPQR
=
𝑋# ≔ ∑J=H 𝑥
FM" F 𝑒 S
amp.
Waveform
The result is a spectrogram DFT DFT DFT DFT DFT DFT
(time domain)
Magnitude vs. frequency vs. time time
frame
Magnitude often represented in
DFT DFT DFT DFT DFT DFT
freq.
the colour dimension Spectrogram
coeff coeff coeff coeff coeff coeff (freq. domain)
time
amp.
DFT DFT DFT DFT DFT DFT DFT
The results fall into frequency bins of smaller range
time
The higher the frequency resolution, DFT DFT DFT DFT DFT DFT DFT
freq.
the lower the time resolution coeff coeff coeff coeff coeff coeff coeff
Basically it is a trade-off between time and frequency time
Hop size
AIST2010 L3 — AUDIO ANALYSIS AND VISUALIZATION 13
HOW TO READ THE PLOTS?
15
INVERSE OF THE FOURIER TRANSFORM
Rebuilding audio signal from the Fourier analysis data
Inverse DFT
From frequency domain back to time domain
Can easily be expressed in terms of the DFT
J=H J=H
=
>?@#F 1 >?@#F
𝑋# = g 𝑥F 𝑒 J 𝑥F = g 𝑋# 𝑒 J
𝑁
FM" #M"
Inverse STFT
Overlap-add (OLA) method
AIST2010 L3 — AUDIO ANALYSIS AND VISUALIZATION 16
CEPSTRUM
What would happen for a
Fourier transform in the
frequency domain?
Cepstrum: the patterns found in the
spectrum
Quefrency: a measure of time
related to the sampling rate in
time domain
Lifter: a filter in the cepstrum
(quefrency) domain
AIST2010 L3 — AUDIO ANALYSIS AND VISUALIZATION 17
Image from: https://sethares.engr.wisc.edu/vocoders/phasevocoder.html