DAFX: Digital Audio Effects
Second Edition
DAFX: Digital Audio Effects, S econd Edition. Edited by U do Z ¨olzer.
© 2011 J ohn Wiley & Sons , Ltd. P ublis hed 2011 by J ohn Wiley & Sons , Ltd. ISBN: 978-0-470-66599-2
DAFX: Digital Audio Effects
Second Edition
Edited by
Udo Z¨olzer
Helmut Schmidt University – University of the Federal Armed Forces,
Hamburg, Germany
A John Wiley and Sons, Ltd., Publication
This edition first published 2011
© 2011 John Wiley & Sons Ltd
Registered office
John Wiley & Sons Ltd, The Atrium, Southern Gate, Chichester, West Sussex, PO19 8SQ, United Kingdom
For details of our global editorial offices, for customer services and for information about how to apply for permission
to reuse the copyright material in this book please see our website at www.wiley.com.
The right of the author to be identified as the author of this work has been asserted in accordance with the Copyright,
Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any
form or by any means, electronic, mechanical, photocopying, recording or otherwise, except as permitted by the UK
Copyright, Designs and Patents Act 1988, without the prior permission of the publisher.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available
in electronic books.
Designations used by companies to distinguish their products are often claimed as trademarks. All brand names and
product names used in this book are trade names, service marks, trademarks or registered trademarks of their respective
owners. The publisher is not associated with any product or vendor mentioned in this book. This publication is designed
to provide accurate and authoritative information in regard to the subject matter covered. It is sold on the understanding
that the publisher is not engaged in rendering professional services. If professional advice or other expert assistance is
required, the services of a competent professional should be sought.
MATLAB® is a trademark of The MathWorks, Inc. and is used with permission. The MathWorks does not warrant the
accuracy of the text or exercises in this book. This book’s use or discussion of MATLAB® software or related products
does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use
of the MATLAB® software.
Library of Congress Cataloguing-in-Publication Data
Z¨olzer, Udo.
DAFX : digital audio effects / Udo Z¨olzer. – 2nd ed.
p. cm.
Includes bibliographical references and index.
ISBN 978-0-470-66599-2 (hardback)
1. Computer sound processing. 2. Sound–Recording and reproducing–Digital techniques.
3. Signal processing–Digital techniques. I. Title.
TK5105.8863.Z65 2011
006.5 – dc22
2010051411
A catalogue record for this book is available from the British Library.
Print ISBN: 978-0-470-66599-2 [HB]
e-PDF ISBN: 978-1-119-99130-4
o-Book ISBN: 978-1-119-99129-8
e-Pub ISBN: 978-0-470-97967-9
Typeset in 9/11pt Times by Laserwords Private Limited, Chennai, India
Contents
Preface
List of Contributors
1 Introduction
V. Verfaille, M. Holters and U. Z¨olzer
1.1 Digital audio effects DAFX with MATLAB®
1.2 Classifications of DAFX
1.2.1 Classification based on underlying techniques
1.2.2 Classification based on perceptual attributes
1.2.3
Interdisciplinary classification
1.3 Fundamentals of digital signal processing
1.3.1 Digital signals
1.3.2 Spectrum analysis of digital signals
1.3.3 Digital systems
1.4 Conclusion
References
2 Filters and delays
P. Dutilleux, M. Holters, S. Disch and U. Z¨olzer
2.1
Introduction
2.2 Basic filters
2.2.1 Filter classification in the frequency domain
2.2.2 Canonical filters
2.2.3 State variable filter
2.2.4 Normalization
2.2.5 Allpass-based filters
2.2.6 FIR filters
2.2.7 Convolution
2.3 Equalizers
2.3.1 Shelving filters
2.3.2 Peak filters
2.4 Time-varying filters
2.4.1 Wah-wah filter
2.4.2 Phaser
2.4.3 Time-varying equalizers
xiii
xv
1
1
3
5
7
14
20
20
23
33
42
43
47
47
48
48
48
50
51
52
57
60
61
62
64
67
67
68
69
vi
CONTENTS
2.5 Basic delay structures
2.5.1 FIR comb filter
2.5.2
IIR comb filter
2.5.3 Universal comb filter
2.5.4 Fractional delay lines
2.6 Delay-based audio effects
2.6.1 Vibrato
2.6.2 Flanger, chorus, slapback, echo
2.6.3 Multiband effects
2.6.4 Natural sounding comb filter
2.7 Conclusion
Sound and music
References
3 Modulators and demodulators
P. Dutilleux, M. Holters, S. Disch and U. Z¨olzer
3.1
Introduction
3.2 Modulators
3.2.1 Ring modulator
3.2.2 Amplitude modulator
3.2.3 Single-side-band modulator
3.2.4 Frequency and phase modulator
3.3 Demodulators
3.3.1 Detectors
3.3.2 Averagers
3.3.3 Amplitude scalers
3.3.4 Typical applications
3.4 Applications
3.4.1 Vibrato
3.4.2 Stereo phaser
3.4.3 Rotary loudspeaker effect
3.4.4 SSB effects
3.4.5 Simple morphing: amplitude following
3.4.6 Modulation vocoder
3.5 Conclusion
Sound and music
References
4 Nonlinear processing
P. Dutilleux, K. Dempwolf, M. Holters and U. Z¨olzer
4.1
Introduction
4.1.1 Basics of nonlinear modeling
4.2 Dynamic range control
4.2.1 Limiter
4.2.2 Compressor and expander
4.2.3 Noise gate
4.2.4 De-esser
4.2.5
Infinite limiters
4.3 Musical distortion and saturation effects
4.3.1 Valve simulation
4.3.2 Overdrive, distortion and fuzz
70
70
71
72
73
75
75
76
78
79
79
80
80
83
83
83
83
84
86
86
90
90
90
91
91
92
92
92
93
94
94
96
97
98
98
101
101
103
106
109
110
113
115
115
115
115
124
CONTENTS
vii
4.3.3 Harmonic and subharmonic generation
4.3.4 Tape saturation
4.4 Exciters and enhancers
4.4.1 Exciters
4.4.2 Enhancers
4.5 Conclusion
Sound and music
References
5 Spatial effects
V. Pulkki, T. Lokki and D. Rocchesso
5.1
5.2 Concepts of spatial hearing
Introduction
5.2.1 Head-related transfer functions
5.2.2 Perception of direction
5.2.3 Perception of the spatial extent of the sound source
5.2.4 Room effect
5.2.5 Perception of distance
5.3 Basic spatial effects for stereophonic loudspeaker and headphone playback
5.3.1 Amplitude panning in loudspeakers
5.3.2 Time and phase delays in loudspeaker playback
5.3.3 Listening to two-channel stereophonic material with headphones
5.4 Binaural techniques in spatial audio
5.4.1 Listening to binaural recordings with headphones
5.4.2 Modeling HRTF filters
5.4.3 HRTF processing for headphone listening
5.4.4 Virtual surround listening with headphones
5.4.5 Binaural techniques with cross-talk canceled loudspeakers
5.5 Spatial audio effects for multichannel loudspeaker layouts
2-D loudspeaker setups
3-D loudspeaker setups
5.5.1 Loudspeaker layouts
5.5.2
5.5.3
5.5.4 Coincident microphone techniques and Ambisonics
5.5.5 Synthesizing the width of virtual sources
5.5.6 Time delay-based systems
5.5.7 Time-frequency processing of spatial audio
5.6 Reverberation
5.6.1 Basics of room acoustics
5.6.2 Convolution with room impulse responses
5.7 Modeling of room acoustics
5.7.1 Classic reverb tools
5.7.2 Feedback delay networks
5.7.3 Time-variant reverberation
5.7.4 Modeling reverberation with a room geometry
5.8 Other spatial effects
5.8.1 Digital versions of classic reverbs
5.8.2 Distance effects
5.8.3 Doppler effect
5.9 Conclusion
Acknowledgements
References
130
132
132
132
135
135
137
137
139
139
140
140
140
141
142
142
143
143
145
147
147
147
148
149
150
151
153
153
154
156
157
159
160
161
164
164
164
166
166
169
173
173
175
175
176
178
179
180
180
viii
CONTENTS
6 Time-segment processing
Introduction
P. Dutilleux, G. De Poli, A. von dem Knesebeck and U. Z¨olzer
6.1
6.2 Variable speed replay
6.3 Time stretching
6.3.1 Historical methods – Phonog`ene
6.3.2 Synchronous overlap and add (SOLA)
6.3.3 Pitch-synchronous overlap and add (PSOLA)
6.4 Pitch shifting
6.4.1 Historical methods – Harmonizer
6.4.2 Pitch shifting by time stretching and resampling
6.4.3 Pitch shifting by delay-line modulation
6.4.4 Pitch shifting by PSOLA and formant preservation
6.5 Time shuffling and granulation
6.5.1 Time shuffling
6.5.2 Granulation
6.6 Conclusion
Sound and music
References
7 Time-frequency processing
D. Arfib, F. Keiler, U. Z¨olzer, V. Verfaille and J. Bonada
7.1
7.2 Phase vocoder basics
Introduction
7.2.1 Filter bank summation model
7.2.2 Block-by-block analysis/synthesis model
7.3 Phase vocoder implementations
7.3.1 Filter bank approach
7.3.2 Direct FFT/IFFT approach
7.3.3 FFT analysis/sum of sinusoids approach
7.3.4 Gaboret approach
7.3.5 Phase unwrapping and instantaneous frequency
7.4 Phase vocoder effects
7.4.1 Time-frequency filtering
7.4.2 Dispersion
7.4.3 Time stretching
7.4.4 Pitch shifting
7.4.5 Stable/transient components separation
7.4.6 Mutation between two sounds
7.4.7 Robotization
7.4.8 Whisperization
7.4.9 Denoising
7.4.10 Spectral panning
7.5 Conclusion
References
8 Source-filter processing
Introduction
D. Arfib, F. Keiler, U. Z¨olzer and V. Verfaille
8.1
8.2 Source-filter separation
8.2.1 Channel vocoder
8.2.2 Linear predictive coding (LPC)
185
185
186
189
190
191
194
199
200
201
203
205
210
210
211
215
215
215
219
219
219
221
224
226
226
232
235
237
241
243
243
247
249
258
263
265
268
270
271
274
276
277
279
279
280
281
283
8.2.3 Cepstrum
8.3 Source-filter transformations
8.3.1 Vocoding or cross-synthesis
8.3.2 Formant changing
8.3.3 Spectral interpolation
8.3.4 Pitch shifting with formant preservation
8.4 Conclusion
References
9 Adaptive digital audio effects
V. Verfaille, D. Arfib, F. Keiler, A. von dem Knesebeck and U. Z¨olzer
9.1
9.2 Sound-feature extraction
Introduction
9.2.1 General comments
9.2.2 Loudness-related sound features
9.2.3 Time features: beat detection and tracking
9.2.4 Pitch extraction
9.2.5 Spatial hearing cues
9.2.6 Timbral features
9.2.7 Statistical features
9.3 Mapping sound features to control parameters
9.3.1 The mapping structure
9.3.2 Sound-feature combination
9.3.3 Control-signal conditioning
9.4 Examples of adaptive DAFX
9.4.1 Adaptive effects on loudness
9.4.2 Adaptive effects on time
9.4.3 Adaptive effects on pitch
9.4.4 Adaptive effects on timbre
9.4.5 Adaptive effects on spatial perception
9.4.6 Multi-dimensional adaptive effects
9.4.7 Concatenative synthesis
9.5 Conclusions
References
10 Spectral processing
J. Bonada, X. Serra, X. Amatriain and A. Loscos
10.1 Introduction
10.2 Spectral models
10.2.1 Sinusoidal model
10.2.2 Sinusoidal plus residual model
10.3 Techniques
10.3.1 Short-time fourier transform
10.3.2 Spectral peaks
10.3.3 Spectral sinusoids
10.3.4 Spectral harmonics
10.3.5 Spectral harmonics plus residual
10.3.6 Spectral harmonics plus stochastic residual
10.4 Effects
10.4.1 Sinusoidal plus residual
10.4.2 Harmonic plus residual
10.4.3 Combined effects
CONTENTS
ix
290
300
300
306
312
314
319
320
321
321
324
324
328
331
335
360
361
369
369
369
370
371
371
371
372
376
377
380
382
384
388
388
393
393
395
395
396
397
397
402
404
411
416
419
424
424
430
436