UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

24 lines (23 loc) 907 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.TimeModification = void 0; /** * Time modification indicates tuplets, double-note tremolos, and other durational changes. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/time-modification/ */ class TimeModification { element; constructor(element) { this.element = element; } /** Describes how many notes are played in the time usually occupied by the number in the `<normal-notes>` element. */ getActualNotes() { return this.element.first('actual-notes')?.content().int() ?? 1; } /** Describes how many notes are usually played in the time occupied by the number in the `<actual-notes>` element. */ getNormalNotes() { return this.element.first('normal-notes')?.content().int() ?? 1; } } exports.TimeModification = TimeModification;