This is an excerpt from

Alessandro Cipriani - Maurizio Giri

ELECTRONIC MUSIC AND SOUND DESIGN

Theory and Practice with Max/MSP - Vol. I


Foreword by David Zicarelli

548 pages - ISBN 978-88-905484-0-6

Electronic Music and Sound Design You can find this book also at:
Amazon  -  Barnes and Noble  -  CdeMusic.org






3P

NOISE GENERATORS, FILTERS, AND SUBTRACTIVE SYNTHESIS



3.1 SOUND SOURCES FOR SUBTRACTIVE SYNTHESIS
3.2 LOWPASS, HIGHPASS, BANDPASS, AND BANDREJECT FILTERS
3.3 THE Q FACTOR
3.4 FILTER ORDER AND CONNECTION IN SERIES
3.5 SUBTRACTIVE SYNTHESIS
3.6 EQUATIONS FOR DIGITAL FILTERS
3.7 FILTERS CONNECTED IN PARALLEL, AND GRAPHIC EQUALIZATION
3.8 OTHER APPLICATIONS OF CONNECTION IN SERIES: PARAMETRIC EQ AND SHELVING FILTERS
3.9 OTHER SOURCES FOR SUBTRACTIVE SYNTHESIS: IMPULSES AND RESONANT BODIES



LEARNING AGENDA

PREREQUISITES FOR THE CHAPTER

  • Contents of Chapters 1 and 2 (Theory and Practice), Chapter 3 (Theory), Interlude A

LEARNING OBJECTIVES

SKillS

  • To learn how to generate and control different types of complex signals for subtractive synthesis (white noise, pink noise, impulses, etc.)
  • To learn how to construct algorithms using lowpass, highpass, bandpass, bandreject, shelving, and resonant filters, and also how to control them using various parameters, Q, and filter order
  • To learn how to implement FIR (non-recursive), as well as IIR (recursive), filters
  • To learn how to build a simple subtractive synthesizer
  • To learn how to write algorithms using filters connected in series and in parallel
  • To learn how to build graphic and parametric equalizers

Competence

  • To be able to realize a short sound study based on the techniques of subtractive synthesis, and save it to an audio file.

CONTENTS

  • Sources for subtractive synthesis
  • Lowpass, highpass, bandpass, bandreject, shelving, and resonant filters
  • The Q factor and filter order
  • Finite impulse response and infinite impulse response filters
  • Connecting filters in series and in parallel
  • Graphic and parametric equalization

ACTIVITIES

  • Replacing parts of algorithms
  • Correcting algorithms
  • Analyzing algorithms
  • Completing algorithms

TESTING

  • Integrated cross-functional project: reverse engineering
  • Integrated cross-functional project: composing a brief sound study

SUPPORTING MATERIALS

  • List of Max/MSP objects
  • Commands, attributes, and parameters for specific Max/MSP objects






3.1 SOUND SOURCES FOR SUBTRACTIVE SYNTHESIS

As you learned in Section 3.1T, the purpose of a filter is to modify the spectrum of a signal in some manner. In this section, before introducing filtering in Max/MSP, we will introduce an object that you can use to display a spectrum: the spectroscope~ object. This graphical object can be found near the end of the palette, in the vicinity of the scope~ object (as shown in Figure 3.1). As usual, if you can’t find it in the palette, create an object box and type the name “spectroscope~” into it.


01p

Fig. 3.1 The spectroscope~ object


Open the file 03_01_spectroscope.maxpat (shown in Figure 3.2).


02p

Fig. 3.2 The file 03_01_spectroscope.maxpat


In this patch, we have connected a selector~ object to the spectroscope so that we can switch between three oscillators, one generating a sine wave (cycle~), one generating a non-band-limited sawtooth wave (phasor~), and one generating a band-limited sawtooth wave[1] (saw~). The three message boxes connected to the left input of the selector~ object are used to pick one of the three oscillators; by setting the frequency in the float number box and then moving between the three oscillators, you can compare their spectra. Observe that the sine wave has only one component, while the phasor~, being a non-band-limited object, has a much richer spectrum.[2]

Make sure to try several frequencies for all of the waveforms, while watching the image being produced by the spectroscope. As stated, the spectrum of the sound being input is what is being displayed: the components of the sound are distributed from left to right across a frequency band that ranges from 0 to 22,050 Hz by default. These two values, the minimum and maximum frequencies that the spectroscope can display, can be modified in the Inspector, using the “Lo and Hi Domain Display Value” attribute in the Value tab. Try adding a spectroscope~ object to a patch that you have already created, so to familiarize yourself with the relationship between sound and its spectral content. You might add the object to the patches found in previous chapters. In 01_14_audiofile.maxpat, for example, you might try connecting the spectroscope to the left outlet of the sfplay~ object, or in IA_06_random_walk.maxpat, you might try connecting it to the outlet of [p monosynth]. (In this last patch, are you able to see the relationship between the frequency of the sound and the shape of the spectrum? Try preset number 5.) Let’s move on to a discussion about ways to produce various types of noise in Max/MSP. The first, white noise, is generated using the noise~ object (as shown in Figure 3.3).


03p

Fig. 3.3 The white noise generator


In the figure (which we encourage you to recreate on your own) we have connected the noise generator to a spectroscope~ object, through which we can see that the spectrum of white noise contains energy at all frequencies. Unlike the sound generators that we have already encountered, the white noise generator doesn’t need any parameters; its function is to generate a signal at the sampling rate consisting of a stream of random values between -1 and 1 (as we discussed in Section 3.1T). The second type of noise generator that is available in Max/MSP is the pink~ object, which, unsurprisingly, generates pink noise (as seen in Figure 3.4).


04p

Fig. 3.4 Pink noise


Note that the spectrum of pink noise, unlike white noise, is gradually attenuated as frequencies get higher, and that this attenuation (as we know from Section 3.1T) is 3 dB per octave.
Reconstruct the simple patch shown in the figure and listen carefully to the difference between pink noise and white noise. Which of the two seems more pleasant (or maybe just less unpleasant), and why? Add an oscilloscope (scope~) to the two patches just built, remembering to set the “Calcount - samples per pixel” [3] attributes in the Value tab of the Inspector, and observe the difference between the waveforms of pink noise and white noise.

In Figure 3.5, we see these two waveforms side-by-side.


05p

Fig. 3.5 Waveforms of white noise and pink noise


Without bogging down in technical details, you can see that while white noise is basically a stream of random values, pink noise is generated using a more complex algorithm in which a sample, although randomly generated, cannot stray too far from the value of its predecessor. This results in the “serpentine” waveform that we see in the figure. The behavior of the two waveforms demonstrates their spectral content: when the difference between one sample and the next is larger, the energy of the higher frequencies in the signal is greater. [4] As you know, white noise has more energy at higher frequencies than pink noise.

Another interesting generator is rand~, which generates random samples at a selectable frequency and connects these values using line segments (as shown in Figure 3.6). Unlike noise~ and pink~, which each generate random samples on every tick of the DSP “engine” (producing a quantity of samples in one second that is equal to the sampling rate), with rand~ it is possible to choose the frequency at which random samples are generated, and to make the transition between one sample value and the next gradual, thanks to linear interpolation.


06p

Fig. 3.6 The rand~ object


Obviously, this generator produces a spectrum that varies according to the frequency setting; it shows a primary band of frequencies that range from 0 Hz up to the frequency setting, followed by additional bands that are gradually attenuated and whose width are also equal to the frequency setting. Figure 3.7 shows this interesting spectrum.


06p

Fig. 3.7 The spectrum generated by the rand~ object


In the example, we can see that the frequency of the rand~ object is 5,512.5 Hz (a quarter of the maximum frequency visible in the spectroscope in the figure), and the first band goes from 0 to 5,512.5 Hz. After this come secondary bands, progressively attenuated, all 5,512.5 Hz wide. Changing the frequency of rand~ changes the width of the bands as well as their number. If you double the frequency to 11,025 Hz, for example, you will see precisely two wide bands, both 11,025 Hz wide.

Another noise generator is vs.rand0~ [5] (the last character before the tilde is a zero), which generates random samples at a given frequency like rand~, but that doesn’t interpolate. Instead, it maintains the value of each sample until a new sample is generated, producing stepped changes in value. The spectrum of this object is divided into bands in the same way as that of rand~ was in Figure 3.7, but as you can see in Figure 3.8, the attenuation of the secondary bands is much less because of the abrupt changes between sample values.


06p

Fig. 3.8 The vs.rand0~ object


In the Virtual Sound Macros library, we also have provided a noise generator that uses cubic interpolation called vs.rand3~ (as shown in Figure 3.9).


06p

Fig. 3.9 The vs.rand3~ object


Thanks to the polynomial interpolation in this object, the transitions between one sample and the next appear smooth, as you can see on the oscilloscope. The transitions form a curve rather than a series of connected line segments, and the resulting effect is a strong attenuation of the secondary bands. Recreate the patches found in figures 3.6 to 3.9 in order to experiment with various noise generators.

“Classic” oscillators – those that produce sawtooth waves, square waves, and triangle waves – are another source of sounds that are rich in components, which makes them effective for use with filters. In Section 1.2, we examined three band-limited oscillators that generate these waves: saw~, rect~, and tri~. We will use these oscillators frequently in the course of this chapter. In Section 3.1T, we also learned about the possibility of filtering sampled sounds. For this reason, we will also give examples in this chapter of filtering sampled sounds, using the sfplay~ object (first introduced in Section 1.5P).



[1] See Section 1.2.   top

[2] The spectroscope~ object uses an algorithm for spectral analysis called the Fast Fourier Transform. We already mentioned the Fourier theorem at the end of Chapter 2T, and we will return to a much more detailed discussion of it in Chapter 12.   top

[3] We explained this attribute in Section 1.2P.   top

[4] To understand this assertion, notice that the waveform of a high sound oscillates quickly, while that of a low sound oscillates slowly. At equal amplitudes, the difference between succeeding samples for the high frequency case will be larger, on average, than for the low frequency case.   top

[5] You should know from preceding chapters that the “vs” at the beginning of this object’s name means that it a part of the Virtual Sound Macros library.   top


(...)

Electronic Music and Sound Design You can find this book also at:
Amazon  -  Barnes and Noble  -  CdeMusic.org


other sections in this chapter:

3.2 LOWPASS, HIGHPASS, BANDPASS, AND BANDREJECT FILTERS

3.3 THE Q FACTOR

3.4 FILTER ORDER AND CONNECTION IN SERIES
The umenu object
First-order filters
Second-order filters
Higher order filters: in-series connections


3.5 SUBTRACTIVE SYNTHESIS
”Wireless” communications: the pvar object
Multiple choices: the radiogroup object
Anatomy of a subtractive synthesizer


3.6 EQUATIONS FOR DIGITAL FILTERS
Non-recursive, or fir, filters
Recursive, or iir, filters


3.7 FILTERS CONNECTED IN PARALLEL, AND GRAPHIC EQUALIZATION
Using a parallel filterbank
Graphic equalizers


3.8 OTHER APPLICATIONS OF CONNECTION IN SERIES: PARAMETRIC EQ AND SHELVING FILTERS
Parametric equalization

3.9 OTHER SOURCES FOR SUBTRACTIVE SYNTHESIS: IMPULSES AND RESONANT BODIES


ACTIVITIES
• Replacing parts of algorithms
• Correcting algorithms
• Analyzing algorithms • Completing algorithms

TESTING
• Integrated cross-functional project: reverse engineering
• Integrated cross-functional project: composing a brief sound study

SUPPORTING MATERIALS
• List of Max/MSP objects
• Commands, attributes, and parameters for specific Max/MSP objects


previous  -   next   -  index  -  top page



from “Electronic Music and Sound Design” Vol. 1 by Alessandro Cipriani and Maurizio Giri
© ConTempoNet 2010
All rights reserved. No part of this book may be reproduced in any form by any electronic or mechanical means (including photocopying, recording, or information storage and retrieval) without permission in writing from the publisher.

 
Copyright © 2013 Virtual-Sound. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.