UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

17 lines (16 loc) 500 B
import { DYNAMIC_TYPES } from './enums'; /** * Dynamics can be associated either with a note or a general musical direction. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/dynamics/ */ export class Dynamics { element; constructor(element) { this.element = element; } /** Returns the dynamic types associated with this element. */ getTypes() { return this.element.children(...DYNAMIC_TYPES.values).map((child) => child.name); } }