UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

21 lines (20 loc) 658 B
import { FERMATA_SHAPES, FERMATA_TYPES } from './enums'; /** * The `<fermata>` element content represents the shape of the fermata sign. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/fermata/ */ export class Fermata { element; constructor(element) { this.element = element; } /** Returns the shape of the fermata. Defaults to normal. */ getShape() { return this.element.content().enum(FERMATA_SHAPES) ?? 'normal'; } /** Returns the type of fermata. Defaults to upright. */ getType() { return this.element.attr('type').withDefault('upright').enum(FERMATA_TYPES); } }