The intention of MAX was to create a graphical programming environment for musicians and composers (Puckette 1985). Originally developed at IRCAM by David Zicarelli and Miller Puckette in the late 1980’s, it soon became popular for controlling MIDI- instruments (Puckette 1988). Its unique flexibility, and the possibility for users to extend the capabilities of the environment by writing new code, secured its position in computer music (Puckette and Zicarelli 1990). The novel idea was the creation of a graphical environment that could be run in real-time, allowing the user to interact with the program. The MSP-package (released in 1996) added audio capabilities, and Jitter (released in 2002) allows the manipulation of video. Today MAX/MSP/Jitter are commercially available products, continuing to attract a large community of users10.
Since MAX/MSP was created with its main focus on music creation and manipulation, it is also suitable for music analysis. This is due to the large palette of tools that are not easily available in other programming environments. Since I also find it so much more intuitive to use than traditional programming, I decided to use it for my experiments11. I also think it should be possible for readers unfamiliar with MAX/MSP to understand some of the structure in the examples that will be provided in this thesis.
A program in MAX/MSP is usually called a patch, and looks like a window on the screen . A patch can be seen in two modes, either edit or run. In edit mode, the user can build up the patch by adding objects, the building blocks of the environment. Externals can be either C-programs that are compiled to MAX-objects, or other patches. Thus it is easy to add extra functionality by writing new externals. Objects are connected to each other with patch cords (Figure 4-1), through the inlets and outlets of the objects. By following the patch cords it is therefore possible to see how the patch will behave, i.e. the flow of data.

An empty MAX/MSP patch window. A menu on the top provides links to the most common objects.
Switching to the run mode makes it possible to actually use the patch (Figure 4-2). Changing values in number boxes, for example, will cause operations to be done (Figure 4- 3). Usually it is the left inlet that triggers an operation, while the right inlet store values. Thus, in this example the number 2 received in the right inlet will be stored in the object. It is first when a number is set in the left inlet that the “+” object triggers an output.

Objects are connected with patch cords in MAX/MSP (1). When all connections are made, the patch can be switched to run mode (2), and the user can change values and see the results directly (3), in this case performing an addition of the two upper numbers.
The example in the figure above is very simple, but it shows the basics of MAX. There are many other objects, and they can all be connected in different ways. Most of the objects also have quite logical names, so it is easy to get started making patches. Users with traditional programming experience will appreciate that it is actually possible to use objects such as if- else, for and while also in MAX, even though similar operations can also be accomplished in many other ways. There are always many ways of doing the same data processing in MAX!
Worth mentioning is also the difference between MAX and MSP objects. While MAX is
only concerned with mathematical functions and MIDI messages, MSP is the collection of
tools that control the audio part of the environment. It is easy to spot MSP objects in a
patch since they always have the ~ (tilde) extension. Another difference is that the patch
cords connecting MSP objects are thicker and have a dotted line, making it easy to see
where audio signals are going. This separation of signal and control routes is logical, but
often confusing when starting to learn MAX/MSP. There is for example an important
difference between the objects + and +~. The former is used in addition of numbers,
while the latter is used when adding sound signals. Luckily, MAX will not allow you to
connect for example a signal object to a number object.
There are lots of other things to be said about MAX/MSP, but I think the most important is to understand the concept that a patch is built by objects connected together with patch cords. So even in quite complicated patches, it is possible to follow patch cords and understand the programming structure. In the patches presented in this thesis I will not explain how each object works, but I still hope that non-experienced readers can understand the main idea behind the patches.
This text is part of my master’s thesis.