UNPKG

12tet

Version:

Music theory library for generating and working with chords, modes, intervals, etc.

33 lines (32 loc) 1.04 kB
import { IntervalDistance } from "../interval"; import { Chord } from "../chord"; import { ModeDegree } from "../mode"; import { Note } from "../note"; declare const NOTE_PITCHES: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8]; export type NotePitch = typeof NOTE_PITCHES[number]; export declare function isNotePitch(notePitch: any): notePitch is NotePitch; export declare const notePitches: NotePitch[]; export interface VoicingOptions { startingPitch: NotePitch; minSpread: IntervalDistance; maxSpread: IntervalDistance; minSize: number; maxSize: number; omitDegrees?: ModeDegree[]; omitNotes?: Note[]; guaranteeDegrees?: ModeDegree[]; guaranteeNotes?: Note[]; enforceSlash?: boolean; } export interface VoicedNote { pitch: NotePitch; note: Note; } export interface ChordVoicing { chord: Chord; voicingOptions: VoicingOptions; voicedNotes: VoicedNote[]; tension: number; } export declare function chordVoicings(chord: Chord, voicingOptions: VoicingOptions): ChordVoicing[]; export {};