UNPKG

@perry-rylance/midi-to-milliseconds

Version:

TypeScript library for resolving MIDI event times to milliseconds. Useful for syncing things like graphics to MIDI.

22 lines (19 loc) 389 B
import { Event } from "@perry-rylance/midi"; export type AbsoluteTime = { ticks: number; milliseconds?: number; } export default class TimeResolvedEvent { index?: number; original: Event; absolute: AbsoluteTime; constructor(event: Event, absolute: AbsoluteTime = { ticks: 0, milliseconds: 0 }) { this.original = event; this.absolute = absolute; } }