UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

25 lines (24 loc) 723 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Wedge = void 0; const enums_1 = require("./enums"); /** * Represents a cescendo or diminuendo wedge symbols. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wedge/ */ class Wedge { element; constructor(element) { this.element = element; } /** Returns the type of the wedge. Defaults to null. */ getType() { return this.element.attr('type').enum(enums_1.WEDGE_TYPES); } /** Indicates the gap between the top and bottom of the wedge. Defaults to 0. */ getSpread() { return this.element.attr('spread').withDefault(0).int(); } } exports.Wedge = Wedge;