Time Value Syntax

Most Max objects that deal with timed events, like metro, phasor~, and pipe, can represent time in multiple ways. In general these fall into two categories: Fixed time values and Tempo-relative time values. Fixed values express time in milliseconds or some other absolute units. Tempo-relative values depend on the current tempo and time signature, as set by a transport object (or the Global Transport).

Fixed Time Values

Some objects using Fixed time values
Some objects using Fixed time values

UnitFormatExampleNotes
millisecondsms suffix100 msThe default for objects like metro
hours/minutes/seconds: between each number01:03:45.2501 hour, 3 minutes, 45 seconds, and 250 milliseconds. The millisecond value after the decimal is optional.
hours/minutes/secondslist of 3 or 4 numbers, followed by hh:mm:ss1 3 45 250 hh:mm:ssAn equivalent option for representing time in terms of hours/minutes/seconds/milliseconds
samplessamples suffix1000 samplesThe actual duration will depend on the sample rate
frequencyhz suffix5 hzThe inverse of milliseconds, so 2 hz is equivalent to 500 ms.

Tempo-relative Time Values

Some objects using Tempo-relative time values
Some objects using Tempo-relative time values

All Tempo-relative Time Values can be expressed in terms of ticks, where one tick is 1/4801/480 of a quarter note (equivalently, there are 480 ticks in one quarter note).

UnitFormatExampleNotes
ticksticks suffix100 ticksIn places where only tempo-relative time values are allowed, such as the @quantize attribute of the metro object, values in ticks can be specified as a single number. In places where both fixed and tempo-relative units are accepted, such as the @interval attribute of a metro object, a value in ticks must be followed by ticks to be interpreted as ticks instead of milliseconds.
note valuessee "Note Values" table4ntSymbols that abbreviate musical note time values—see the table below for recognized values.
bars/beats/units. between each number2.4.2402 bars, 4 beats, 240 ticks. When you need to use a single value, bars/beats/units can be separated by periods.
bars/beats/unitsthree numbers2 4 240When you can pass a list of values, bars/beats/units can be specified by separate numbers like this. When an object will accept Fixed or Tempo-relative time values, you can add bbu to make sure the list is understood as bars/beats/units and not hours/minutes/seconds.

Note Values in Ticks

NoteTicksInterpretation
1nd2880 ticksDotted whole note
1n1920 ticksWhole note
1nt1280 ticksWhole note triplet
2nd1440 ticksDotted half note
2n960 ticksHalf note
2nt640 ticksHalf note triplet
4nd720 ticksDotted quarter note
4n480 ticksQuarter note
4nt320 ticksQuarter note triplet
8nd360 ticksDotted eighth note
8n240 ticksEighth note
8nt160 ticksEighth note triplet
16nd180 ticksDotted sixteenth note
16n120 ticksSixteenth note
16nt80 ticksSixteenth note triplet
32nd90 ticksDotted thirty-second note
32n60 ticksthirty-second note
32nt40 ticksthirty-second-note triplet
64nd45 ticksDotted sixty-fourth note
64n30 ticksSixty-fourth note
128n15 ticksOne-hundred-twenty-eighth note

Positions vs Intervals

Some objects will interpret a Tempo-relative value in bars/beats/units as a position, while others will interpret the same value as an interval. For example, the timepoint object fires an event at a point in time, and would interpret the bars/beats/units value 1 1 0 bbu as a point in time on the first beat of the first measure—in other words at time zero. Attributes like the @quantize attribute of metro on the other hand wil interpret the same value 1 1 0 bbu as an interval of one bar and one beat, or 5 beats in 4/44/4 time (interval, quantization, and delay attributes of objects are generally time intervals).

The translate object has a @mode attribute that can convert time units as either intervals or positions.