In addition to Max's built-in clock-time scheduler, Max also has a feature to support tempo-relative musical-time scheduling. The musical timing feature is called the "global transport". Like the transport feature in most DAWs, Max's global transport allows one to set the tempo and the meter signature of musical time, start and stop the passage of musical time (in reference to a time 0 starting point), and refer to time in terms of bars, beats, and units. So-called "units" are fractions of a quarter note, for finer-resolution timing, also known as ticks, a.k.a. pulses-per-quarter (ppq). The number of pulses per quarter note (ppq) used for fine-resolution musical timing is usually some number that can be divided by 2, 3, 4, and ideally 5. The ppq value in MIDI is 24 by default, whereas in DAWs it is usually 480 or 960. In Max's global transport, the number of ticks (ppq) is 480.
When programming in Max, you can access the global transport via the transport object, and some of its related objects such as when (to find out what the current time is in the global transport), timepoint (to send out a bang at a specific moment in musical time), and translate (to convert between different time formats in musical time and clock time). And, by using the global transport for musical timing, you can refer to timings and durations using Max's time value syntax. The following video and set of Max Cookbook examples will help you learn about the transport object and Max's way of handling musical timing.
Hello Transport
We already know how to work with clock-time inside Max. The metro object, for example, can be set to bang each 250 milliseconds. But if we want to use tempo-relative timing in this case we need to set the metro object to bang, say, every quarter note, by writing the appropriate notevalue nomenclature. By the way, you can find out all about these nomenclatures by opening the reference window, scrolling down to Max Guides, and opening the Time Value Syntax page. Let's get back to our patch and try our new metro object. You will notice that even though we are toggling it on, it doesn't to do anything. This is because all tempo-relative timing operations are dependent on a transport. In Max 8 there are at least 3 ways to start the global transport. You can toggle the play/pause button on the bottom right corner of the toolbar. You can create a transport object and control it with a toggle. Or you can open the global transport window, either by double clicking the transport object, or by navigating to Extras > Global Transport. In this Global transport window, you have immediate access to several useful parameters, such as time signature and tempo. Shall you change the tempo, for instance, you will notice that the quarter note metro will bang differently.
Transport & friends
Sometimes you might not want to rely on having to interact with this Global Transport window. In fact, everything that you can do with this window you can also achieve with the transport object in your patch. Besides, the Global Transport window is itself a max patch which relies on the transport object. If you connect message boxes to the transport object outlets, you will be able to retrieve information about its current state by sending it a bang. Now it would be easier to have this information be updated automatically, so we can use a metro to refresh the output information every quarter note, making sure that it will automatically start and be in sync with the transport. Here we have bars, beats, and units. If we want to restart the transport we can use its second inlet which sets the transport to a given position in time, in ticks. The transport object has a couple friends that work well with it. The timepoint object allow us to set a specific point in time - as a bars, beats, units argument -, at which it will send out a bang. Another friend, the when object, allows us to retrieve the precise moment in time, either as bars, beats, units, or ticks, when we send it a bang. Finally, the translate object allows us to convert between different units of time, say notevalues and milliseconds, which in turn could be useful to control other objects that typically don't work with one or the other unit of time. In this example, we are using the translate to help us set the size of a buffer, which only works in milliseconds, as the duration of a quarter note. Again, if we go back to the transport and change the current tempo, the absolute time duration of a quarter note will change, and thus the translate object will convert accordingly.
To gain experience with this way of thinking of events in terms of the musical timing and musical rhythm, write a Max patch that uses the Max transport object and one or more related objects such as metro, translate, timepoint, and/or phasor~. Make something happen in a particular rhythm (play some MIDI notes, or trigger some sound files, or modulate a sound), in such a way that you can change its underlying tempo (the tempo attribute of the transport object) without changing the rhythm.
Self-Quiz
What is the basic unit of time for Max's clock-time scheduler?
Millisecond
What object allows you to use musical timing in Max
transport
What musical unit is most commonly used to designate a beat?
Quarter note
What is syncopation?
Displacement of a sonic event to create an unexpected effect
How many ticks are there per quarter note in Max's musical timing?
480
Additional Resources
Algorithmic Composition - A collection of essays on algorithmic composition, with sonic, musical, and visual examples in Max, by Christopher Dobrian.
Max Cookbook: Useful and Instructive Programming Examples, by Christopher Dobrian
This page was last modified May 27, 2019 by Christopher Dobrian, dobrian@uci.edu.