You are on page 1of 9

Spectral Audio Signal Processing

1 di 9

Home

Forums

Code Snippets

http://www.dsprelated.com/dspbooks/sasp/

Blogs

Books

Jobs

Papers

Links

Contact Us
Sign in

Spectral Audio Signal Processing


Chapter Contents:
Not a member? | Forgot your Password?
Search Spectral Audio Signal Processing
Search

Search Online Books

Book Index | Global Index


Would you like to be notified by email when Julius Orion
Smith III publishes a new entry into his blog?
Subscribe

Search tips

Free Online Books


Mathematics of DFT with Audio Applications
Introduction to Digital Filters
Physical Audio Signal Processing
Spectral Audio Signal Processing

SPECTRAL AUDIO SIGNAL PROCESSING


JULIUS O. SMITH III

Chapters
Preface
Spectrum Analysis of Sinusoids

Center for Computer Research in Music and Acoustics (CCRMA)


Department of Music, Stanford University, Stanford, California 94305 USA
March 2010 DRAFT

Fourier Transforms for Continuous/Discrete


Time/Frequency
Spectrum Analysis Windows
Spectral Interpolation
Spectrum Analysis of Noise

Preface
Acknowledgments
Book Series Overview

Time-Frequency Displays
Spectral Modeling Synthesis
Overlap-Add (OLA) STFT Processing

Introduction and Overview


Organization
Overview

The Filter Bank Summation (FBS) Interpretation


of the Short Time Fourier Transform (STFT)
Applications of the STFT

Elementary Spectrum Analysis


The Short-Time Fourier Transform (STFT) and Time-Frequency Displays
Short-Time Analysis, Modification, and Resynthesis
STFT Applications
Multirate Polyphase and Wavelet Filter Banks
Appendices

Multirate Polyphase Filter Banks


Wavelet Filter Banks
Notation
FIR Digital Filter Design
Gaussian Function Properties

Fourier Transforms and Theorems


Discrete Time Fourier Transform
Fourier Transform (FT) and Inverse
Existence of the Fourier Transform
Fourier Theorems for the DTFT
Linearity of the DTFT
Time Reversal
Symmetry of the DTFT for Real Signals
Real Even (or Odd) Signals
Shift Theorem
Convolution Theorem
Correlation Theorem
Autocorrelation
Power Theorem
Stretch Operator
Repeat (Scaling) Operator
Stretch/Repeat (Scaling) Theorem
Downsampling and Aliasing

Beginning Statistical Signal Processing


Bilinear Frequency-Warping for Audio Spectrum
Analysis over a Bark Frequency Scale
Examples in Matlab and Octave
References for Spectral Audio Modeling, By Topic
Bibliography
Index
About this document ...
FFT Spectral Analysis Software

Proof of Aliasing Theorem


Differentiation Theorem Dual
Continuous-Time Fourier Theorems
Scaling Theorem
Spectral Roll-Off
Spectral Interpolation

See Also

Ideal Spectral Interpolation


Interpolating a DFT
Zero Padding in the Time Domain
Practical Zero Padding
Zero-Phase Zero Padding
Matlab/Octave fftshift utility

Spectrum Analysis Windows


Rectangular Window
Generalized Hamming Window Family
Hann or Hanning or Raised Cosine
Matlab for the Hann Window
Hamming Window
Matlab for the Hamming Window

05/12/2013 16:39

Spectral Audio Signal Processing

2 di 9

http://www.dsprelated.com/dspbooks/sasp/

Summary of Generalized Hamming Windows


The MLT Sine Window
Blackman-Harris Window Family
Window Definition
Window Transform
Blackman Window Family
Classic Blackman
Matlab for the Classic Blackman Window
Three-Term Blackman-Harris Window
Frequency-Domain Blackman-Harris
Power-of-Cosine Window Family
Spectrum Analysis of an Oboe Tone
Rectangular-Windowed Oboe Recording
Hamming-Windowed Oboe Recording
Blackman-Windowed Oboe Recording
Conclusions
Bartlett (``Triangular'') Window
Matlab for the Bartlett Window:
Poisson Window
Hann-Poisson Window
Matlab for the Hann-Poisson Window
Slepian or DPSS Window
Matlab for the DPSS Window
Kaiser Window
Kaiser Window Beta Parameter
Kaiser Windows and Transforms
Minimum Frequency Separation vs. Window Length
Kaiser and DPSS Windows Compared
Dolph-Chebyshev Window
Matlab for the Dolph-Chebyshev Window
Example Chebyshev Windows and Transforms
Chebyshev and Hamming Windows Compared
Dolph-Chebyshev Window Theory
Chebyshev Polynomials
Dolph-Chebyshev Window Definition
Dolph-Chebyshev Window Main-Lobe Width
Dolph-Chebyshev Window Length Computation
Gaussian Window and Transform
Matlab for the Gaussian Window
Gaussian Window and Transform
Exact Discrete Gaussian Window
Optimized Windows
Optimal Windows for Audio Coding
General Rule
Optimal Window Design by linprog
Linear Programming (LP)
LP Formulation of Chebyshev Window Design
Symmetric Window Constraint
Positive Window Sample Constraint
DC Constraint
Sidelobe Specification
LP Standard Form
Normal Chebyshev Window
Remez Exchange Algorithm
Convergence of Remez Exchange
Monotonicity Constraint
Monotonic Chebyshev Window
L-Infinity Norm of Derivative Objective
L-One Norm of Derivative Objective
Spectrum Analysis of Sinusoids
Spectrum of a Sinusoid
Spectrum of Sampled Complex Sinusoid
Spectrum of a Windowed Sinusoid
Effect of Windowing
The Rectangular Window
Rectangular Window Side-Lobes
Frequency Resolution
Two Cosines (``In-Phase'' Case)
One Sine and One Cosine ``Phase Quadrature'' Case
Resolving Sinusoids
Other Definitions of Main Lobe Width
A Simple Sufficient Condition for Peak Resolution
Periodic Signals
Tighter Bounds for Minimum Window Length
Summary
Sinusoidal Peak Interpolation
Quadratic Interpolation of Spectral Peaks
Phase Interpolation at a Peak
Matlab for Parabolic Peak Interpolation
Bias of Parabolic Peak Interpolation
Optimal Peak-Finding in the Spectrum

05/12/2013 16:39

Spectral Audio Signal Processing

3 di 9

http://www.dsprelated.com/dspbooks/sasp/

Minimum Zero-Padding for High-Frequency Peaks


Minimum Zero-Padding for Low-Frequency Peaks
Matlab for Computing Minimum Zero-Padding Factors
Least Squares Sinusoidal Parameter Estimation
Sinusoidal Amplitude Estimation
Sinusoidal Amplitude and Phase Estimation
Sinusoidal Frequency Estimation
Maximum Likelihood Sinusoid Estimation
Likelihood Function
Multiple Sinusoids in Additive Gaussian White Noise
Non-White Noise
Generality of Maximum Likelihood Least Squares
Spectrum Analysis of Noise
Introduction to Noise
Why Analyze Noise?
What is Noise?
Spectral Characteristics of Noise
White Noise
Testing for White Noise
Sample Autocorrelation
Sample Power Spectral Density
Biased Sample Autocorrelation
Smoothed Power Spectral Density
Cyclic Autocorrelation
Practical Bottom Line
Why an Impulse is Not White Noise
The Periodogram
Matlab for the Periodogram
Welch's Method
Welch Autocorrelation Estimate
Resolution versus Stability
Welch's Method with Windows
Matlab for Welch's Method
Filtered White Noise
Example: FIR-Filtered White Noise
Example: Synthesis of 1/F Noise (Pink Noise)
Example: Pink Noise Analysis
Processing Gain
The Panning Problem
Time-Frequency Displays
The Short-Time Fourier Transform
Mathematical Definition of the STFT
Practical Computation of the STFT
Summary of STFT Computation Using the FFT
Two Dual Interpretations of the STFT
STFT in Matlab
Classic Spectrograms
Spectrogram of Speech
Audio Spectrograms
Auditory Filter Banks
Loudness Spectrogram
Loudness Spectrogram Examples
Multiresolution STFT
Excitation Pattern
Nonuniform Spectral Resampling
Specific Loudness
Spectrograms Compared
Instantaneous, Short-Term, and Long-Term Loudness
Summary
Overlap-Add STFT Processing
Convolution of Short Signals
Cyclic FFT Convolution
Acyclic FFT Convolution
Acyclic Convolution in Matlab or Octave
Pictorial View of Acyclic Convolution
Acyclic FFT Convolution in Matlab or Octave
FFT versus Direct Convolution
Audio FIR Filters
Example 1: Low-Pass Filtering by FFT Convolution
Example 2: Time Domain Aliasing
Convolving with Long Signals
Overlap-Add Decomposition
COLA Examples
STFT of COLA Decomposition
Acyclic Convolution
Example of Overlap-Add Convolution
Overlap-Add FFT Processing Summary
The STFT as a Time-Frequency Distribution
Time-Frequency Parameters in the STFT
Dual of Constant Overlap-Add

05/12/2013 16:39

Spectral Audio Signal Processing

4 di 9

http://www.dsprelated.com/dspbooks/sasp/

Poisson Summation Formula


Frequency-Domain COLA Constraints
Strong COLA
PSF Dual and Graphical Equalizers
PSF and Weighted Overlap Add
Example COLA Windows for WOLA
Overlap-Save Method
Time Varying OLA Modifications
Time-Varying STFT Modifications
Length L FIR Frame Filters
Weighted Overlap Add
WOLA Processing Steps
Choice of WOLA Window
Review of Zero Padding
Filter Bank View of the STFT
Dual Views of the STFT
Overlap-Add View of the STFT
Filter Bank View of the STFT
FBS and Perfect Reconstruction
STFT Filter Bank
Computational Examples in Matlab
The DFT Filter Bank
The Running-Sum Lowpass Filter
Modulation by a Complex Sinusoid
Making a Bandpass Filter from a Lowpass Filter
Uniform Running-Sum Filter Banks
System Diagram of the Running-Sum Filter Bank
DFT Filter Bank
Inverse DFT and the DFT Filter Bank Sum
FBS Window Constraints for R=1
Nyquist(N) Windows
Duality of COLA and Nyquist Conditions
Specific Windows
The Nyquist Property on the Unit Circle
Portnoff Windows
Downsampled STFT Filter Banks
Downsampled STFT Filter Bank
Filter Bank Reconstruction
Downsampling with Anti-Aliasing
Properly Anti-Aliasing Window Transforms
Hop Sizes for WOLA
Constant-Overlap-Add (COLA) Cases
Hamming Overlap-Add Example
Periodic-Hamming OLA from Poisson Summation Formula
Kaiser Overlap-Add Example
STFT with Modifications
FBS Fixed Modifications
Time Varying Modifications in FBS
STFT Summary and Conclusions
Overlap-Add
Filter Bank Summation
Applications of the STFT
Estimation from Sinusoidal Peaks
Useful Preprocessing
Getting Closer to Maximum Likelihood
References on
Estimation
Cross Synthesis
Spectral Envelope Extraction
Cepstral Windowing
Linear Prediction Spectral Envelope
Linear Prediction is Peak Sensitive
Linear Prediction Methods
Computation of Linear Prediction Coefficients
Linear Prediction Order Selection
Summary of LP Spectral Envelopes
Spectral Envelope Examples
Signal Synthesis
Spectral Envelope by the Cepstral Windowing Method
Spectral Envelope by Linear Prediction Method
Linear Prediction in Matlab and Octave
Sinusoidal Modeling of Sound
Additive Synthesis Overview
Additive Synthesis Analysis
Following Spectral Peaks
Sinusoidal Peak Finding
Tracking Sinusoidal Peaks in a Sequence of FFTs
Sines + Noise Modeling

05/12/2013 16:39

Spectral Audio Signal Processing

5 di 9

http://www.dsprelated.com/dspbooks/sasp/

Sines+Noise Analysis Procedure


Sines + Noise + Transients
Why Model Transients Separately?
Transient models
Time Scale Modification
Sines + Noise + Transients Models
Gaussian Windowed Chirps
Modulated Gaussian Windowed Chirp
Identifying Chirp Rate
Chirplet Frequency-Rate Estimation
Simulation Results
Time Scale Modification
TSM Using WOLA Phase Vocoder
Phase Continuation in a Time-Scaling Vocoder
More Recent Phase-Continuation Methods
Time-Scaling Phase Vocoder in Matlab
Example Vocoder Waveforms
References
FFT Filter Banks
Audio Filter Banks
Basic Idea
Summing STFT Bins
Inverse Transforming STFT Bin Groups
Improving the Channel Filters
Fast Octave Filter Banks
Spectral Rotation of Real Signals
Improving the Octave Band Filters
Aliasing on Downsampling
Restricting Aliasing to Stopbands
Optimal Band Filters
Pointers to Demos
Multirate Filter Banks
Upsampling and Downsampling
Upsampling (Stretch) Operator
Downsampling (Decimation) Operator
Example: Downsampling by 2
Example: Upsampling by 2
Filtering and Downsampling
Polyphase Filtering
Two-Channel Case
N-Channel Polyphase Decomposition
Type II Polyphase Decomposition
Filtering and Downsampling, Revisited
Multirate Noble Identities
Critically Sampled PR Filter Banks
Two-Channel Critically Sampled Filter Banks
Amplitude-Complementary 2-Channel Filter Bank
Haar Example
Polyphase Decomposition of Haar Example
Quadrature Mirror Filters (QMF)
Linear Phase Quadrature Mirror Filter Banks
Conjugate Quadrature Filters (CQF)
Orthogonal Two-Channel Filter Banks
Perfect Reconstruction Filter Banks
Simple Examples of Perfect Reconstruction
Sliding Polyphase Filter Bank
Hopping Polyphase Filter Bank
Sufficient Condition for Perfect Reconstruction (PR)
Necessary and Sufficient Conditions for PR
Polyphase View of the STFT
Polyphase View of the Overlap-Add STFT
Polyphase View of the Weighted-Overlap-Add STFT
Paraunitary Filter Banks
Paraconjugation
Lossless Filters
Lossless Filter Examples
Properties of Paraunitary Systems
Properties of Paraunitary Filter Banks
Paraunitary Examples
Filter Banks Equivalent to STFTs
Polyphase Analysis of Portnoff STFT
MPEG Filter Banks
Pseudo-QMF Cosine Modulation Filter Bank
Perfect Reconstruction Cosine Modulated Filter Banks
MPEG Layer III Filter Bank
Review of STFT Filterbanks
STFT, Rectangular Window, No Overlap
STFT, Rectangular Window, 50% Overlap
STFT, Triangular Window, 50% Overlap
STFT, Hamming Window, 75% Overlap
STFT, Kaiser Window, Beta=10, 90 % Overlap
Sliding FFT, Any Window, Zero-Padded by 5
Wavelet Filter Banks
Geometric Signal Theory

05/12/2013 16:39

Spectral Audio Signal Processing

6 di 9

http://www.dsprelated.com/dspbooks/sasp/

Natural Basis
Normalized DFT Basis for
Normalized Fourier Transform Basis
Normalized DTFT Basis
Normalized STFT Basis
Continuous Wavelet Transform
Discrete Wavelet Transform
Discrete Wavelet Filterbank
Dyadic Filter Banks
Dyadic Filter Bank Design
Generalized STFT
Further Reading
Summary and Conclusions
Notation
Frequency and Time
Signal Notation
Fourier Transform Notation
More Fourier Theorems
Continuous Fourier Theorems
Radians versus Cycles
Differentiation Theorem
Differentiation Theorem Dual
Scaling Theorem
Shift Theorem
Modulation Theorem (Shift Theorem Dual)
Convolution Theorem
Flip Theorems
Power Theorem
The Continuous-Time Impulse
Gaussian Pulse
Rectangular Pulse
Sinc Impulse
Impulse Trains
Poisson Summation Formula
Sampling Theory
The Uncertainty Principle
Second Moments
Time-Limited Signals
Time-Bandwidth Products are Unbounded Above
Relation of Smoothness to Roll-Off Rate
Statistical Signal Processing
Stochastic Processes
Probability Distribution
Independent Events
Random Variable
Stochastic Process
Stationary Stochastic Process
Expected Value
Mean
Sample Mean
Variance
Sample Variance
Correlation Analysis
Cross-Correlation
Cross-Power Spectral Density
Autocorrelation
Sample Autocorrelation
Power Spectral Density
Sample Power Spectral Density
White Noise
Making White Noise with Dice
Independent Implies Uncorrelated
Estimator Variance
Sample-Mean Variance
Sample-Variance Variance
Gaussian Function Properties
Gaussian Window and Transform
Gaussians Closed under Multiplication
Product of Two Gaussian PDFs
Gaussians Closed under Convolution
Fitting a Gaussian to Data
Infinite Flatness at Infinity
Integral of a Complex Gaussian
Area Under a Real Gaussian
Gaussian Integral with Complex Offset
Fourier Transform of Complex Gaussian
Alternate Proof
Why Gaussian?
Central Limit Theorem
Iterated Convolutions
Binomial Distribution
Boltzmann Energy Distribution in Potential Well
Gaussian Probability Density Function
Maximum Entropy Property
Entropy of a Probability Distribution
Example: Random Bit String
Maximum Entropy Distributions

05/12/2013 16:39

Spectral Audio Signal Processing

7 di 9

http://www.dsprelated.com/dspbooks/sasp/

Uniform Distribution
Exponential Distribution
Gaussian Distribution
Gaussian Moments
Gaussian Mean
Gaussian Variance
Higher Order Moments Revisited
Moment Theorem
Gaussian Characteristic Function
Gaussian Central Moments
Sums of Gaussian Random Variables
Uncertainty Principle
History of the Gaussian Function
FIR Digital Filter Design
The Ideal Lowpass Filter
Least-Squares Impulse Response Design
Examples
Frequency-Sampling FIR Design
The Window Method
Matlab Support for the Window Method
Online Demonstration of the Window Method
Bandpass Filter Design Example
Matlab code
Results
In case you don't have the Matlab Signal Processing Toolbox
Comparison to the Optimal Chebyshev FIR Bandpass Filter
Matlab code
Results
Hilbert Transform Design Example
Choice of Kaiser Window
Windowing an ``Ideal'' Impulse Response
Hilbert Transformer by the Window Method
Comparison to Optimal Chebyshev FIR Filter
Conclusions
Comparison to use of the hilbert function
Postlude on Hilbert Transform Theory
Generalized Window Method
Minimum Phase Filter Design
Minimum Phase and Causal Cepstra
Optimal FIR Digital Filter Design
Filter Specifications
Ideal Lowpass Filter Revisited
Optimal Least-Squares Filters
Optimal Chebyshev Filters
Lp norms
Special cases
Filter Design using Lp Norms
Least-Squares Linear-Phase FIR Filter Design
Matrix Formulation: Optimal
Design, Cont'd
Least Squares Optimization
Geometrical Interpretation of Least Squares
Matlab Support for Least-Squares FIR Filter Design
Chebyshev Optimal Linear Phase filter Design
More General Real FIR Filters
Complex FIR Filter Design
Related Paper
Arbitrary FIR Magnitude and Phase Specification
Second-Order Cone Problems (SOCP)
Nonlinear Optimization in Octave
Bilinear Audio Frequency Warping
Introduction
Bilinear Transform Frequency Warping
``Allpass'' Frequency Warping
Section Outline
The Bark Frequency Scale
The Bilinear Transform
Optimal Bark Warping
Computing
Optimal Frequency Warpings
Relative Bandwidth Mapping Error
Error Significance
Arctangent Approximations for
Filter Design Example
Equivalent Rectangular Bandwidth
Relative Bandwidth Mapping Error
Arctangent Approximations for

, ERB Case

Directions for Improvements


Summary
Simple Approximations to Various Frequency Warpings
Examples in Matlab and Octave
Matlab for Spectrum Analysis Windows
Blackman Window Example
Matlab listing: dpssw.m

05/12/2013 16:39

Spectral Audio Signal Processing

8 di 9

http://www.dsprelated.com/dspbooks/sasp/

Interpolating Spectral Peaks


Matlab listing: findpeaks.m
Matlab listing: maxr.m
Matlab listing: qint.m
Matlab listing: zpfmin.m
Matlab listing: oboeanal.m
Matlab for Computing Spectrograms
Matlab listing: myspectrogram.m
Matlab listing: invmyspectrogram.m
Matlab listing: testmyspectrogram.m
Matlab for Unwrapping Spectral Phase
Matlab listing: unwrap.m
Non-Parametric Frequency Warping
Ideal Spectral Interpolation
Fundamental Frequency Estimation
Test Program for F0 Estimation
Spectral Audio Modeling History
Daniel Bernoulli's Modal Decomposition
The Telharmonium
Early Additive Synthesis in Film Making
The Hammond Organ
Dudley's Channel Vocoder
Voder
Phase Vocoder
FFT Implementation of the Phase Vocoder
Phase Vocoder Applications
Additive Synthesis
Oscillator-Bank Resynthesis
Inverse FFT Synthesis
Chirplet Synthesis
Nonparametric Spectral Peak Modeling
Efficient Specialized Methods
Wavetable Synthesis
Group-Additive Synthesis
Further Reading, Additive Synthesis
Frequency Modulation (FM) Synthesis
FM Harmonic Amplitudes
FM Brass
FM Voice
Further Reading about FM Synthesis
Phase Vocoder Sinusoidal Modeling
Computing Vocoder Parameters
Frequency Envelopes
Envelope Compression
Vocoder-Based Additive-Synthesis Limitations
Further Reading on Vocoders
Speech Synthesis Examples
Spectral Modeling Synthesis
Short Time Fourier Analysis/Modification/Resynthesis
Sinusoidal Modeling Systems
Inverse FFT Synthesis
Sines+Noise Synthesis
Multiresolution Sinusoidal Modeling
Transient Models
S+N+T Sound Examples
Time-Frequency Reassignment
Perceptual Audio Compression
TSM of Sinusoidal Models
Further Reading
Perceptual audio coding
Future Prospects
The PARSHL Program
Choice of Hop Size
Filling the FFT Input Buffer (Step 2)
Peak Detection (Steps 3 and 4)
Peak Matching (Step 5)
Parameter Modifications (Step 6)
Synthesis (Step 7)
Magnitude-only Analysis/Synthesis
Preprocessing
Applications
Conclusions
Acknowledgments
Software Listing
Bibliography
Index for this Document
About this document ...
Previous:
Next: Preface

Order a Hardcopy of Spectral Audio Signal Processing


About the Author: Julius Orion Smith III
Julius Smith's background is in electrical engineering (BS Rice 1975, PhD Stanford 1983). He is presently Professor of

05/12/2013 16:39

Spectral Audio Signal Processing

9 di 9

http://www.dsprelated.com/dspbooks/sasp/

Music and Associate Professor (by courtesy) of Electrical Engineering at Stanford's Center for Computer Research in
Music and Acoustics (CCRMA), teaching courses and pursuing research related to signal processing applied to music
and audio systems. See http://ccrma.stanford.edu/~jos/ for details.

Comments
Yurizo wrote:

6/18/2012

Sir ....the knowledge you have put into these books are so rare...i mean something related to electronics and music and maths....very
rare...i am currently doing my final year project(Electronics) on this sort of thing...for a drum......Thank you again....

Add a Comment

You need to login before you can post a comment (best way to prevent spam). ( Not a member?
)

DSP Related Home

Discussion Groups

Code Snippets

Blogs

Articles

DSP Books

privacy policy

Contact

05/12/2013 16:39

You might also like