UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

25 lines (24 loc) 709 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Slide = void 0; const enums_1 = require("./enums"); /** * A `<slide>` is continuous between the two pitches and defaults to a solid line. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/slide/ */ class Slide { element; constructor(element) { this.element = element; } /** Returns the slide type. Defaults to null. */ getType() { return this.element.attr('type').enum(enums_1.START_STOP) ?? null; } /** Returns the slide number. Defaults to 1. */ getNumber() { return this.element.attr('number').int() ?? 1; } } exports.Slide = Slide;