bemusic/bemuse

View on GitHub
packages/bemuse-indexer/src/duration.ts

Summary

Maintainability
A
0 mins
Test Coverage
import _ from 'lodash'
import * as BMS from 'bms'

export function getDuration(notes: BMS.Notes, timing: BMS.Timing) {
  const maxBeat = _(notes.all()).map('beat').max() || 0
  return timing.beatToSeconds(maxBeat)
}