Convert a beat number to time in seconds using the BPM list.
Finds the latest BPM change that starts at or before beat, then interpolates linearly from that change's reference time.
beat
Sorted array of BPM entries (must have been initialized with initBpmList).
Beat number.
Time in seconds.
// At 120 BPM, beat 4 takes exactly 2 secondsconst bpmList = [{ bpm: 120, startBeat: 0, startTimeSec: 0, startTime: [0,0,1] }];getTimeSec(bpmList, 4); // 2.0 Copy
// At 120 BPM, beat 4 takes exactly 2 secondsconst bpmList = [{ bpm: 120, startBeat: 0, startTimeSec: 0, startTime: [0,0,1] }];getTimeSec(bpmList, 4); // 2.0
Convert a beat number to time in seconds using the BPM list.
Finds the latest BPM change that starts at or before
beat, then interpolates linearly from that change's reference time.