At the most abstract level, a step is simply a number. Each track contains an array of one or more steps. A step array is a sequence of integer values, evenly spaced in time. The count of steps in the array is the track's Length, and the duration of each step is the track's Quant. A track's steps are played sequentially in a loop.
A track's step array resembles a time signature or meter, with Length as the numerator and Quant as the denominator, except that the Quant is specified in ticks. For example, assuming the default timebase of 120 ticks per quarter note, a five-step track with a Quant of 120 is equivalent to five quarter notes, or 5/4 time.
Specifically, a step is a 7-bit integer that can be unsigned or signed depending on the context. Steps can be interpreted as note velocities, controller values, or modulator values. A step's interpretation depends on what type of track the step belongs to, except for modulator tracks, in which case the interpretation depends on the modulation type.
Steps can be edited in the following ways:
Step values can also be imported from a text file containing comma-separated values (CSV format), which is useful if you want to generate step arrays with an external application.
Because a track's steps are evenly spaced in time, undesirably stiff rhythms may result. Rhythmic stiffness can be mitigated by adjusting the track's swing, or by applying offset modulation to the track.
Unsigned versus signed steps
Steps are stored in seven binary bits, and therefore have 27 or 128 possible values. The values range either from 0 to 127, or from −64 to +63, depending on whether the step is interpreted as an unsigned or signed number. This convention derives from the MIDI standard, which commonly uses 7-bit data for message parameters and data. For example the data of a MIDI control change message is considered unsigned for volume controls, but signed for pan controls. To convert a value from unsigned to signed, subtract 64 from it; to do the reverse, add 64. The following table shows some correspondences between unsigned and signed values.
Unsigned | Signed |
---|---|
127 | +63 |
96 | +32 |
64 | 0 |
32 | −32 |
0 | −64 |
Whether a step is interpreted as unsigned or signed depends on the context in which the step is used. The context is determined by the track type, except for modulator tracks, in which case it's determined by the modulation type.
Ticks
A tick is the smallest unit of relative time that can be used within a given MIDI composition. Ticks are related to beats (quarter notes) by the timebase, which specifies the number of ticks per beat. Various properties of a track, including the duration of its steps (also known as its Quant) are specified in ticks. The length of a tick in absolute time depends on the tempo, as shown below:
tick_length = 60 / tempo / timebase
At the default tempo (120 BPM) and timebase (120 TPQN), a tick is approximately four milliseconds long.