Skip to content

Change Tempo

Set the piece’s starting tempo before sending patterns to tracks. Tempo is shared by audio and MIDI.

set_bpm(120, 4);

This gives four beats per cycle at 120 BPM: a cycle lasts two seconds. Use set_bpm(90, 3) for three beats per cycle at 90 BPM. Pass the beats per cycle explicitly when changing meter; omitting it uses four.

To change the running tempo without changing project metadata, evaluate:

set_bpm(128, 4);

If the session is following an external MIDI clock, set_bpm() is ignored with a message. Return to the internal clock with set_midi_clock_source() before setting the tempo yourself.

Register a callback that chooses the tempo from the current cycle, so seeking to a later cycle chooses that section’s tempo too:

set_bpm(120, 4);
on_cycle(fn(cycle) {
if cycle < 8 {
set_bpm(120, 4);
} else {
set_bpm(100, 4);
}
});
PLAY;

Play through cycle 8 and check the slower tempo. Then stop, evaluate SEEK 8; and play again to check the later section directly. Keep this callback registered only once: before replacing it, run off_cycle(), which clears all cycle callbacks, then register the callbacks you need again.

Resonon has no dedicated tempo-map or tempo-ramp API. This callback is a live-session recipe for cycle-based changes, not an editable tempo lane. For a fixed-tempo file render, put set_bpm() before the render call.

Cycles and Time explains the time model; set_bpm and on_cycle give the signatures.