Options
All
  • Public
  • Public/Protected
  • All
Menu

Helper class, which contains static methods which actually convert from OSMD objects to VexFlow objects.

Hierarchy

  • VexFlowConverter

Index

Constructors

Properties

majorMap: {} = ...

Mapping from numbers of alterations on the key signature to major keys

Type declaration

  • [_: number]: string
minorMap: {} = ...

Mapping from numbers of alterations on the key signature to minor keys

Type declaration

  • [_: number]: string

Methods

  • Clef(clef: ClefInstruction, size?: string): { annotation: string; size: string; type: string }
  • NoteHeadCode(notehead: Notehead): string
  • StrokeTypeFromArpeggioType(arpeggioType: ArpeggioType): Type
  • durations(fraction: Fraction, isTuplet: boolean): string[]
  • Convert a fraction to Vexflow string durations. A duration like 5/16 (5 16th notes) can't be represented by a single (dotted) note, so we need to return multiple durations (e.g. for 5/16th ghost notes). Currently, for a dotted quarter ghost note, we return a quarter and an eighth ghost note. We could return a dotted quarter instead, but then the code would need to distinguish between notes that can be represented as dotted notes and notes that can't, which would complicate things. We could e.g. add a parameter "allowSingleDottedNote" which makes it possible to return single dotted notes instead. But currently, this is only really used for Ghost notes, so it doesn't make a difference visually. (for other uses like StaveNotes, we calculate the dots separately)

    Parameters

    • fraction: Fraction

      a fraction representing the duration of a note

    • isTuplet: boolean

    Returns string[]

    Vexflow note type strings (e.g. "h" = half note)

Generated using TypeDoc