Title: Electronic Music
1Electronic Music
2Phase Vocoder
- Aims
- To introduce the concept of analysis synthesis
methods - Learning Outcomes
- Short-Time Fourier transform (STFT)
- The application of the phase vocoder
3Introduction
- The phase vocoder is an analysis synthesis
technique that can also be realised as a
sophisticated effects box - Transforms signal into time-varying spectra.
These can be altered and a new signal synthesised.
4Basic Concept
- The Discrete Fourier Transform
- The Discrete Inverse Fourier Transform
is a time series
5Phase Vocoder
- Take a signal (i.e. a signal indexed by k)
- Apply short time, windowed DFTs (or FFTs) to
successive sections of length M - Hop every by s samples after each section
- Store DFTs an array index by integers m,l
6Short Time Fourier Transform
- This gives the Short Time Fourier Transform
- Where
- M is the window length
- s is the hop size
- l is an integer (0,1,2,.L)
- h is the impulse response of the window
- The STFT is for Xm,l for all l (and m)
- Note element of the STFT represents a frequency
Were fs is the sample rate
7In Matlab
clear all close all x,FS,NBITSwavread('bassoon.
wav') M4092 Window length sM/8 Hop
size sectionslength(x)/s - M/s Xzeros(M,sectio
ns) xwindowedzeros(M,1) for l0sections
xwindowedx((ls1)(lsM)) . hamming(M)
specabs(fft(xwindowed)) X(,l1)spec end
8Choosing Hop Size
- If hop size equals window size then half the
signal will be attenuated - If the overlap point corresponds to -3dB then the
subjective importance of any attenuation will be
very small. - Typically some fraction of window size, e.g. M/8
- Decimation Factor e.g. a decimation factor of 2
will have two overlaps in the window.
9Re-synthesis
- Put the musical signal back together again from
the STFTs
10Re-synthesis
- Inverse STFTs
- where is now the part of the new time
signal valid for frame l - And knit them all together with the overlap-add
method - Where is the final output signal
11Time expansion or compression without pitch
distortion
- Vary the value of s on playback
12Pitch shifting without time distortion
- Spectrum scaling - Multiply all fm by scale
factor (or by a function) - Pitch shifting important tool in recording studio
for correcting poor vocal performance
13Tricks with a phase vocoder Vary of recorded
sound
- Can modify the amplitude and frequency content of
the STFTs in pretty much anyway you like - E.g. the phase vocoder can act as a very flexible
and accurate filter by varying to amplitude of
the values in the frequency bins of the STFTs.
14Other creative applications
- Timbral interpolation from on instrument to
another by interpolating between STFTs - Cross-synthesis using a characteristic from one
sound (amp, freq or phase) to modulate a
characteristic from another.
15Analogy of Subtractive Synthesiser Vocoders
- Included with popular synths (Moogs, Korgs, etc)
- Array of analog band pass filters that take say a
voice signal and split it up into a range of
amplitudes corresponding to different frequencies
(a crude STFT). - These time varying amplitudes can then be used to
control another signal such as a synthesiser
timbre or an electric guitar sound. - ELOs Mr Blue Sky
16Parameters and choices
- Window size M larger means good freq resolution,
poor time resolution, long calculation time - Window type anything non-rectangular (Hamming,
Hanning, Blackman, etc) - FFT size Optimisation restricts to 2n e.g. 1024
- Hop size, s fraction of M e.g. sM/8 overlap
at -3dB points of window
17Improvements
- Window closing
- Repeat analysis of signal xk with smaller and
smaller window sizes - Tracking phase vocoder
- Find peaks in magnitude spectrum and attempt to
track these through successive spectra (producing
an envelop for each peak) discard other
magnitude information - Different Transforms
- Reduce effects of time/frequency trade off by
using another transform e.g. wavelet, Wigner
18Summary
- A phase vocoder can shift or scale a musical
spectrum, compress or expand signal duration and
interpolate timbres all independently of other
(unwanted) effects - The phase vocoder implements the STFT (and its
inverse), developed from the DFT - Understanding of the SFTF is essential for proper
control of a phase vocoder - The concept of the phase vocoder can be extended
by window closing, tracking or novel base
transforms