UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

41 lines (40 loc) 1.68 kB
import { Attributes } from './attributes'; import { Barline } from './barline'; import { NamedElement } from '../util'; import { Note } from './note'; import { Print } from './print'; import { Backup } from './backup'; import { Forward } from './forward'; import { Direction } from './direction'; export type MeasureEntry = Attributes | Note | Backup | Forward | Direction; /** * Measure is a basic musical data container that has notes and rests. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/measure-partwise/ */ export declare class Measure { private element; constructor(element: NamedElement<'measure'>); isImplicit(): boolean; /** Returns the measure number or an empty string if missing. */ getNumber(): string; /** Returns the specified measured width in tenths. Defaults to null. */ getWidth(): number | null; /** Returns the <attributes> element of the measure. */ getAttributes(): Attributes[]; /** Returns the entries of the measure. */ getEntries(): MeasureEntry[]; /** Returns the barlines of the measure. */ getBarlines(): Barline[]; /** Returns the prints of the measure. */ getPrints(): Print[]; /** Returns the ending measure for multi rest measures, or itself otherwise. */ getEndingMeasure(): Measure; /** * Returns the first sound[tempo] specification in the measure. * * Technically, this can be specified multiple times per measure, but this is a simplification that covers most music. * This is independent of the <metronome> element, which describes how to signal metronome engravings. */ getFirstTempo(): number | null; }