diff options
Diffstat (limited to 'tools/timeline_editor/timeline-playback.js')
| -rw-r--r-- | tools/timeline_editor/timeline-playback.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/timeline_editor/timeline-playback.js b/tools/timeline_editor/timeline-playback.js index bfeb75a..17223ac 100644 --- a/tools/timeline_editor/timeline-playback.js +++ b/tools/timeline_editor/timeline-playback.js @@ -117,7 +117,7 @@ export class PlaybackController { } } if (this.state.audioDuration > 0) { - maxTime = Math.max(maxTime, this.state.audioDuration * this.state.bpm / 60.0); + maxTime = Math.max(maxTime, this.state.audioDuration * this.state.beatsPerSecond); } const w = maxTime * this.state.pixelsPerSecond; @@ -313,10 +313,10 @@ export class PlaybackController { // Helpers beatsToTime(beats) { - return beats * 60.0 / this.state.bpm; + return beats * this.state.secondsPerBeat; } timeToBeats(seconds) { - return seconds * this.state.bpm / 60.0; + return seconds * this.state.beatsPerSecond; } } |
