Introduction to Sound Processing - Davide Rocchesso.pdf

(3492 KB) Pobierz
256466817 UNPDF
Introduction to
Sound Processing
Davide Rocchesso 1
1
Università di Verona
Dipartimento di Informatica
email: D.Rocchesso@computer.org
256466817.001.png
Copyright c 2003 Davide Rocchesso. Permission is granted to
copy, distribute and/or modify this document under the terms of
the GNU Free Documentation License, Version 1.2 or any later
version published by the Free Software Foundation; with no In-
variant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the appendix entitled “GNU
Free Documentation License”.
The book is accessible from the author’s web site: http://www.scienze.univr.it/˜rocchess.
The book is listed in http://www.theassayer.org , where reviews can be posted.
ISBN 88-901126-1-1
Cover Design: Claudia Calvaresi.
Editorial Production Staff: Federico Fontana, Alessandra Ceccherelli,
Nicola Giosmin, Anna Meo.
Produced from L A T E X text sources and PostScript and TIFF images.
Compiled with VT E X/free.
Online distributed in Portable Document Format.
Printed and bound in Italy by PHASAR Srl, Firenze.
Contents
1 Systems, Sampling and Quantization 1
1.1 Continuous-Time Systems . . . . . . . . . . . . . . . . . . . 1
1.2 The Sampling Theorem . . . . . . . . . . . . . . . . . . . . . 3
1.3 Discrete-Time Spectral Representations . . . . . . . . . . . . 6
1.4 Discrete-Time Systems . . . . . . . . . . . . . . . . . . . . . 11
1.4.1 The Impulse Response . . . . . . . . . . . . . . . . . 12
1.4.2 The Shift Theorem . . . . . . . . . . . . . . . . . . . 13
1.4.3 Stability and Causality . . . . . . . . . . . . . . . . . 14
1.5 Continuous-time to discrete-time system
conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.5.1 Impulse Invariance . . . . . . . . . . . . . . . . . . . 15
1.5.2 Bilinear Transformation . . . . . . . . . . . . . . . . 17
1.6 Quantization . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2 Digital Filters 23
2.1 FIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
2.1.1 The Simplest FIR Filter . . . . . . . . . . . . . . . . 24
2.1.2 The Phase Response . . . . . . . . . . . . . . . . . . 29
2.1.3 Higher-Order FIR Filters . . . . . . . . . . . . . . . 32
2.1.4 Realizations of FIR Filters . . . . . . . . . . . . . . . 40
2.2 IIR Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
2.2.1 The Simplest IIR Filter . . . . . . . . . . . . . . . . 44
2.2.2 Higher-Order IIR Filters . . . . . . . . . . . . . . . . 47
2.2.3 Allpass Filters . . . . . . . . . . . . . . . . . . . . . 55
2.2.4 Realizations of IIR Filters . . . . . . . . . . . . . . . 58
2.3 Complementary filters and filterbanks . . . . . . . . . . . . . 62
2.4 Frequency warping . . . . . . . . . . . . . . . . . . . . . . . 64
i
ii
D. Rocchesso: Sound Processing
3 Delays and Effects 67
3.1 The Circular Buffer . . . . . . . . . . . . . . . . . . . . . . . 67
3.2 Fractional-Length Delay Lines . . . . . . . . . . . . . . . . . 68
3.2.1 FIR Interpolation Filters . . . . . . . . . . . . . . . . 69
3.2.2 Allpass Interpolation Filters . . . . . . . . . . . . . . 72
3.3 The Non-Recursive Comb Filter . . . . . . . . . . . . . . . . 74
3.4 The Recursive Comb Filter . . . . . . . . . . . . . . . . . . . 76
3.4.1 The Comb-Allpass Filter . . . . . . . . . . . . . . . 78
3.5 Sound Effects Based on Delay Lines . . . . . . . . . . . . . . 79
3.6 Spatial sound processing . . . . . . . . . . . . . . . . . . . . 81
3.6.1 Spatialization . . . . . . . . . . . . . . . . . . . . . . 81
3.6.2 Reverberation . . . . . . . . . . . . . . . . . . . . . . 89
4 Sound Analysis 99
4.1 Short-Time Fourier Transform . . . . . . . . . . . . . . . . . 99
4.1.1 The Filterbank View . . . . . . . . . . . . . . . . . . 99
4.1.2 The DFT View . . . . . . . . . . . . . . . . . . . . . 100
4.1.3 Windowing . . . . . . . . . . . . . . . . . . . . . . . 103
4.1.4 Representations . . . . . . . . . . . . . . . . . . . . . 108
4.1.5 Accurate partial estimation . . . . . . . . . . . . . . . 110
4.2 Linear predictive coding (with Federico Fontana) . . . . . . . . 113
5 Sound Modelling 117
5.1 Spectral modelling . . . . . . . . . . . . . . . . . . . . . . . 117
5.1.1 The sinusoidal model . . . . . . . . . . . . . . . . . . 117
5.1.2 Sines + Noise + Transients . . . . . . . . . . . . . . . 122
5.1.3 LPC Modelling . . . . . . . . . . . . . . . . . . . . . 123
5.2 Time-domain models . . . . . . . . . . . . . . . . . . . . . . 124
5.2.1 The Digital Oscillator . . . . . . . . . . . . . . . . . 124
5.2.2 The Wavetable Oscillator . . . . . . . . . . . . . . . . 125
5.2.3 Wavetable sampling synthesis . . . . . . . . . . . . . 128
5.2.4 Granular synthesis (with Giovanni De Poli) . . . . . . . 129
5.3 Nonlinear models . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3.1 Frequency and phase modulation . . . . . . . . . . . . 130
5.3.2 Nonlinear distortion . . . . . . . . . . . . . . . . . . 135
5.4 Physical models . . . . . . . . . . . . . . . . . . . . . . . . . 136
5.4.1 A physical oscillator . . . . . . . . . . . . . . . . . . 137
5.4.2 Coupled oscillators . . . . . . . . . . . . . . . . . . . 138
5.4.3 One-dimensional distributed resonators . . . . . . . . 140
iii
A Mathematical Fundamentals 145
A.1 Classes of Numbers . . . . . . . . . . . . . . . . . . . . . . . 145
A.1.1 Fields . . . . . . . . . . . . . . . . . . . . . . . . . . 145
A.1.2 Rings . . . . . . . . . . . . . . . . . . . . . . . . . . 146
A.1.3 Complex Numbers . . . . . . . . . . . . . . . . . . . 147
A.2 Variables and Functions . . . . . . . . . . . . . . . . . . . . . 148
A.3 Polynomials . . . . . . . . . . . . . . . . . . . . . . . . . . . 152
A.4 Vectors and Matrices . . . . . . . . . . . . . . . . . . . . . . 154
A.4.1 Square Matrices . . . . . . . . . . . . . . . . . . . . 158
A.5 Exponentials and Logarithms . . . . . . . . . . . . . . . . . 158
A.6 Trigonometric Functions . . . . . . . . . . . . . . . . . . . . 161
A.7 Derivatives and Integrals . . . . . . . . . . . . . . . . . . . . 164
A.7.1 Derivatives of Functions . . . . . . . . . . . . . . . . 164
A.7.2 Integrals of Functions . . . . . . . . . . . . . . . . . 168
A.8 Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
A.8.1 The Laplace Transform . . . . . . . . . . . . . . . . 170
A.8.2 The Fourier Transform . . . . . . . . . . . . . . . . . 171
A.8.3 The Z Transform . . . . . . . . . . . . . . . . . . . . 172
A.9 Computer Arithmetics . . . . . . . . . . . . . . . . . . . . . 173
A.9.1 Integer Numbers . . . . . . . . . . . . . . . . . . . . 173
A.9.2 Rational Numbers . . . . . . . . . . . . . . . . . . . 175
B Tools for Sound Processing
(with Nicola Bernardini) 177
B.1 Sounds in Matlab and Octave . . . . . . . . . . . . . . . . . . 178
B.1.1 Digression . . . . . . . . . . . . . . . . . . . . . . . 179
B.2 Languages for Sound Processing . . . . . . . . . . . . . . . . 182
B.2.1 Unit generator . . . . . . . . . . . . . . . . . . . . . 185
B.2.2 Examples in Csound, SAOL, and CLM . . . . . . . . 186
B.3 Interactive Graphical Building Environments . . . . . . . . . 192
B.3.1 Examples in ARES/MARS and pd . . . . . . . . . . 193
B.4 Inline sound processing . . . . . . . . . . . . . . . . . . . . . 195
B.4.1 Time-Domain Graphical Editing and Processing . . . 196
B.4.2 Analysis/Resynthesis Packages . . . . . . . . . . . . 198
B.5 Structure of a Digital Signal Processor . . . . . . . . . . . . . 200
B.5.1 Memory Management . . . . . . . . . . . . . . . . . 202
B.5.2 Internal Arithmetics . . . . . . . . . . . . . . . . . . 203
B.5.3 The Pipeline . . . . . . . . . . . . . . . . . . . . . . 205
Zgłoś jeśli naruszono regulamin