spectrum analysis sound analysissound analysis what are we going to do?what are we going to do?...
Post on 22-Dec-2015
232 views
TRANSCRIPT
Spectrum AnalysisSpectrum AnalysisSpectrum AnalysisSpectrum Analysis
• Sound AnalysisSound Analysis• What are we going to do?What are we going to do?
• Record a soundRecord a sound
recorded sound
analog-to-digitalconverter
samples
time-varyingFourier Analysis
amplitudes and phases• Analyze the soundAnalyze the sound
Additive Synthesis
resynthesized sound
• Resynthesize the soundResynthesize the sound
• Play a musical selection Play a musical selection demonstrating the instrument demonstrating the instrument designdesign
• Prepare the soundPrepare the sound
Spectrum AnalysisSpectrum AnalysisSpectrum AnalysisSpectrum Analysis
soundfile.wav PC.wav-formatsoundfile
pvan.exe
soundfile.pvn
interactive programfor spectrum analysis
analysis file withamplitudes and frequencies
pvan.exe
graphs ofspectra
interactive programfor spectrum display
Synthetic TrumpetSynthetic TrumpetSynthetic TrumpetSynthetic Trumpet• Real musical instruments produce Real musical instruments produce
almost-harmonic soundsalmost-harmonic sounds• The waveform of this synthetic trumpet The waveform of this synthetic trumpet
repeats more exactly than that of a real repeats more exactly than that of a real instrument instrument
Spectrum of a SoundSpectrum of a SoundSpectrum of a SoundSpectrum of a Sound
• For any periodic waveform, we can find the For any periodic waveform, we can find the spectrum of the waveform.spectrum of the waveform.
• The spectrum is the relative amplitudes of The spectrum is the relative amplitudes of the harmonics that make up the waveform.the harmonics that make up the waveform.• The plural form of the word "spectrum" is The plural form of the word "spectrum" is
"spectra.""spectra."
Spectrum of a SoundSpectrum of a SoundSpectrum of a SoundSpectrum of a Sound• Example: amp1 = 1, amp2 = .5, and amp3 = .25, Example: amp1 = 1, amp2 = .5, and amp3 = .25,
the spectrum = {1, .5, .25}.the spectrum = {1, .5, .25}.• The following graphs show the usual ways to The following graphs show the usual ways to
represent the spectrum:represent the spectrum:
Frequency Harmonic Number
Finding the Spectrum of a SoundFinding the Spectrum of a SoundFinding the Spectrum of a SoundFinding the Spectrum of a Sound
1.1. isolate one period of the waveformisolate one period of the waveform
2.2. Discrete Fourier Transform of the Discrete Fourier Transform of the period.period.
• These steps together are called These steps together are called spectrum analysis.spectrum analysis.
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis
• User specifies the User specifies the fundamental frequency for fundamental frequency for ONE toneONE tone• Automatically finding the Automatically finding the
fundamental frequency is fundamental frequency is called pitch tracking — a called pitch tracking — a current research problemcurrent research problem
• For example, for middle C:For example, for middle C:
ff11=261.6=261.6
sound
time-varyingFourier Analysis
Fourier Coefficients
Math
amplitudesand phases
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis• Construct a window function that spans two Construct a window function that spans two
periods of the waveform.periods of the waveform.• The most commonly used windows are called The most commonly used windows are called
Rectangular (basically no window), Hamming, Rectangular (basically no window), Hamming, Hanning, Kaiser and Blackman.Hanning, Kaiser and Blackman.
• Except for the Except for the Rectangular Rectangular window, most window, most look like half a look like half a period of a sine period of a sine wave:wave:
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis• The window function isolates the samples of The window function isolates the samples of
two periods so we can find the spectrum of two periods so we can find the spectrum of the sound.the sound.
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis• The window function will smooth samples at the The window function will smooth samples at the
window endpoints to correct the inaccurate user-window endpoints to correct the inaccurate user-specified fundamental frequency.specified fundamental frequency.• For example, if the user estimates fFor example, if the user estimates f11=261.6, but it really is =261.6, but it really is
259 Hz.259 Hz.
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis• Samples are only non-zero in windowed Samples are only non-zero in windowed
region, and windowed samples are zero at region, and windowed samples are zero at endpoints.endpoints.
Time-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier AnalysisTime-Varying Fourier Analysis• Apply window and Fourier Transform to Apply window and Fourier Transform to
successive blocks of windowed samples.successive blocks of windowed samples.• Slide blocks one period each time.Slide blocks one period each time.
Spectrum AnalysisSpectrum AnalysisSpectrum AnalysisSpectrum Analysis• We analyze the tone (using the Fourier transform) We analyze the tone (using the Fourier transform)
to find out the strength of the harmonic partialsto find out the strength of the harmonic partials• Here is a snapshot of a Here is a snapshot of a [i:37][i:37] trumpet tone one trumpet tone one
second after the start of the tonesecond after the start of the tone
Trumpet's First HarmonicTrumpet's First HarmonicTrumpet's First HarmonicTrumpet's First Harmonic• The trumpet's first harmonic fades in and out as The trumpet's first harmonic fades in and out as
shown in this amplitude envelope:shown in this amplitude envelope:
Spectral Plot of Trumpet's First Spectral Plot of Trumpet's First 20 Harmonics20 Harmonics
Spectral Plot of Trumpet's First Spectral Plot of Trumpet's First 20 Harmonics20 Harmonics
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:38][i:38] English horn: English horn:
pitch is E3, 164.8 Hertz
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:39][i:39] tenor voice: tenor voice:
pitch is G3, 192 Hertz
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:40][i:40] guitar: guitar:
pitch is A2, 110 Hertz
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:41][i:41] pipa: pipa:
pitch is G2, 98 Hertz
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:42][i:42] cello: cello:
pitch is Ab3, 208 Hertz
Spectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other InstrumentsSpectra of Other Instruments• [i:43][i:43] E-mu's synthesized cello: E-mu's synthesized cello:
pitch is G2, 98 Hertz