@stringsync/vexml
Version:
MusicXML to Vexflow
21 lines (20 loc) • 601 B
JavaScript
import { WEDGE_TYPES } from './enums';
/**
* Represents a cescendo or diminuendo wedge symbols.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/wedge/
*/
export class Wedge {
element;
constructor(element) {
this.element = element;
}
/** Returns the type of the wedge. Defaults to null. */
getType() {
return this.element.attr('type').enum(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();
}
}