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.”
At our music school in Dallas, Texas we help composition students understand and appreciate the value of using this industry standard programming tool.
Part II of this book deals with programming in Max/MSP and the creation of Additive and Vector Synthesis.
Max/MSP Programming
“This is a common pattern: a large majority of Max objects execute their functions and emit results only when a message is received on their left inlet. Messages that enter other inlets either modify arguments by updating internal data structures or else modify the behavior of the objects without causing visible results…the left inlet is defined as a “hot” inlet…Most other inlets are defined as “cold” inlets…(the ability to accept lists of two or more elements on their left inlet and then route the individual list items to the other inlets) is also a common feature of many Max objects, and works not only with binary operators, but often with objects that have three or more inlets.”
“(The decimal point is important, but it is not necessary to put any numbers after the decimal point.) The decimal point in the argument declares to the + object that we intend to use non-integer numbers on its inlets, or in other words, that we intend to use floating point math.”
We teach students at our music school in Dallas, Texas how to use Objects in Max/MSP.
“All of the operators…so far are binary operators, so called because they need two inputs (also called operands in computer lingo) to produce their output…the first operand is the number that is input on the left inlet and which triggers the operation, while the second operand is the argument (or else the number on the right inlet). For subtraction and division, however, there also exist two objects for which the operands are reversed. Their second operand is input on the left inlet and triggers the operation, while the first operand is the object’s argument. The name for these ‘reversed’ objects is made up of an exclamation point plus the character for the underlying operation: ! – for subtraction…and ! / for division.”
“All of these operators also exist in MSP versions that generate a signal (+~ , -~ , *~ , /~)…and can receive either a signal or numeric values on their other inlet.”
One of the most important aspects of using Max/MSP that we teach our students at our music school in Dallas, Texas is in how to use and manipulate waveforms.
“Two objects exist that allow you to store values and recall these values later using a bang. They are int (for the storage of integers) and float (for floating point numbers).”
“The object that generates random numbers in Max is called random, and it produces a new number every time it receives a bang.”
“Subpatches…are patches wholly contained within a single object box, which take the external form of an object box with inlets and outlets. The object that enables the creation of subpatches is called patcher, and it is so commonly used that it can also be abbreviated with just the letter ‘p’.”
“Abstractions [are subpatches]…that are stored in separate external files…and is a packaging of an algorithm that is meant to be used over and over again as an object. How do you create an abstraction? Exactly the same way that you create a patch. There is no difference between an abstraction file and a patch file; when we create a patch or an abstraction and save it with a name (among files that we’ve already used…Max creates a file that can be loaded as either an autonomous patch or as an abstraction that is usable as an object form any Patch Window. An abstraction can be used simply by typing the name without its extension (for example, oscillator rather that oscillator.maxpat) into an object box. You need to pay a little attention to managing your file locations on disk, of course…Whenever Max opens or creates a patch, it recursively loads any external objects that it needs into memory, first searching for them in the folder that contains the patch being loaded, and, if they are not found, then stepping through the folders of the search path.
“To make a non-standard object (such as the abstractions that we have been discussing) visible from any other patch, you need to put it into a folder that is already part of the search path, or else add the folder containing it to the search path by using the File Preferences window…create a folder named “my abstractions” and place it into the search path by including it in the File Preferences window. Patches saved in this folder (or in a subfolder) can then be used as abstraction from any Max/MSP patch, no matter where the containing patch is stored.”
We teach students at our music school in Dallas, Texas the importance of successfully organized file-structure.
“If you want your abstractions to be visible only to the patches found in a specific folder, place the abstractions in that specific folder…If, however, you want your abstraction to be visible to any and all Max/MSP patches, place these abstractions into a folder that is already part of the Max search patch, or else into a folder that you will add to the search path by using the Filer Preferences window.”
The “drunk…object accepts two arguments and generates random numbers in the interval between 0 and the first argument minus 1, exactly as random does. Any two values, however, generated in succession are guaranteed to diverge by no more than a value that is defined by the interval between 0 and the second argument minus 1.”
Students at our music school in Dallas, Texas will learn how to use Max/MSP Objects successfully.
random – generates random numbers every time that it receives a bang.
vs.random – Generates random floating point numbers between 0 and 1.
vs.between – Generates either integer or floating point random numbers between a minimum and a maximum.
drunk – Accepts two arguments and generates random numbers between 0 and the first argument minus 1…the argument implements a random walk between numbers.
trigger – An object that enables you to repeat an incoming message on multiple outlets…accepts a variable number of arguments…the ‘i’ is an argument that specifies a type for a corresponding outlet of trigger.
If you want to align the objects in columns…select the row or column of objects in question and press Command-y.
Max/MSP is a powerful tool to help composers learn to express their imaginative creativity. At our music school in Dallas, Texas we encourage students to gain mastery of this powerful program.