@stringsync/vexml
Version:
MusicXML to Vexflow
23 lines (22 loc) • 1.96 kB
TypeScript
import * as data from '../../data';
import * as musicxml from '../../musicxml';
import { Fraction } from '../../util';
import { Notehead, StemDirection } from './enums';
/** Converts a `NoteType` to a `DurationType`. Defaults to null. */
export declare const fromNoteTypeToDurationType: (noteType: musicxml.NoteType | null) => data.DurationType | null;
export declare const fromFractionToDurationType: (fraction: Fraction) => [durationType: data.DurationType, dotCount: number];
/** Converts from a `Stem` to a `StemDirection`. Defaults to 'auto'. */
export declare const fromStemToStemDirection: (stem: musicxml.Stem | null) => StemDirection;
/** Converts a MusicXML `Notehead` to a `Notehead`. Defaults to ''. */
export declare const fromNoteheadToNotehead: (notehead: musicxml.Notehead | null) => Notehead;
/** Converts an `AccidentalType` to an `AccidentalCode`. Defaults to null. */
export declare const fromAccidentalTypeToAccidentalCode: (accidentalType: musicxml.AccidentalType | null) => data.AccidentalCode | null;
/** Converts an `alter` to an `AccidentalCode`. Defaults to 'n'. */
export declare const fromAlterToAccidentalCode: (alter: number | null) => data.AccidentalCode;
/** Converts MusicXML clef properties to a `ClefSign`. Defaults to 'treble'. */
export declare const fromClefPropertiesToClefSign: (sign: musicxml.ClefSign | null, line: number | null) => data.ClefSign;
/** Converts the number of fifths to a major key. */
export declare const fromFifthsToMajorKey: (fifths: number) => "D" | "G" | "C" | "F" | "Cb" | "Gb" | "Db" | "Ab" | "Eb" | "Bb" | "A" | "E" | "B" | "F#" | "C#";
/** Converts the number of fifths to a minor key. */
export declare const fromFifthsToMinorKey: (fifths: number) => "Abm" | "Ebm" | "Bbm" | "Fm" | "Cm" | "Gm" | "Dm" | "Am" | "Em" | "Bm" | "F#m" | "C#m" | "G#m" | "D#m" | "A#m";
export declare const fromMusicXMLBarStyleToBarlineStyle: (barStyle: musicxml.BarStyle | undefined) => data.BarlineStyle | null;