Quarter-note beats per minute.
A copy of the underlying plain tempo value.
StaticofBuild a tempo from a beats-per-minute marking.
Quarter-note beats per minute.
The tempo.
StaticfromStaticfromRebuild a tempo from its Tempo.toJSON output.
The serialized tempo.
The wrapped tempo.
Wall-clock seconds from the downbeat to a position.
A position before the downbeat reports negative elapsed time: a pickup sounds before it, and asking when it sounds is a fair question.
Position in quarter-note beats.
Elapsed seconds, 0 at beat 0 and negative before it.
The position reached after a number of seconds — the inverse of Tempo.secondsAt.
Elapsed seconds from the downbeat; negative for a position before it, such as a pickup.
The position in quarter-note beats.
Duration in seconds of a span of beats.
The tempo is constant, so the span is measured from the downbeat: where it begins cannot change how long it lasts.
How long the span lasts, in quarter-note beats.
The span's duration in seconds.
Convert quarter-note beats to MIDI ticks, rounded to the nearest tick.
Position or length in quarter-note beats.
Pulses (ticks) per quarter note, e.g. 96, 480, or 960.
The whole tick count, negative before the first downbeat.
Convert MIDI ticks to quarter-note beats.
Whole tick count, negative before the first downbeat.
Pulses (ticks) per quarter note, e.g. 96, 480, or 960.
The position or length in quarter-note beats.
Whether another tempo carries the same marking.
The tempo to compare with.
True when both name the same beats per minute.
The plain tempo value, for JSON serialization.
Private class fields do not serialize, so an explicit toJSON keeps
JSON.stringify(tempo) from collapsing to {}.
A copy of the marking.
The marking, so a template literal or a log line reads as the tempo.
The marking, e.g. '120 bpm'.
An immutable constant tempo, in quarter-note beats per minute, and the conversions it settles: beats to wall-clock seconds and back, and beats to MIDI ticks and back.
One tempo, not a piece's tempo over time: a piece that changes tempo is described by a tempo map, which the tempo module's own functions read.
Example