ebook img

Theory and Technique of Electronic Music PDF

333 Pages·2006·1.85 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 Theory and Technique of Electronic Music

The Theory and Technique of Electronic Music DRAFT: September 24, 2006 Miller Puckette Copyright c2006 Miller Puckette (cid:176) All rights reserved. Contents Introduction 1 1 Sinusoids, amplitude and frequency 3 1.1 Measures of Amplitude. . . . . . . . . . . . . . . . . . . . . . . . 5 1.2 Units of Amplitude . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.3 Controlling Amplitude . . . . . . . . . . . . . . . . . . . . . . . . 8 1.4 Frequency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 1.5 Synthesizing a sinusoid . . . . . . . . . . . . . . . . . . . . . . . . 10 1.6 Superposing Signals . . . . . . . . . . . . . . . . . . . . . . . . . 12 1.7 Periodic Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.8 About the Software Examples . . . . . . . . . . . . . . . . . . . . 17 Quick Introduction to Pd . . . . . . . . . . . . . . . . . . . . . . 17 How to flnd and run the examples . . . . . . . . . . . . . . . . . 19 1.9 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Constant amplitude scaler . . . . . . . . . . . . . . . . . . . . . . 19 Amplitude control in decibels . . . . . . . . . . . . . . . . . . . . 20 Smoothed amplitude control with an envelope generator . . . . . 23 Major triad . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Conversion between frequency and pitch . . . . . . . . . . . . . . 24 More additive synthesis . . . . . . . . . . . . . . . . . . . . . . . 25 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2 Wavetables and samplers 29 2.1 The Wavetable Oscillator . . . . . . . . . . . . . . . . . . . . . . 31 2.2 Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 2.3 Enveloping samplers . . . . . . . . . . . . . . . . . . . . . . . . . 38 2.4 Timbre stretching. . . . . . . . . . . . . . . . . . . . . . . . . . . 39 2.5 Interpolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 2.6 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Wavetable oscillator . . . . . . . . . . . . . . . . . . . . . . . . . 49 Wavetable lookup in general . . . . . . . . . . . . . . . . . . . . . 50 Using a wavetable as a sampler . . . . . . . . . . . . . . . . . . . 52 Looping samplers . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Overlapping sample looper. . . . . . . . . . . . . . . . . . . . . . 56 iii iv CONTENTS Automatic read point precession . . . . . . . . . . . . . . . . . . 58 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 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 Audio signals as control . . . . . . . . . . . . . . . . . . . . . . . 73 3.8 Operations on control streams . . . . . . . . . . . . . . . . . . . . 76 3.9 Control operations in Pd . . . . . . . . . . . . . . . . . . . . . . . 79 3.10 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Sampling and foldover . . . . . . . . . . . . . . . . . . . . . . . . 80 Converting controls to signals . . . . . . . . . . . . . . . . . . . . 82 Non-looping wavetable player . . . . . . . . . . . . . . . . . . . . 83 Signals to controls . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Analog-style sequencer . . . . . . . . . . . . . . . . . . . . . . . . 85 MIDI-style synthesizer . . . . . . . . . . . . . . . . . . . . . . . . 85 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 4 Automation and voice management 91 4.1 Envelope Generators . . . . . . . . . . . . . . . . . . . . . . . . . 91 4.2 Linear and Curved Amplitude Shapes . . . . . . . . . . . . . . . 94 4.3 Continuous and discontinuous control changes . . . . . . . . . . . 96 Muting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Switch-and-ramp . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 4.4 Polyphony . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.5 Voice allocation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 4.6 Voice tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 4.7 Encapsulation in Pd . . . . . . . . . . . . . . . . . . . . . . . . . 104 4.8 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 ADSR envelope generator . . . . . . . . . . . . . . . . . . . . . . 105 Transfer functions for amplitude control . . . . . . . . . . . . . . 108 Additive synthesis: Risset’s bell . . . . . . . . . . . . . . . . . . . 109 Additive synthesis: spectral envelope control . . . . . . . . . . . 112 Polyphonic synthesis: sampler . . . . . . . . . . . . . . . . . . . . 113 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 5 Modulation 121 5.1 Taxonomy of spectra . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.2 Multiplying audio signals . . . . . . . . . . . . . . . . . . . . . . 124 5.3 Waveshaping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 5.4 Frequency and phase modulation . . . . . . . . . . . . . . . . . . 134 5.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 CONTENTS v Ring modulation and spectra . . . . . . . . . . . . . . . . . . . . 136 Octave divider and formant adder . . . . . . . . . . . . . . . . . 137 Waveshaping and difierence tones . . . . . . . . . . . . . . . . . . 140 Waveshaping using Chebychev polynomials . . . . . . . . . . . . 141 Waveshaping using an exponential function . . . . . . . . . . . . 142 Sinusoidal waveshaping: evenness and oddness . . . . . . . . . . 143 Phase modulation and FM. . . . . . . . . . . . . . . . . . . . . . 143 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 6 Designer spectra 149 6.1 Carrier/modulator model . . . . . . . . . . . . . . . . . . . . . . 150 6.2 Pulse trains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 6.2.1 Pulse trains via waveshaping . . . . . . . . . . . . . . . . 153 6.2.2 Pulse trains via wavetable stretching . . . . . . . . . . . . 154 6.2.3 Resulting spectra . . . . . . . . . . . . . . . . . . . . . . . 156 6.3 Movable ring modulation . . . . . . . . . . . . . . . . . . . . . . 158 6.4 Phase-aligned formant (PAF) generator . . . . . . . . . . . . . . 160 6.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Wavetable pulse train . . . . . . . . . . . . . . . . . . . . . . . . 165 Simple formant generator . . . . . . . . . . . . . . . . . . . . . . 168 Two-cosine carrier signal . . . . . . . . . . . . . . . . . . . . . . . 169 The PAF generator . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Stretched wavetables . . . . . . . . . . . . . . . . . . . . . . . . . 174 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 7 Time shifts and delays 175 7.1 Complex numbers . . . . . . . . . . . . . . . . . . . . . . . . . . 176 7.1.1 Complex sinusoids . . . . . . . . . . . . . . . . . . . . . . 178 7.2 Time shifts and phase changes . . . . . . . . . . . . . . . . . . . 179 7.3 Delay networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 7.4 Recirculating delay networks . . . . . . . . . . . . . . . . . . . . 184 7.5 Power conservation and complex delay networks . . . . . . . . . 189 7.6 Artiflcial reverberation . . . . . . . . . . . . . . . . . . . . . . . . 193 7.6.1 Controlling reverberators . . . . . . . . . . . . . . . . . . 196 7.7 Variable and fractional shifts . . . . . . . . . . . . . . . . . . . . 196 7.8 Fidelity of interpolating delay lines . . . . . . . . . . . . . . . . . 201 7.9 Pitch shifting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202 7.10 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 Fixed, noninterpolating delay line . . . . . . . . . . . . . . . . . . 208 Recirculating comb fllter . . . . . . . . . . . . . . . . . . . . . . . 209 Variable delay line . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Order of execution and lower limits on delay times . . . . . . . . 211 Order of execution in non-recirculating delay lines . . . . . . . . 213 Non-recirculating comb fllter as octave doubler . . . . . . . . . . 215 Time-varying complex comb fllter: shakers . . . . . . . . . . . . . 216 Reverberator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 vi CONTENTS Pitch shifter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221 8 Filters 223 8.1 Taxonomy of fllters . . . . . . . . . . . . . . . . . . . . . . . . . . 224 8.1.1 Low-pass and high-pass fllters . . . . . . . . . . . . . . . . 224 8.1.2 Band-pass and stop-band fllters . . . . . . . . . . . . . . . 226 8.1.3 Equalizing fllters . . . . . . . . . . . . . . . . . . . . . . . 227 8.2 Elementary fllters . . . . . . . . . . . . . . . . . . . . . . . . . . . 229 8.2.1 Elementary non-recirculating fllter . . . . . . . . . . . . . 229 8.2.2 Non-recirculating fllter, second form . . . . . . . . . . . . 231 8.2.3 Elementary recirculating fllter. . . . . . . . . . . . . . . . 232 8.2.4 Compound fllters . . . . . . . . . . . . . . . . . . . . . . . 232 8.2.5 Real outputs from complex fllters . . . . . . . . . . . . . . 233 8.2.6 Two recirculating fllters for the price of one . . . . . . . . 234 8.3 Designing fllters. . . . . . . . . . . . . . . . . . . . . . . . . . . . 235 8.3.1 One-pole low-pass fllter . . . . . . . . . . . . . . . . . . . 236 8.3.2 One-pole, one-zero high-pass fllter . . . . . . . . . . . . . 237 8.3.3 Shelving fllter . . . . . . . . . . . . . . . . . . . . . . . . . 238 8.3.4 Band-pass fllter . . . . . . . . . . . . . . . . . . . . . . . . 239 8.3.5 Peaking and stop-band fllter . . . . . . . . . . . . . . . . 240 8.3.6 Butterworth fllters . . . . . . . . . . . . . . . . . . . . . . 240 8.3.7 Stretching the unit circle with rational functions . . . . . 243 8.3.8 Butterworth band-pass fllter . . . . . . . . . . . . . . . . 244 8.3.9 Time-varying coe–cients . . . . . . . . . . . . . . . . . . 245 8.3.10 Impulse responses of recirculating fllters . . . . . . . . . . 246 8.3.11 All-pass fllters . . . . . . . . . . . . . . . . . . . . . . . . 249 8.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 8.4.1 Subtractive synthesis . . . . . . . . . . . . . . . . . . . . . 250 8.4.2 Envelope following . . . . . . . . . . . . . . . . . . . . . . 252 8.4.3 Single Sideband Modulation . . . . . . . . . . . . . . . . . 254 8.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Prefabricated low-, high-, and band-pass fllters . . . . . . . . . . 256 Prefabricated time-varying band-pass fllter . . . . . . . . . . . . 256 Envelope followers . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Single sideband modulation . . . . . . . . . . . . . . . . . . . . . 259 Using elementary fllters directly: shelving and peaking . . . . . . 259 Making and using all-pass fllters . . . . . . . . . . . . . . . . . . 261 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 9 Fourier analysis and resynthesis 263 9.1 Fourier analysis of periodic signals . . . . . . . . . . . . . . . . . 263 9.1.1 Periodicity of the Fourier transform . . . . . . . . . . . . 264 9.1.2 Fourier transform as additive synthesis . . . . . . . . . . . 265 9.2 Properties of Fourier transforms . . . . . . . . . . . . . . . . . . 265 9.2.1 Fourier transform of DC . . . . . . . . . . . . . . . . . . . 266 CONTENTS vii 9.2.2 Shifts and phase changes . . . . . . . . . . . . . . . . . . 267 9.2.3 Fourier transform of a sinusoid . . . . . . . . . . . . . . . 269 9.3 Fourier analysis of non-periodic signals . . . . . . . . . . . . . . . 270 9.4 Fourier analysis and reconstruction of audio signals . . . . . . . . 273 9.4.1 Narrow-band companding . . . . . . . . . . . . . . . . . . 277 9.4.2 Timbre stamping (classical vocoder) . . . . . . . . . . . . 279 9.5 Phase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 9.5.1 Phase relationships between channels. . . . . . . . . . . . 283 9.6 Phase bashing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284 9.7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286 Fourier analysis and resynthesis in Pd . . . . . . . . . . . . . . . 286 Narrow-band companding: noise suppression . . . . . . . . . . . 288 Timbre stamp (\vocoder") . . . . . . . . . . . . . . . . . . . . . . 290 Phase vocoder time bender . . . . . . . . . . . . . . . . . . . . . 292 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 10 Classical waveforms 295 10.1 Symmetries and Fourier series . . . . . . . . . . . . . . . . . . . . 297 10.1.1 Sawtooth waves and symmetry . . . . . . . . . . . . . . . 298 10.2 Dissecting classical waveforms . . . . . . . . . . . . . . . . . . . . 300 10.3 Fourier series of the elementary waveforms . . . . . . . . . . . . . 302 10.3.1 Sawtooth wave . . . . . . . . . . . . . . . . . . . . . . . . 303 10.3.2 Parabolic wave . . . . . . . . . . . . . . . . . . . . . . . . 304 10.3.3 Square and symmetric triangle waves. . . . . . . . . . . . 304 10.3.4 General (non-symmetric) triangle wave. . . . . . . . . . . 305 10.4 Predicting and controlling foldover . . . . . . . . . . . . . . . . . 307 10.4.1 Over-sampling . . . . . . . . . . . . . . . . . . . . . . . . 307 10.4.2 Sneaky triangle waves . . . . . . . . . . . . . . . . . . . . 309 10.4.3 Transition splicing . . . . . . . . . . . . . . . . . . . . . . 309 10.5 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313 Combining sawtooth waves . . . . . . . . . . . . . . . . . . . . . 313 Strategies for bandlimiting sawtooth waves . . . . . . . . . . . . 314 Exercises . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316 Index 319 Bibliography 323 viii CONTENTS Introduction This is a book 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". Mostofthecomputermusictoolsavailabletodayhaveantecedentsinearlier generations of equipment. The computer, however, is relatively cheap and the results of using one are easy to document and re-create. In these respects at least, the computer makes the ideal electronic music instrument|it is hard to see what future technology could displace it. 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’s important to provide working examples. So each chapter starts with theory (avoiding 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,flltering, waveshaping, delays, and so on. This will take plenty of time. Thisbookdoesn’ttaketheeasyrouteofrecommendingpre-cookedsoftware to try out these techniques; instead, the emphasis is on learning how to use a general-purpose computer music environment to realize them yourself. Of the several such packages available, we’ll use Pd, but that shouldn’t stop you from usingthesesametechniquesinotherenvironmentssuchasCsoundorMax/MSP. To read this book you must understand mathematics through intermediate algebra and trigonometry; starting in Chapter 7, complex numbers also make an appearance, although not complex analyis. (For instance, complex numbers are added, multiplied, and conjugated, but there are no complex exponentials.) A review of mathematics for computer music by F. Richard Moore appears in [Str85, pp. 1-68]. Although the \level" of mathematics is not high, the mathematics itself is sometimes quite challenging. All sorts of cool mathematics is in the reach 1 2 CONTENTS of any student of algebra or geometry. In the service of computer music, for instance, we’ll run into Bessel functions, Chebychev polynomials, the Central Limit Theorem, and, of course, Fourier analysis. 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 shouldbefamiliarwithtermsofmusicalacousticssuchassinusoids, 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 spinofis. In addition, all the flg- ures were created using Pd patches, which appear in an electronic supplement. Thesearen’tcarefullydocumentedbutinprinciplecouldbeusedasanexample of Pd’s drawing capabilities for anyone interested in 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.