Audio Effects
Theory, Implementation
and Application
Joshua D. Reiss
Andrew P. McPherson
Audio Effects
Theory, Implementation
and Application
Joshua D. Reiss
Queen Mary University of London, United Kingdom
Andrew P. McPherson
Queen Mary University of London, United Kingdom
Boca Raton London New York
CRC Press is an imprint of the
Taylor & Francis Group, an informa business
CRC Press
Taylor & Francis Group
6000 Broken Sound Parkway NW, Suite 300
Boca Raton, FL 33487-2742
© 2015 by Taylor & Francis Group, LLC
CRC Press is an imprint of Taylor & Francis Group, an Informa business
No claim to original U.S. Government works
Version Date: 20140911
International Standard Book Number-13: 978-1-4665-6029-1 (eBook - PDF)
This book contains information obtained from authentic and highly regarded sources. Reasonable efforts
have been made to publish reliable data and information, but the author and publisher cannot assume
responsibility for the validity of all materials or the consequences of their use. The authors and publishers
have attempted to trace the copyright holders of all material reproduced in this publication and apologize to
copyright holders if permission to publish in this form has not been obtained. If any copyright material has
not been acknowledged please write and let us know so we may rectify in any future reprint.
Except as permitted under U.S. Copyright Law, no part of this book may be reprinted, reproduced, transmit-
ted, or utilized in any form by any electronic, mechanical, or other means, now known or hereafter invented,
including photocopying, microfilming, and recording, or in any information storage or retrieval system,
without written permission from the publishers.
For permission to photocopy or use material electronically from this work, please access www.copyright.
com (http://www.copyright.com/) or contact the Copyright Clearance Center, Inc. (CCC), 222 Rosewood
Drive, Danvers, MA 01923, 978-750-8400. CCC is a not-for-profit organization that provides licenses and
registration for a variety of users. For organizations that have been granted a photocopy license by the CCC,
a separate system of payment has been arranged.
Trademark Notice: Product or corporate names may be trademarks or registered trademarks, and are used
only for identification and explanation without intent to infringe.
Visit the Taylor & Francis Web site at
http://www.taylorandfrancis.com
and the CRC Press Web site at
http://www.crcpress.com
Contents
Preface ......................................................................................................................ix
About the Authors .............................................................................................. xiii
1. Introduction and Fundamentals ..................................................................1
Understanding Sound and Digital Audio ....................................................1
Working with Decibels ...............................................................................4
Level Measurements ...................................................................................5
Representing and Understanding Digital Signals ......................................6
Representing Complex Numbers .............................................................6
Frequency and Time– Frequency Representations .................................8
Aliasing ...................................................................................................... 10
Modifying and Processing Digital Signals ................................................12
The Z Transform and Filter Representation .......................................... 13
Digital Filter Example ............................................................................... 16
Nonlinear and Time- Varying Effects ..................................................... 17
2. Delay Line Effects ........................................................................................ 21
Delay ................................................................................................................ 21
Theory ......................................................................................................... 21
Other Delay Types ....................................................................................23
Implementation .........................................................................................25
Applications ...............................................................................................29
Vibrato Simulation .........................................................................................30
Theory ......................................................................................................... 31
Implementation ......................................................................................... 32
Applications ...............................................................................................38
Flanging ..........................................................................................................38
Theory .........................................................................................................40
Common Parameters ................................................................................45
Implementation .........................................................................................47
Applications ...............................................................................................50
Chorus ............................................................................................................. 51
Theory ......................................................................................................... 51
Common Parameters ................................................................................54
Summary: Flanger and Chorus Compared ...............................................56
3. Filter Design ..................................................................................................59
Filter Construction and Transformation .................................................... 61
Simple Prototype Low- Pass Filter ........................................................... 61
High- Order Prototype Low- Pass Filter .................................................. 62
iii
iv
Contents
Changing the Gain at the Cutoff Frequency .........................................64
Shifting the Cutoff Frequency .................................................................65
Creating a Shelving Filter ........................................................................66
Inverting the Magnitude Response ........................................................ 67
Simple Low- Pass to Band-Pass Transformation ................................... 67
Popular IIR Filter Design .............................................................................. 69
Low Pass ..................................................................................................... 70
High Pass ....................................................................................................71
Low Shelf .................................................................................................... 74
High Shelf ...................................................................................................75
Gain at Bandwidth ....................................................................................77
Band-Pass Filters .......................................................................................77
Band-Stop Filters ....................................................................................... 78
Peaking and Notch Filters .......................................................................80
The Allpass Filter ........................................................................................... 81
Applications of Filter Fundamentals...........................................................84
Exponential Moving Average Filter .......................................................84
Loudspeaker Crossovers ..........................................................................85
4. Filter Effects ...................................................................................................89
Equalization ....................................................................................................89
Theory .........................................................................................................89
Implementation ....................................................................................... 100
Applications ............................................................................................. 104
Wah- Wah ....................................................................................................... 105
Theory ....................................................................................................... 105
Implementation ....................................................................................... 109
Phaser ............................................................................................................ 112
Theory ....................................................................................................... 112
Implementation ....................................................................................... 114
5. Amplitude Modulation .............................................................................. 125
Tremolo .......................................................................................................... 125
Theory ....................................................................................................... 125
Implementation ....................................................................................... 127
Ring Modulation .......................................................................................... 131
Theory ....................................................................................................... 131
Implementation ....................................................................................... 136
Applications ............................................................................................. 138
6. Dynamics Processing ................................................................................. 141
Dynamic Range Compression ................................................................... 141
Theory ....................................................................................................... 141
Implementation ....................................................................................... 150
Contents
v
Application ............................................................................................... 158
Summary .................................................................................................. 160
Noise Gates and Expanders ....................................................................... 160
Theory and Implementation .................................................................. 160
Applications ............................................................................................. 163
7. Overdrive, Distortion, and Fuzz .............................................................. 167
Theory............................................................................................................ 167
Characteristic Curve ............................................................................... 167
Hard and Soft Clipping .......................................................................... 169
Input Gain ................................................................................................ 170
Symmetry and Rectification .................................................................. 171
Harmonic Distortion .............................................................................. 173
Intermodulation Distortion ................................................................... 177
Analog Emulation ................................................................................... 179
Implementation ............................................................................................ 180
Basic Implementation ............................................................................. 180
Aliasing and Oversampling .................................................................. 180
Filtering .................................................................................................... 181
Common Parameters .............................................................................. 182
Tube Sound Distortion ........................................................................... 182
Code Example .......................................................................................... 183
Applications .................................................................................................. 185
Expressivity and Spectral Content ....................................................... 185
Sustain ...................................................................................................... 185
Comparison with Compression ............................................................ 185
8. The Phase Vocoder ..................................................................................... 189
Phase Vocoder Theory ................................................................................ 189
Overview .................................................................................................. 189
Windowing .............................................................................................. 192
Analysis: Fast Fourier Transform ......................................................... 194
Interpreting Frequency Domain Data ................................................. 194
Synthesis: Inverse Fast Fourier Transform .......................................... 196
Filterbank Analysis Variant ................................................................... 198
Oscillator Bank Reconstruction Variant .............................................. 199
Phase Vocoder Effects ................................................................................. 199
Robotization .............................................................................................200
Whisperization ........................................................................................204
Time Scaling ............................................................................................206
Pitch Shifting ........................................................................................... 207
Phase Vocoder Artifacts ......................................................................... 210
vi
Contents
9. Spatial Audio ............................................................................................... 213
Theory............................................................................................................ 213
Panorama.................................................................................................. 213
Precedence................................................................................................ 216
Vector Base Amplitude Panning ........................................................... 219
Ambisonics ..............................................................................................220
Wave Field Synthesis ..............................................................................225
The Head- Related Transfer Function ...................................................228
Implementation ............................................................................................ 232
Joint Panorama and Precedence ........................................................... 232
Ambisonics and Its Relationship to VBAP ..........................................233
Implementation of WFS .........................................................................234
HRTF Calculation ...................................................................................234
Applications ..................................................................................................235
Transparent Amplification .....................................................................235
Surround Sound ......................................................................................235
Sound Reproduction Using HRTFs ......................................................236
10. The Doppler Effect ..................................................................................... 239
A Familiar Example ..................................................................................... 239
Derivation of the Doppler Effect ................................................................ 241
Simple Derivation of the Basic Doppler Effect .................................... 241
General Derivation of the Doppler Effect ............................................ 242
Simplifications and Approximations ...................................................244
Implementation ............................................................................................ 245
Time- Varying Delay Line Reads ........................................................... 245
Applications ..................................................................................................250
11. Reverberation ..............................................................................................253
Theory............................................................................................................253
Sabine and Norris– Eyring Equations ..................................................255
Direct and Reverberant Sound Fields .................................................. 257
Implementation ............................................................................................ 259
Algorithmic Reverb ................................................................................ 259
Generating Reverberation with the Image Source Method .............. 262
Convolutional Reverb ............................................................................. 267
Other Approaches ................................................................................... 270
Applications .................................................................................................. 270
Why Use Reverb? .................................................................................... 270
Stereo Reverb ........................................................................................... 272
Gated Reverb ............................................................................................ 272
Reverse Reverb ........................................................................................ 272
Common Parameters .............................................................................. 273