@stringsync/vexml
Version:
MusicXML to Vexflow
21 lines (20 loc) • 633 B
JavaScript
import { START_STOP_CONTINUE } from './enums';
/**
* Wavy lines are one way to indicate trills and vibrato.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wavy-line/.
*/
export 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(START_STOP_CONTINUE);
}
}