← back to chapter

warp-math · meter is not tempo

Two layers sharing one timeline. Tempo (the integral you already met) decides when a beat happens, in seconds. Meter decides what a beat is called — which beat is a downbeat, which is interior — using only integer division and modulo. The metronome below makes that visible and audible: the accent click on downbeats is the meter layer in one tone. Drag the warp marker and notice that beats move in time but the accent pattern doesn't budge.

meter

The list of {fromBeat, beatsPerBar} segments is the whole meter layer — everything below reads downbeats from it.

tempo (constant, BPM)

We use a single steady tempo so the meter change is unambiguously audible: tempo is what it is, only the accent moves. The warp marker drag below introduces a deliberate tempo distortion on top, to show the layers remain independent.

transport

beats: · downbeats: · β at playhead: · bar/pos:

Tall stroke = downbeat (per barPositionOf(meterMap, i).isDownbeat). Orange dot = draggable warp marker (drag it left or right to re-pin a beat in seconds via pin()). Pinned, the second-time of every downbeat after the marker shifts — but the identity of those downbeats does not.

The two layers in numbers

For each downbeat in the sequence, the table below shows the meter facts (bar number, position-in-bar, from barPositionOf) alongside the tempo facts (beat index, second-time, from beatsToSeconds). Drag the warp marker and watch the second-time column move while the bar / position columns stay still — the demonstration of independence.

beat bar (meter) beat in bar (meter) second (tempo)