UNPKG

@stringsync/vexml

Version:

MusicXML to Vexflow

33 lines (32 loc) 896 B
import { NamedElement } from '../util'; import { SyllabicType } from './enums'; export type LyricComponent = { type: 'syllabic'; value: SyllabicType; } | { type: 'text'; value: string; } | { type: 'elision'; value: string; }; /** * The <lyric> element represents text underlays for lyrics. * * https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/lyric/ */ export declare class Lyric { private element; constructor(element: NamedElement<'lyric'>); /** Returns the verse number the lyric belongs to. Defaults to 1. */ getVerseNumber(): number; /** * Returns the components of the lyric. * * This method assumes that the lyric children adhere to the MusicXML spec — it does not coerc values. */ getComponents(): LyricComponent[]; private createSyllabic; private createText; private createElision; }