Algorithmic and Computer Music Composition
Introduction to Max Part I
What is Max?
“Max is a graphical music programming environment for people who have hit
the limits of the usual sequencer and voicing programs for MIDI equipment.”
Miller Puckette, Max reference manual, 1988
Max is a real-time MIDI processing language and system which does not need
to be compiled. Max was originally called the “patcher” but was later renamed in
honor of Max Matthews a pioneer in computer music.
Max can be further extended through C programming and to make render
A demo version can be downloaded at http://www.cycling74.com/index.html for
a month after which you will need to authorize it.
Difference between Max and MSP …
Max deals with MIDI and “non-audio rate” based processes. MSP on the other
hand which stands for Max Signal Processing or maybe Miller Super Puckette
… also deals with signals in “audio rate” and hence can process audio files,
real-time input of audio signals etc.
We will first learn about Max.
Setting up the MIDI configuration for Max
The abbrev refers to an alias to a particular input or output. This is helpful when
you have more than one input/output MIDI device.
The offset setting is another way to access a certain MIDI input/output device.
As we know, MIDI can only have 16 channels. For example by setting the offset
to 16 for “SB Audiogy Synth B” we can directly select this device’s channel 1 by
using channel 17. This does not have to be set but can become convenient at
MIDI Setup can be found in the file menu.
Concepts in Max
GUI (Graphical User Interface) based programming environment
Generally signal flow is through “patching” – like telephone operators and
analog synthesizers back in the day (this is of course done digitally through
virtual patch cords)
Programming environment for making control information into stream of
numbers for MIDI transmission
The GUI Interface
Max window and patcher window
The Max window displays feedback information and error messages (no
programming is done here)
The programming(patching) is done in the white empty space in the patcher
window as shown below.
A closer look at the patcher:
Two of the most important things in Max
Objects and messages
Max has about 200 different objects each of which performs one or more
specific tasks. Objects interact in a network to do something “meaningful.”
Depending on the functionality of the object they have inlets and outlets which
determine the behavior of that object.
A message is the information passed from one object to another. A message
can be a number, a list of numbers separated by spaces, a word (referred to in
Max as a symbol), or any arbitrary combination of words and numbers.
The inlets receive information or arguments (parameters) that tell a particular
object how to behave. The outlets output the results and transmit information.
Edit Mode: Locking and unlocking Patcher window
A patch can only be edited in edit mode. However, if one is edit mode the patch
still can be run. So it is possible to dynamically edit a patch and see/hear results
Ctrl - E
Mouse right click + click on patcher window
Show or not show patch cords that is the question …
After selecting the patch cord type
Ctrl – K (to hide)
Ctrl – L (to show)
Found in the Object drop down menu
Priority is given from right to left and bottom to top
Windows: Alt + click on object
Help files show examples of how patches are used. They can be a bit too
complicated at times if one is not familiar with that object but gives the user
additional links to further explore.
Getting Started: the obligatory “Hello Tulane!” patch
Object box (print) and message box (text):
Editing a patch: getting into the edit mode
Ctrl + E
Ctrl + mouse click
Max window on left and patch window on right.
The print object is good for debugging especially…
The Bang Message and Button Object
Bang is a special triggering message that causes an object to perform its task,
the button object sends the bang message.
Bang: the “do it” message
Other useful objects
led(LED): useful for output coloring
bangbang: multi-bang ouputs
trigger: multi-bang with format – i(nt), f(loat), b(ang), l(ist)
b: bang, f: 6.000000, i: 6
toggle object: like an on/off switch
Floating point and fixed point
Number display format
Organizing patch cords
Segmented patching: cords can be segmented, not just straight lines (enable in
Hide on lock: patch cords become invisible when in non-editing mode (lock
More complicated arithmetic using expr(ession) object
Implementing y = a*a + b*2 + |a+b|
Using GUI sliders and pots
Uslider (vertical slider)
hslider (horizontal slider)
Ctrl – i
Information (inspector) and parameter setting of objects