@stringsync/vexml
Version:
MusicXML to Vexflow
29 lines (28 loc) • 884 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Pedal = void 0;
const enums_1 = require("./enums");
/**
* The <pedal> element represents piano pedal marks, including damper and sostenuto pedal marks.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/pedal/
*/
class Pedal {
element;
constructor(element) {
this.element = element;
}
/** Returns the type of pedal. Defaults to 'start'. */
getType() {
return this.element.attr('type').withDefault('start').enum(enums_1.PEDAL_TYPES);
}
/** Whether to show pedal signs. Defaults to false. */
sign() {
return this.element.attr('sign').str() === 'yes';
}
/** Whether to show pedal lines. Defaults to false. */
line() {
return this.element.attr('line').str() === 'yes';
}
}
exports.Pedal = Pedal;