12tet
Version:
Music theory library for generating and working with chords, modes, intervals, etc.
51 lines (50 loc) • 3.59 kB
TypeScript
declare const NATURAL_NOTES: readonly ["C", "D", "E", "F", "G", "A", "B"];
export type NaturalNote = typeof NATURAL_NOTES[number];
export declare function isNaturalNote(note: any): note is NaturalNote;
export declare const naturalNotes: NaturalNote[];
declare const STANDARD_SHARP_NOTES: readonly ["F#", "C#", "G#", "D#", "A#", "E#", "B#"];
export type StandardSharpNote = typeof STANDARD_SHARP_NOTES[number];
export declare function isStandardSharpNote(note: any): note is StandardSharpNote;
export declare const standardSharpNotes: StandardSharpNote[];
declare const STANDARD_FLAT_NOTES: readonly ["Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb"];
export type StandardFlatNote = typeof STANDARD_FLAT_NOTES[number];
export declare function isStandardFlatNote(note: any): note is StandardFlatNote;
export declare const standardFlatNotes: StandardFlatNote[];
declare const STANDARD_ACCENTED_NOTES: readonly ["F#", "C#", "G#", "D#", "A#", "E#", "B#", "Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb"];
export type StandardAccentedNote = typeof STANDARD_ACCENTED_NOTES[number];
export declare function isStandardAccentedNote(note: any): note is StandardAccentedNote;
export declare const standardAccentedNotes: StandardAccentedNote[];
declare const STANDARD_NOTES: readonly ["C", "D", "E", "F", "G", "A", "B", "F#", "C#", "G#", "D#", "A#", "E#", "B#", "Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb"];
export type StandardNote = typeof STANDARD_NOTES[number];
export declare function isStandardNote(note: any): note is StandardNote;
export declare const standardNotes: StandardNote[];
declare const THEORETICAL_SHARP_NOTES: readonly ["C##", "D##", "E##", "F##", "G##", "A##", "B##"];
export type TheoreticalSharpNote = typeof THEORETICAL_SHARP_NOTES[number];
export declare function isTheoreticalSharpNote(note: any): note is TheoreticalSharpNote;
export declare const theoreticalSharpNotes: TheoreticalSharpNote[];
declare const THEORETICAL_FLAT_NOTES: readonly ["Cbb", "Dbb", "Ebb", "Fbb", "Gbb", "Abb", "Bbb"];
export type TheoreticalFlatNote = typeof THEORETICAL_FLAT_NOTES[number];
export declare function isTheoreticalFlatNote(note: any): note is TheoreticalFlatNote;
export declare const theoreticalFlatNotes: TheoreticalFlatNote[];
declare const THEORETICAL_NOTES: readonly ["C##", "D##", "E##", "F##", "G##", "A##", "B##", "Cbb", "Dbb", "Ebb", "Fbb", "Gbb", "Abb", "Bbb"];
export type TheoreticalNote = typeof THEORETICAL_NOTES[number];
export declare function isTheoreticalNote(note: any): note is TheoreticalNote;
export declare const theoreticalNotes: TheoreticalNote[];
declare const NOTES: readonly ["C", "D", "E", "F", "G", "A", "B", "F#", "C#", "G#", "D#", "A#", "E#", "B#", "Bb", "Eb", "Ab", "Db", "Gb", "Cb", "Fb", "C##", "D##", "E##", "F##", "G##", "A##", "B##", "Cbb", "Dbb", "Ebb", "Fbb", "Gbb", "Abb", "Bbb"];
export type Note = typeof NOTES[number];
export declare function isNote(note: any): note is Note;
export declare const notes: Note[];
declare const NOTE_REGISTER: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8];
export type NoteRegister = typeof NOTE_REGISTER[number];
export declare function isNoteRegister(register: any): register is NoteRegister;
export declare const noteRegisters: NoteRegister[];
export declare function getNaturalNoteRoot(note: Note): NaturalNote;
export declare function getNextNaturalNote(note: Note): NaturalNote;
export type Tone = [Note, Note, Note] | [Note, Note];
export declare const tones: Tone[];
export declare const tonesByNote: Record<Note, {
tone: Tone;
index: number;
}>;
export declare function enharmonicEquivalents(note: Note): Note[];
export {};