Max can be set to control and generate time. It can then be used to control, organise or order musical events.

 

Metro object

The simplest object is the metro object. Once turned on, it simply triggers bangs at a specific time interval set in its right inlet.

screen-shot-2016-10-17-at-23-37-18

The metro objects and its satellite objects (the toggle, the number box, and the bang)

As one can imagine, those regularly timed bangs can be used to fed or trigger other objects: they can be counted by a counter object and then used as a sequencer for example; they can trigger sounds if attached to their function envelope for example; they can be directed and used in several places in the patcher; they can be delayed, and cause a chain of events to produce musical effects or time effects. There can be more than one metro object in a patcher, thus allowing for a very complex set of time sequences.

Here is a list of objects that could be used in combination with metro.

metro+ counter + select/split/modulo

The basic bangs output by metro can be labelled by counting them with a counter object. This allows us to have not just a sequence of bangs, but an ordered sequence of numbers, which can be selected, routed, or sent to mathematical/comparison operators.

screen-shot-2016-10-17-at-23-46-58

The select object in action

In the picture just shown, the initial single bang output by a metro has been transformed in 4 different bangs, allowing us to route them to different objects or area of the patcher, to create different and independent musical or algorithmic events.

 

In the following example, another counter is counting the metro bangs from 1 to 40 (a different range than the first example), and these are sent to a split object which sends out from its leftmost outlet only numbers below 17, and from its rightmost outlet the numbers above. It is thus a simple threshold, to divide a stream of numbers over two separate destinations. These numbers can then go and control musical parameters in your synth, or some other data you need to affect to create other algorithmic processes in Max.

screen-shot-2016-10-17-at-23-50-08

The split object in action

Mathematical operations can also be done, once the metro bangs are converted into numbers: in this example, the modulo object is used, which returns the remainder of the incoming number divided by the preset value. It can be used for very powerful effects in beat sequencing, as a musical beat can be changed in 2 or 3 or 4 beats per bar with just one click.

In the video above, the counter does not have a fixed range, but will run infinitely. Thanks to the mathematics of the modulo object, the remainder of whichever high or low integer will always fall within the range set by the divisor.

Therefore an infinite count can dynamically return a remainder falling between 1-4, 1-8, 1-2 ranges or up to the value of whichever integer is set into the right inlet of the modulo. Sending the data from the modulo object to the usual select object will allow us to convert the numbers back again into bangs, and to independently direct them wherever they can be used.

metro + Toggle/decide

The bang of a metro can be converted into numbers with a counter. It can also activate objects to take some decision about their state. If a metro is sent to a toggle, the toggle at each bang will change into 0/1 alternatively. A more curious object is the decide object, whose decision about its state (0 or 1) is instead unpredictable. It is worth also looking into the prob object, which would add some interesting probability calculations to this method.

screen-shot-2016-10-18-at-00-18-39

the toggle and decide objects in action: despite similarly receiving the same bang in their inlet, toggle turned to 0, decide instead opted for staying on 1. How about prob?

metro + random

An all time favourite is the practice of using metro to trigger the random object. Random is designed to trigger a number, choosing randomly within a preset range. It is very useful for letting the computer trigger values in an unpredictable way, adding a bit of spice to the musical or data processes.

screen-shot-2016-10-18-at-00-24-31

In the above picture, random is set on 400, which means its random choice will fall between the range 0-399 (400 numbers in total). Its choice is then scaled by using the very useful object scale, transforming the range between 1500-4000, which is then used to change the frequency of the oscillator just below. Of course, the randomly produced values can be used for anything else you might think of.

bang/METRO + delay

Another interesting option is applying some delay to a simple bang or to those triggered by metro. That would cause an interesting multiplication of time events, useful for rhythmical variations, or for distributing events in a more complex way.

screen-shot-2016-10-18-at-22-08-40

bang and its subsequent series of delays

Transport, Timepoints, and Tempo

Another method is to use objects that don’t just generally refer to milliseconds but more properly mark musical tempo, like beats, bars, and standard metronome ticks. Throughout Max runs a general transport, that is a global invisible timeline that can be played like in a normal digital audio workstation (DAW), and generates time events along its course.

Have a look at the Max reference and Help the following objects: Transport, timepoint, tempo.

The time events they produce can be similarly used as with metro, so the same explanation works for them too.

More valuable objects that deal with time to have a look at:

Pipe: to delay numbers, list, or symbols (text)

clocker: to report elapsed times at regular intervals

timer: to report elapsed time between two events