UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

25 lines (24 loc) 712 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.HammerOn = void 0; const enums_1 = require("./enums"); /** * The `<hammer-on>` element is used in guitar and fretted instrument notation. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/hammer-on/ */ class HammerOn { element; constructor(element) { this.element = element; } /** Returns the number of the hammer-on. Defaults to null. */ getNumber() { return this.element.attr('number').int(); } /** Returns the type of hammer-on. */ getType() { return this.element.attr('type').enum(enums_1.START_STOP); } } exports.HammerOn = HammerOn;