@stringsync/vexml
Version:
MusicXML to Vexflow
125 lines (124 loc) • 7.51 kB
TypeScript
import { Enum, EnumValues } from '../util';
/**
* The direction of the stem of a note.
*/
export type StemDirection = EnumValues<typeof STEM_DIRECTIONS>;
export declare const STEM_DIRECTIONS: Enum<readonly ["auto", "up", "down", "none"]>;
/**
* The translation of the clef sign and line.
*
* See https://github.com/0xfe/vexflow/blob/ea48402cb22a312249719fdbdb0766240678156d/src/clef.ts#L68
*/
export type ClefSign = EnumValues<typeof CLEF_SIGNS>;
export declare const CLEF_SIGNS: Enum<readonly ["treble", "french", "subbass", "baritone-f", "bass", "baritone-c", "tenor", "mezzo-soprano", "soprano", "alto", "percussion", "tab"]>;
/**
* The <mode> element is used to specify major/minor and other mode distinctions.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/mode/
*/
export type KeyMode = EnumValues<typeof KEY_MODES>;
export declare const KEY_MODES: Enum<readonly ["none", "major", "minor", "dorian", "phrygian", "lydian", "mixolydian", "aeolian", "ionian", "locrian"]>;
/**
* The accidental code from VexFlow. The list only contains typical accidentals from Western music and is currently not
* exhaustive.
*
* See https://github.com/0xfe/vexflow/blob/17755d786eae1670ee20e8101463b3368f2c06e5/src/tables.ts#L169
*/
export type AccidentalCode = EnumValues<typeof ACCIDENTAL_CODES>;
export declare const ACCIDENTAL_CODES: Enum<readonly ["#", "##", "b", "bb", "n", "d", "_", "db", "+", "++"]>;
/**
* The suffix for a fully qualified key.
*
* See https://github.com/0xfe/vexflow/blob/974fe1aaf5bb6270577053200a59c87b32d99d31/src/tables.ts#L817
*/
export type Notehead = EnumValues<typeof NOTEHEADS>;
export declare const NOTEHEADS: Enum<readonly ["", "D0", "D1", "D2", "D3", "T0", "T1", "T2", "T3", "X0", "X1", "X2", "X3", "S1", "S2", "R1", "R2", "DO", "RE", "MI", "FA", "FAUP", "SO", "LA", "TI", "D", "H", "N", "G", "M", "X", "CX", "CI", "S", "SQ", "TU", "TD", "SF", "SB"]>;
/**
* Indicates how to display a time signature.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/data-types/time-symbol/
*/
export type TimeSymbol = EnumValues<typeof TIME_SYMBOLS>;
export declare const TIME_SYMBOLS: Enum<readonly ["common", "cut", "dotted-note", "normal", "note", "single-number", "hidden"]>;
/**
* The horizontal justification of an annotation.
*
* See https://github.com/vexflow/vexflow/blob/d602715b1c05e21d3498f78b8b5904cb47ad3795/src/annotation.ts#L19
*/
export type AnnotationHorizontalJustification = EnumValues<typeof ANNOTATION_HORIZONTAL_JUSTIFICATIONS>;
export declare const ANNOTATION_HORIZONTAL_JUSTIFICATIONS: Enum<readonly ["left", "center", "right", "centerstem"]>;
/**
* The vertical justification of an annotation.
*
* See https://github.com/vexflow/vexflow/blob/d602715b1c05e21d3498f78b8b5904cb47ad3795/src/annotation.ts#L26
*/
export type AnnotationVerticalJustification = EnumValues<typeof ANNOTATION_VERTICAL_JUSTIFICATIONS>;
export declare const ANNOTATION_VERTICAL_JUSTIFICATIONS: Enum<readonly ["top", "center", "bottom", "centerstem"]>;
/**
* DurationType corresponds to the fraction duration of a note. The values are vexflow-specific.
*
* See https://github.com/0xfe/vexflow/blob/17755d786eae1670ee20e8101463b3368f2c06e5/src/tables.ts#L16.
*/
export type DurationType = EnumValues<typeof DURATION_TYPES>;
export declare const DURATION_TYPES: Enum<readonly ["1024", "512", "256", "128", "64", "32", "16", "8", "4", "2", "1", "1/2"]>;
/**
* CurvePlacement is the placement of the curve relative to the note.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/slur/#:~:text=any%20notation%20type.-,placement,-above%2Dbelow
*/
export type CurvePlacement = EnumValues<typeof CURVE_PLACEMENTS>;
export declare const CURVE_PLACEMENTS: Enum<readonly ["auto", "above", "below"]>;
/**
* CurveOpening is the direction of the curve opening.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/slur/#:~:text=MusicXML%20document%20order.-,orientation,-over%2Dunder
*/
export type CurveOpening = EnumValues<typeof CURVE_OPENING>;
export declare const CURVE_OPENING: Enum<readonly ["auto", "up", "down"]>;
/**
* The above-below type is used to indicate whether one element appears above or below another element.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/data-types/above-below/
*/
export type TupletPlacement = EnumValues<typeof TUPLET_PLACEMENTS>;
export declare const TUPLET_PLACEMENTS: Enum<readonly ["above", "below"]>;
/**
* The ending bracket type, which could be used for ending starts or ending ends.
*
* See https://github.com/vexflow/vexflow/blob/d602715b1c05e21d3498f78b8b5904cb47ad3795/src/stavevolta.ts#L7
*/
export type EndingBracketType = EnumValues<typeof ENDING_BRACKET_TYPES>;
export declare const ENDING_BRACKET_TYPES: Enum<readonly ["begin", "mid", "end", "both"]>;
/**
* The barline style of a measure.
*
* See https://github.com/vexflow/vexflow/blob/d602715b1c05e21d3498f78b8b5904cb47ad3795/src/stavebarline.ts#L10
*/
export type BarlineStyle = EnumValues<typeof BARLINE_STYLES>;
export declare const BARLINE_STYLES: Enum<readonly ["single", "double", "end", "repeatstart", "repeatend", "repeatboth", "none"]>;
/** The repetition symbol of a measure. */
export type RepetitionSymbol = EnumValues<typeof REPETITION_SYMBOLS>;
export declare const REPETITION_SYMBOLS: Enum<readonly ["segno", "coda"]>;
/**
* The different kinds of dynamics.
*
* See https://www.w3.org/2021/06/musicxml40/musicxml-reference/elements/dynamics/
*/
export type DynamicType = EnumValues<typeof DYNAMIC_TYPES>;
export declare const DYNAMIC_TYPES: Enum<readonly ["p", "pp", "ppp", "pppp", "ppppp", "pppppp", "f", "ff", "fff", "ffff", "fffff", "ffffff", "mp", "mf", "sf", "sfp", "sfpp", "fp", "rf", "rfz", "sfz", "sffz", "fz", "n", "pf", "sfzp"]>;
export type WedgeType = EnumValues<typeof WEDGE_TYPES>;
export declare const WEDGE_TYPES: Enum<readonly ["crescendo", "diminuendo"]>;
export type WedgePlacement = EnumValues<typeof WEDGE_PLACEMENTS>;
export declare const WEDGE_PLACEMENTS: Enum<readonly ["above", "below"]>;
export type PedalType = EnumValues<typeof PEDAL_TYPES>;
export declare const PEDAL_TYPES: Enum<readonly ["bracket", "mixed", "text"]>;
export type PedalMarkType = EnumValues<typeof PEDAL_MARK_TYPES>;
export declare const PEDAL_MARK_TYPES: Enum<readonly ["default", "change"]>;
export type ArticulationType = EnumValues<typeof ARTICULATION_TYPES>;
export declare const ARTICULATION_TYPES: Enum<readonly ["upright-normal-fermata", "upright-angled-fermata", "upright-square-fermata", "inverted-normal-fermata", "inverted-angled-fermata", "inverted-square-fermata", "harmonic", "open-string", "double-tongue", "triple-tongue", "stopped", "snap-pizzicato", "tap", "heel", "toe", "upstroke", "downstroke", "accent", "strong-accent", "staccato", "tenuto", "detached-legato", "staccatissimo", "scoop", "doit", "falloff", "breath-mark", "arpeggio-roll-down", "arpeggio-roll-up", "arpeggio-directionless", "trill-mark", "mordent", "inverted-mordent"]>;
export type ArticulationPlacement = EnumValues<typeof ARTICULATION_PLACEMENTS>;
export declare const ARTICULATION_PLACEMENTS: Enum<readonly ["above", "below"]>;
export type BendType = EnumValues<typeof BEND_TYPES>;
export declare const BEND_TYPES: Enum<readonly ["prebend", "normal", "release"]>;
export type CurveArticulation = EnumValues<typeof CURVE_ARTICULATIONS>;
export declare const CURVE_ARTICULATIONS: Enum<readonly ["unspecified", "slide", "hammeron", "pulloff"]>;