@stringsync/vexml
Version:
MusicXML to Vexflow
25 lines (24 loc) • 756 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WavyLine = void 0;
const enums_1 = require("./enums");
/**
* Wavy lines are one way to indicate trills and vibrato.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wavy-line/.
*/
class WavyLine {
element;
constructor(element) {
this.element = element;
}
/** Returns the number of the wavy line. Defaults to 1. */
getNumber() {
return this.element.attr('number').withDefault(1).int();
}
/** Returns the type of the wavy line. Defaults to start. */
getType() {
return this.element.attr('type').withDefault('start').enum(enums_1.START_STOP_CONTINUE);
}
}
exports.WavyLine = WavyLine;