UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

31 lines (30 loc) 941 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MeasureStyle = void 0; /** * The <measure-style> element indicates a special way to print partial to multiple measures within a part. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/measure-style/ */ class MeasureStyle { element; constructor(element) { this.element = element; } /** * Returns the stave number this measure style belongs to. Defaults to null, implying that it should apply to all * staves. */ getStaveNumber() { return this.element.attr('number').int(); } /** * Returns how many measures the rest spans. * * Defaults to 0. A value of 0 indicates that there are no multiple rests. */ getMultipleRestCount() { return this.element.first('multiple-rest')?.content().int() ?? 0; } } exports.MeasureStyle = MeasureStyle;