The beat reached after a number of seconds — the inverse of beatsToSeconds.
Elapsed seconds from the map's first event; negative for a position before it, such as a pickup.
The tempo map.
The position in quarter-note beats.
If the map is malformed or seconds is not finite.
seconds
import { secondsToBeats } from '@libraz/libcantus';const map = [{ startBeat: 0, bpm: 120 }, { startBeat: 4, bpm: 60 }];secondsToBeats(6, map); // 8 Copy
import { secondsToBeats } from '@libraz/libcantus';const map = [{ startBeat: 0, bpm: 120 }, { startBeat: 4, bpm: 60 }];secondsToBeats(6, map); // 8
The beat reached after a number of seconds — the inverse of beatsToSeconds.