@stringsync/vexml
Version:
MusicXML to Vexflow
33 lines (32 loc) • 1.3 kB
TypeScript
import * as data from '../../data';
import * as musicxml from '../../musicxml';
import { KeyMode } from './enums';
import { Config } from '../../config';
import { Logger } from '../../debug';
/** Represents a key signature. */
export declare class Key {
private config;
private log;
private partId;
private staveNumber;
private fifths;
private previousKey;
private mode;
constructor(config: Config, log: Logger, partId: string, staveNumber: number, fifths: number, previousKey: Key | null, mode: KeyMode);
static default(config: Config, log: Logger, partId: string, staveNumber: number): Key;
static create(config: Config, log: Logger, partId: string, staveNumber: number, previousKey: Key | null, musicXML: {
key: musicxml.Key;
}): Key;
parse(): data.Key;
getPartId(): string;
getStaveNumber(): number;
/** Returns the accidental code being applied to the line that the pitch is on based on the key signature. */
getAccidentalCode(pitch: string): data.AccidentalCode;
isEqual(key: Key): boolean;
isEquivalent(key: Key): boolean;
private arePreviousKeySignaturesEquivalent;
private parsePreviousKey;
/** Returns the alterations of the key signature. */
private getAlterations;
private getRootNote;
}