UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

26 lines (25 loc) 841 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OctaveShift = void 0; const enums_1 = require("./enums"); /** * The <octave-shift> element indicates where notes are shifted up or down from their performed values because of * printing difficulty. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/octave-shift/ */ class OctaveShift { element; constructor(element) { this.element = element; } /** Returns the octave shift type. Defaults to 'up'. */ getType() { return this.element.attr('type').withDefault('up').enum(enums_1.UP_DOWN_STOP_CONTINUE); } /** Returns the size of the octave shift. Defaults to 8. */ getSize() { return this.element.attr('size').withDefault(8).int(); } } exports.OctaveShift = OctaveShift;