Hello Max/MSP

Let’s have a look at the interface.

Patchers
Programs in MAX are called patches. The metaphor based on analog patch synthesizers.

Messy…

The patcher typically appears as a window with a lot of boxes with lines connecting them. The boxes are called objects and the lines are patch cords.

Each object represents a process.

The results of the process are passed along the patch cord to the next object.

At the end of the chain there’s generally an object that sends audio, video or data to the world.

Several patches can be open and working at the same time.

Patches can be saved, and then entered as an object in another patch.

If the lock button (command + e) is on you won’t be able to edit the patch but you’ll be able to control objects like buttons or toggles.

Objects

The name of the object determines what it does like the name of a function.

There are a few hundred objects included with Max, from simple math to complex functions.

Arguments (the number in this case) specify initial values for the object to work with.

Data flows from the top to the bottom, it comes into the object via the inlets, and results are put out the outlets.

Each inlet or outlet on an object has a specific meaning.

The description is be displayed on rollover, on click and in in the documentation panel.

Objects may have several arguments and the function may change according to the number of arguments. Like with functions in programming languages, the order is important. Check counter object.

Some objects have a special type of argument called attribute. An attribute is a internal variable with a name @prefixed to it. The order of the attribute doesn’t matter.

Messages
Data flowing between objects is called message.

Messages have types that are similar to the variable types:
int, float: numbers
symbol: a string
list: similar to an array but containing values of different kinds separated by spaces
bang: an instantaneous event that triggers an action

There’s a completely different type of data also transmitted through chords, they are the signals we’ll cover later.

Understanding bangs and messages

My first musical patch

You change the display of the number object to visualize the note in the inspector panel.
Let’s control the speed with a number object or a slider (or a fancy dial).
Let’s change the random range with a list message.

Basic Math
In Max you can perform all the operations you normally have with procedural programming but they may be executed non-linearly. It’s important to figure out when certain processes are activated and when certain messages are read and produced.

If statements

Message boxes and objects may contain tokens like $1, $2 etc (to $9).
They refer to the values in the inlets numbered from left to right.

User interface inputs

Max patches are often controlled by external devices using protocols like MIDI or OSC or by sensors from Arduino, cameras, kinect etc. However, you can create your own software interfaces in Max.

Sound Synthesis
Since synthetic sounds are the root of Max, it’s good to know some basics.

Some object use a different kind of data called signal which is specific for audio. Signals can’t be mixed with normal messages, they even have a different cord color.

Here are some objects processing signals:

Pro-tip: the object scale is the equivalent of the map function in processing.

Let’s play with the interfaces elements and make some noise.

Using Samples
Max can manipulate sound samples as well.

The easy way is to use sfplay~ sending “open” messages and a trigger.

We are going to use an advanced object called groove~ that plays loops coupled with buffer~ that loads sound filed.

We’ll also need sig~ an object that converts numbers into signals.

Let’s try to control looping speed and looping points using the interface elements.

Downloads
Patches we tried in class
A collection of sound patches prepared by Dan Wilcox

Posted in

Post a comment