ebook img

The theory and technique of electronic music PDF

333 Pages·2007·1.849 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview The theory and technique of electronic music

Theory and Techniques of Electronic Music DRAFT: March 3, 2006 Miller Puckette Copyright c2006 Miller Puckette ° All rights reserved. Contents 1 Sinusoids, amplitude and frequency 3 1.1 Measures of Amplitude. . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Units of Amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Controlling Amplitude . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 1.5 Synthesizing a Sinusoid . . . . . . . . . . . . . . . . . . . . . . . 9 1.6 Superposing Signals . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.7 Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.8 About the Software Examples . . . . . . . . . . . . . . . . . . . . 14 Quick Introduction to Pd . . . . . . . . . . . . . . . . . . . . . . 17 How to find and run the examples . . . . . . . . . . . . . . . . . 19 1.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Constant amplitude scaler . . . . . . . . . . . . . . . . . . . . . . 19 Amplitude control in decibels . . . . . . . . . . . . . . . . . . . . 21 Smoothed amplitude control with an envelope generator . . . . . 23 Major triad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Conversion between frequency and pitch . . . . . . . . . . . . . . 24 More additive synthesis . . . . . . . . . . . . . . . . . . . . . . . 25 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2 Wavetables and samplers 29 2.1 The Wavetable Oscillator . . . . . . . . . . . . . . . . . . . . . . 31 2.2 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 2.3 Enveloping samplers . . . . . . . . . . . . . . . . . . . . . . . . . 37 2.4 Timbre stretching. . . . . . . . . . . . . . . . . . . . . . . . . . . 41 2.5 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 2.6.1 wavetable oscillator . . . . . . . . . . . . . . . . . . . . . 49 2.6.2 wavetable lookup in general . . . . . . . . . . . . . . . . . 50 2.6.3 using a wavetable as a sampler . . . . . . . . . . . . . . . 52 2.6.4 looping samplers . . . . . . . . . . . . . . . . . . . . . . . 54 2.6.5 Overlapping sample looper . . . . . . . . . . . . . . . . . 56 2.6.6 Automatic read point precession . . . . . . . . . . . . . . 58 iii iv CONTENTS 3 Audio and control computations 61 3.1 The sampling theorem . . . . . . . . . . . . . . . . . . . . . . . . 61 3.2 Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 3.3 Control streams . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 3.4 Converting from audio signals to numeric control streams . . . . 69 3.5 Control streams in block diagrams . . . . . . . . . . . . . . . . . 70 3.6 Event detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 3.7 Control computation using audio signals directly . . . . . . . . . 73 3.8 Operations on control streams . . . . . . . . . . . . . . . . . . . . 75 3.9 Control operations in Pd . . . . . . . . . . . . . . . . . . . . . . . 77 3.10 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 3.10.1 Sampling and foldover . . . . . . . . . . . . . . . . . . . . 79 3.10.2 Converting controls to signals . . . . . . . . . . . . . . . . 81 3.10.3 Non-looping sample player. . . . . . . . . . . . . . . . . . 82 3.10.4 Signals to controls . . . . . . . . . . . . . . . . . . . . . . 84 3.10.5 Analog-style sequencer . . . . . . . . . . . . . . . . . . . . 84 3.10.6 MIDI-style synthesizer . . . . . . . . . . . . . . . . . . . . 86 4 Automation and voice management 89 4.1 Envelope Generators . . . . . . . . . . . . . . . . . . . . . . . . . 89 4.2 Linear and Curved Amplitude Shapes . . . . . . . . . . . . . . . 92 4.3 Continuous and discontinuous control changes . . . . . . . . . . . 94 4.3.1 Muting . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 4.3.2 Switch-and-ramp . . . . . . . . . . . . . . . . . . . . . . . 96 4.4 Polyphony . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.5 Voice allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.6 Voice tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 4.7 Encapsulation in Pd . . . . . . . . . . . . . . . . . . . . . . . . . 102 4.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.8.1 ADSR envelope generator . . . . . . . . . . . . . . . . . . 103 4.8.2 Transfer functions for amplitude control . . . . . . . . . . 106 4.8.3 Additive synthesis: Risset’s bell . . . . . . . . . . . . . . . 107 4.8.4 Additive synthesis: spectral envelope control . . . . . . . 110 4.8.5 Polyphonic synthesis: sampler. . . . . . . . . . . . . . . . 113 5 Modulation 119 5.1 Taxonomy of spectra . . . . . . . . . . . . . . . . . . . . . . . . . 119 5.2 Multiplying audio signals . . . . . . . . . . . . . . . . . . . . . . 122 5.3 Waveshaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.4 Frequency and phase modulation . . . . . . . . . . . . . . . . . . 132 5.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 5.5.1 Ring modulation and spectra . . . . . . . . . . . . . . . . 135 5.5.2 Octave divider and formant adder . . . . . . . . . . . . . 137 5.5.3 Waveshaping and difference tones. . . . . . . . . . . . . . 138 5.5.4 Waveshaping using Chebychev polynomials . . . . . . . . 139 5.5.5 Waveshaping using an exponential function . . . . . . . . 140 CONTENTS v 5.5.6 Sinusoidal waveshaping: evenness and oddness . . . . . . 141 5.5.7 Phase modulation and FM . . . . . . . . . . . . . . . . . 143 6 Designer spectra 147 6.1 Carrier/modulator model . . . . . . . . . . . . . . . . . . . . . . 148 6.2 Pulse trains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 6.2.1 Pulse trains via waveshaping . . . . . . . . . . . . . . . . 151 6.2.2 Pulse trains via wavetable stretching . . . . . . . . . . . . 152 6.2.3 Resulting spectra . . . . . . . . . . . . . . . . . . . . . . . 152 6.3 Movable ring modulation . . . . . . . . . . . . . . . . . . . . . . 156 6.4 Phase-aligned formant (PAF) generator . . . . . . . . . . . . . . 158 6.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 6.5.1 Wavetable pulse train . . . . . . . . . . . . . . . . . . . . 163 6.5.2 Simple formant generator . . . . . . . . . . . . . . . . . . 166 6.5.3 Two-cosine carrier signal. . . . . . . . . . . . . . . . . . . 167 6.5.4 The PAF generator . . . . . . . . . . . . . . . . . . . . . . 168 6.5.5 Stretched wavetables . . . . . . . . . . . . . . . . . . . . . 172 7 Time shifts 173 7.1 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7.1.1 Sinusoids as geometric series . . . . . . . . . . . . . . . . 176 7.2 Time shifts and phase changes . . . . . . . . . . . . . . . . . . . 178 7.3 Delay networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 7.4 Recirculating delay networks . . . . . . . . . . . . . . . . . . . . 183 7.5 Power conservation and complex delay networks . . . . . . . . . 187 7.6 Artificial reverberation . . . . . . . . . . . . . . . . . . . . . . . . 192 7.6.1 Controlling reverberators . . . . . . . . . . . . . . . . . . 194 7.7 Variable and fractional shifts . . . . . . . . . . . . . . . . . . . . 196 7.8 Accuracy and frequency response of interpolating delay lines . . 199 7.9 Pitch shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200 7.10 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 7.10.1 Fixed, noninterpolating delay line . . . . . . . . . . . . . 206 7.10.2 Recirculating comb filter . . . . . . . . . . . . . . . . . . . 207 7.10.3 Variable delay line . . . . . . . . . . . . . . . . . . . . . . 208 7.10.4 Order of execution and lower limits on delay times . . . . 209 7.10.5 Order of execution in non-recirculating delay lines . . . . 211 7.10.6 Non-recirculating comb filter as octave doubler . . . . . . 213 7.10.7 Time-varying complex comb filter: shakers . . . . . . . . 214 7.10.8 Reverberator . . . . . . . . . . . . . . . . . . . . . . . . . 216 7.10.9 Pitch shifter. . . . . . . . . . . . . . . . . . . . . . . . . . 216 7.10.10Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 vi CONTENTS 8 Filters 221 8.1 Taxonomy of filters . . . . . . . . . . . . . . . . . . . . . . . . . . 222 8.1.1 Low-pass and high-pass filters . . . . . . . . . . . . . . . . 222 8.1.2 Band-pass and stop-band filters . . . . . . . . . . . . . . . 224 8.1.3 Equalizing filters . . . . . . . . . . . . . . . . . . . . . . . 224 8.2 Designing filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 227 8.2.1 Elementary non-recirculating filter . . . . . . . . . . . . . 227 8.2.2 Non-recirculating filter, second form . . . . . . . . . . . . 228 8.2.3 Elementary recirculating filter. . . . . . . . . . . . . . . . 231 8.2.4 Compound filters . . . . . . . . . . . . . . . . . . . . . . . 231 8.2.5 Real outputs from complex filters . . . . . . . . . . . . . . 232 8.3 Designing filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 234 8.3.1 One-pole low-pass filter . . . . . . . . . . . . . . . . . . . 234 8.3.2 One-pole, one-zero high-pass filter . . . . . . . . . . . . . 235 8.3.3 Shelving filter . . . . . . . . . . . . . . . . . . . . . . . . . 236 8.3.4 Band-pass filter . . . . . . . . . . . . . . . . . . . . . . . . 238 8.3.5 Peaking and band-stop filter . . . . . . . . . . . . . . . . 238 8.3.6 Butterworth filters . . . . . . . . . . . . . . . . . . . . . . 239 8.3.7 Stretching the unit circle with rational functions . . . . . 241 8.3.8 Butterworth band-pass filter . . . . . . . . . . . . . . . . 244 8.3.9 Time-varying coefficients . . . . . . . . . . . . . . . . . . 245 8.3.10 Impulse responses of recirculating filters . . . . . . . . . . 247 8.3.11 All-pass filters . . . . . . . . . . . . . . . . . . . . . . . . 247 8.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 8.4.1 Subtractive synthesis . . . . . . . . . . . . . . . . . . . . . 250 8.4.2 Envelope following . . . . . . . . . . . . . . . . . . . . . . 250 8.4.3 Single Sideband Modulation . . . . . . . . . . . . . . . . . 253 8.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 8.5.1 Prefabricated low-, high-, and band-pass filters . . . . . . 255 8.5.2 Prefabricated time-variable band-pass filter . . . . . . . . 256 8.5.3 Envelope followers . . . . . . . . . . . . . . . . . . . . . . 258 8.5.4 Single sideband modulation . . . . . . . . . . . . . . . . . 258 8.5.5 Using elementary filters directly: shelving and peaking . . 261 8.5.6 Making and using all-pass filters . . . . . . . . . . . . . . 261 9 Fourier analysis and resynthesis 265 9.1 Fourier analysis of periodic signals . . . . . . . . . . . . . . . . . 265 9.1.1 Fourier transform as additive synthesis . . . . . . . . . . . 267 9.1.2 Periodicity of the Fourier transform . . . . . . . . . . . . 267 9.2 Properties of Fourier transforms . . . . . . . . . . . . . . . . . . 267 9.2.1 Fourier transform of DC . . . . . . . . . . . . . . . . . . . 268 9.2.2 Shifts and phase changes . . . . . . . . . . . . . . . . . . 269 9.2.3 Fourier transform of a sinusoid . . . . . . . . . . . . . . . 271 9.3 Fourier analysis of non-periodic signals . . . . . . . . . . . . . . . 272 9.4 Fourier analysis and reconstruction of audio signals . . . . . . . . 275 9.4.1 Narrow-band companding . . . . . . . . . . . . . . . . . . 277 CONTENTS vii 9.4.2 Timbre stamping (classical vocoder) . . . . . . . . . . . . 279 9.5 Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281 9.5.1 Phase relationships between channels. . . . . . . . . . . . 285 9.6 Phase bashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 9.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288 10 Classical waveforms 297 10.1 Symmetries and Fourier series . . . . . . . . . . . . . . . . . . . . 299 10.1.1 Sawtooth waves and symmetry . . . . . . . . . . . . . . . 300 10.2 Decomposingtheclassicalwaveformsintosawtoothandparabolic waves . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302 10.3 Fourier series of the elementary waveforms . . . . . . . . . . . . . 304 10.4 Predicting and controlling foldover . . . . . . . . . . . . . . . . . 309 10.4.1 Oversampling . . . . . . . . . . . . . . . . . . . . . . . . . 309 10.4.2 Sneaky triangle waves . . . . . . . . . . . . . . . . . . . . 310 10.4.3 Transition splicing . . . . . . . . . . . . . . . . . . . . . . 311 10.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 314 viii CONTENTS Introduction This book is about using electronic techniques to record, synthesize, process, and analyze musical sounds, a practice which came into its modern form in the years 1948-1952, but whose technological means and artistic uses have under- gone several revolutions since then. Nowadays most electronic music is made using computers, and this book will focus exclusively on what used to be called “computermusic”,butwhichshouldreallynowbecalled“electronicmusicusing a computer”. Mostoftheavailablecomputermusictoolshaveantecedentsinearliergener- ationsofequipment. Thecomputer,however,isrelativelycheapandtheresults ofusingonearemucheasiertodocumentandre-createthanthoseofearliergen- erations of equipment. In these respects at least, the computer makes the ideal electronicmusicinstrument—untilsomeoneinventssomethingevencheaperand more flexible than a computer. The techniques and practices of electronic music can be studied (at least in theory) without making explicit reference to the current state of technology. Still,it’simportanttoprovideworkingexamplesofthem. Soeachchapterstarts with theory (without any reference to implementation) and ends with a series of examples realized in a currently available software package. Theidealreaderofthisbookisanyonewhoknowsandlikeselectronicmusic of any genre, has plenty of facility with computers in general, and who wants to learn how to make electronic music from the ground up, starting with the humbleoscillatorandcontinuingthroughsampling, FM,filtering, waveshaping, delays, and so on. This will take plenty of time. This book doesn’t concern itself with the easier route of downloading pre- cookedsoftwaretotryoutthesetechniques;instead,theemphasisisonlearning howtouseageneral-purposecomputermusicenvironmenttorealizethemyour- self. Oftheseveralsuchpackagesareavailable, we’llusePd, butthatshouldn’t stop you from using these same techniques in some other environment such as CsoundorMax/MSP.Tofacilitatethis, eachchapterisdividedintoasoftware- independent discussion of theory, followed by actual examples in Pd, which you can transpose into your own favorite package. To read this book you must also understand mathematics through interme- diate algebra and trigonometry, which most students should have mastered by age 17 or so. A quick glance at the first few pages of chapter one should show you if you’re ready to take it on. Many adults in the U.S. and elsewhere may 1 2 CONTENTS have forgotten this material and will want to get their Algebra 2 textbooks out as a reference. A refresher by F. Richard Moore appears in [Str85, pp. 1-68]. You don’t need much background in music as it is taught in the West; in particular, Western written music notation is not needed. Some elementary bits of Western music theory are used, such as the tempered scale, the A-B- C system of naming pitches, and terms like “note” and “chord”. Also you should be familiar with the fundamental terminology of musical acoustics such as sinusoids, amplitude, frequency, and the overtone series. Each chapter starts with a theoretical discussion of some family of tech- niques or theoretical issues, followed by a a series of examples realized in Pd to illustrate them. The examples are included in the Pd distribution, so you can run them and/or edit them into your own spinoffs. In addition, all the fig- ures were created using Pd patches, which appear in an electronic supplement. Thesearen’tcarefullydocumentedbutinprinciplecouldbeusedasanexample of Pd’s drawing capabilities for anyone interested in learning more about that.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.