UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

21 lines (20 loc) 586 B
import { START_STOP } from './enums'; /** * A `<slide>` is continuous between the two pitches and defaults to a solid line. * * See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/slide/ */ export class Slide { element; constructor(element) { this.element = element; } /** Returns the slide type. Defaults to null. */ getType() { return this.element.attr('type').enum(START_STOP) ?? null; } /** Returns the slide number. Defaults to 1. */ getNumber() { return this.element.attr('number').int() ?? 1; } }