UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

37 lines (36 loc) 1.07 kB
import { NamedElement } from '../util'; import { NoteType } from './enums'; /** The details of a metronome mark. */ export type MetronomeMark = { left: NoteMetronomeOperand; right: NoteMetronomeOperand | BpmMetronomeOperand; }; type NoteMetronomeOperand = { type: 'note'; unit: NoteType; dotCount: number; }; type BpmMetronomeOperand = { type: 'bpm'; bpm: number; }; /** * Represents metronome marks and other metric relationships. * * Only supports simple meters in the form of [beat-unit symbol] = [bpm]. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/metronome/. */ export declare class Metronome { private element; constructor(element: NamedElement<'metronome'>); /** Returns whether the metronome mark is in parentheses. */ parentheses(): boolean; /** Returns the metronome mark details. Defaults to a quarter note = 120 bpm. */ getMark(): MetronomeMark | null; private noteOperand; private bpmOperand; private isWellFormedNote; private isWellFormedBpm; } export {};