The following contains excerpts from the book, Electronic Music and Sound Design (Alessandro Cipriani, Maurizio Giri).

This book alternates between teaching concepts of sound design, theoretically, and showing how it is done using Max/MSP.  As David Zicarelli, the publisher of Max/MSP, states in the foreword: “This book provides the language for expressing the concepts in terms of the underlying theory (of sound design).  Knowing the theory is essential…to be more than someone who can turn a volume knob.”

Part II of this book deals with programming in Max/MSP and the creation of Additive and Vector Synthesis.

At our music school in Dallas, Texas we teach our composition students the value of using Max/MSP in their creative work.

“The trigger object…does more than order messages: it can also change the type of a message or transform it into a constant…In more complex patches, it is often difficult to set the order of execution between elements based solely on the positions of the objects in their patcher.  In these cases, trigger is an invaluable object.”

Students at our music school in Dallas, Texas learn how to effectively use Objects in their Max/MSP programming.

i – integer

f – floating point number

b – bang

l – list (a message composed of elements)

s – symbol (also know as a string – for example “open”, “close”, etc.)

“A list…is a message composed of multiple elements, which can be unpacked using the unpack object, which needs as many arguments as there are elements in the list.  Each argument serves to specify the type of an element.”

Another object that enables us to work with lists: “One of the most important is the zl object, which is really more like a group of objects, or better yet, an object whose functionality morphs based on the arguments that we give it.”

“The append object…adds its argument to the end of any list that it receives, while the prepend object adds its argument to the beginning of any list it receives…prepend can be useful in cases in which we need to send a (fixed) command to an object followed by a (variable) numerical value.”

multislider – a list of 16 elements…whose values can be seen within the message box…exceedingly useful UI object.

set – deletes the contents of the message box and replaces them with the message following the command text “set”.

“Be careful not to confuse the command messages “append” and “prepend” with the append and prepend objects!  These objects add their argument to whatever message they receive on their inlets, and emit the resulting messages form their outlets, while the commands simply add elements to the contents of the message box that receives them.”

Learning how to use the append and prepend objects will aid our composition students at our music school in in Dallas, Texas in their further understanding of programming in Max/MSP.

“The dollar sign (‘$’) in a  message box represents a variable argument, and when we have one or more elements in a message box that consist of a dollar sign followed by an integer (such as $1, $2, etc.), such elements will be replaced by the corresponding elements of incoming messages.”

“Remember that a comma inside a message box separates messages.”

As students at our music school in Dallas, Texas learn how to properly use message boxes, it will help them fluidly use commands in their programming.

Variable arguments can be created by using the setdomain object.

“Two objects that are very useful for simplifying complex patches, and that enable you to use ‘wireless communication’ within your Max patches [are] the send and receive objects…and are used so often that they can be abbreviated simply by using their initials ‘s’ and ‘r’.  It is possible to transmit any message whatsoever, and if there are more than one receive objects with the same argument, the send object will fan the same message out to all receivers.”

Spectrum and Additive Synthesis

We teach student at our music school in Dallas, Texas how waveforms and sound synthesis work, using Max/MSP.

“Sine waves are the basic building blocks with which it is possible to construct all other waveforms.  When used in this way, we call the sine waves frequency components, and each frequency component in the composite wave has its own frequency, amplitude, and phase.  The set of frequencies, amplitudes, and phases that completely define a given sound is called its sound spectrum…Spectrum and waveform are two different ways to describe a single sound.”

“Whenever the amplitudes of A and B are both positive or both negative, the absolute value of the amplitude of C will be larger than that of either of the component, resulting in constructive interference…Whenever the amplitudes of A and B differ in their signs, one being positive and the other negative, the absolute value of their sum C will be less than either one or both components, resulting in destructive interference.”

“A certain perceived pitch corresponds to a certain wavelength of sound.  If no other frequency is present at the same moment, the sound will be pure.  A pure sound, as we know, has a sine waveform.”

“The lowest component frequency is called the fundamental, and the components are called harmonics.”

“A phase of 360 degrees is equivalent to a phase of 0 degrees.  Because of this, the cycle wraps around endlessly, beginning anew whenever we increment phase values beyond the basic range.”

“If we…shift the phase of a sine or a cosine wave by a full 180 degrees, we obtain a waveform that has reversed polarity with respect to the original waveform (which had a phase angle of 0 degrees).  For every positive value in one of these waves, there is a corresponding negative value in the other.  In such a case, the two waves are said to be in antiphase…If we sum the two waveforms…destructive interference will completely eliminate the sound,”

“A sawtooth wave…can be approximated by a series of harmonically linked sine waves that all have a phase of 180 degrees.”

“A square wave…consists of only odd-numbered components with phase of 0 degrees.  The amplitude of even-numbers components in this waveform is always 0.”

“You can approximate the triangle wave by using an amplitude factor of 1/n2 , for odd n only, and by multiplying the series of odd numbers alternately by 1 and by -1 (or by alternating the phase of the sine waves between 0 degrees and 180 degrees).”

“When approximating an impulse [wave], the components should all be cosine waves rather than sine waves.”

“The cycle is the smallest portion of a wave that repeats over time.  The fundamental of a harmonic sound is the component with the lowest frequency, and generally also the highest amplitude.  The frequencies of all of the other components are integer multiples of this frequency.  If the lowest component in a harmonic sound is missing, but the immediately succeeding components are present, the sound will be heard as having a pitch equal to the missing fundamental.”

“If, in addition to the fundamental, we start to remove other lower harmonics, we hear the gradual loss or its harmonicity, because at some point, our brain is no longer able to reconstruct the fundamental.”

“The fundamental of a periodic sound is the frequency of which all components are integral multiples…A non-periodic sound is, by contrast, a sound for which it is not possible to identify a portion that repeats in time…you can have a periodic sound that has no definite pitch.  On the other hand, it is possible to have a non-periodic sound that does have a definite pitch…sounds…which have a perceptible pitch and a series of components that are almost multiple of the fundamental, as quasi-harmonic sounds.

When constructing a sound using fixed spectrum additive synthesis, “in which neither the frequency nor the amplitudes of the components vary over time, we can work in one of two ways.  The more typical and simpler method is to sum the outputs of multiple sine wave oscillators, each of which generates a frequency component of the sound.  The second, more efficient method consists of summing all of the sine wave components directly within a single wavetable, which contains as a result one complete cycle of the waveform.  We then use a single oscillator to read this wavetable and generate the complex sound.  This second method optimizes the use of computer resources.”

“The beats phenomenon is cause by the small difference in frequency between the two summed waves, which results in the cyclical variation in the amplitude of the resulting wave.  If we slowly increase the difference between the two frequencies, the frequency of the beats will increase as well.  As we go farther, continuing to increase the difference between the frequencies, at some point we will no longer perceive single beats, but instead we will hear the interference between the two waves as a sort of ‘roughness’ in sound.  Increasing the difference even further, we will ultimately hear two distinct sounds…the critical band delineates boundaries within which our ears cannot separate individual sounds; instead, we resolve the complexity of such a signal with a sensation of roughness or by hearing beats…Above 200 Hz, the width of the critical band increases as the intermediate frequency increases, corresponding to an interval that lies somewhere between a whole tone and a minor third…Below 200 Hz, on the other hand, the width of the critical band remains a constant width, and because of this, it occupies an interval that steadily increases as the pitch descends.  This means that at lower frequencies, only very wide intervals are perceived of as consonant. “

Generating a sound “that changes in time simply by dissolving from one table to another [is]…described using many different names- wavetable crossfading, vector synthesis, and linear algorithmic synthesis are all valid.”

“Masking is a method…that consists of defining a ‘mask’ of two envelopes that trace the progress of the lowest and the highest frequencies, and automatically reconstructing all frequencies for the other components by subdividing the space between the two extremes into equal or unequal parts.”

The Fourier theorem (developed by the French mathematician and physicist Joseph Fourier, who was active in the eighteenth and early nineteenth centuries) confirmed that ‘any periodic waveform can be represented by a series of harmonics, or sine wave components, each with a particular amplitude and phase.  It is therefore possible to reconstruct the spectrum of any periodic sound.”