Skip to main content

build_tempo_map

Function build_tempo_map 

Source
pub fn build_tempo_map(file: &SmfFile) -> TempoMap
Expand description

Build a TempoMap from a parsed SMF.

Collects every tempo meta-event across all tracks (converting each track’s per-track delta times to absolute ticks), sorts them by tick, and guarantees an entry at tick 0. For format-1 files tempo events conventionally live in track 0, but events found in any track are honoured.