import { Fraction } from 'xen-dev-utils'; import { TimeMonzo } from './monzo'; /** * Degree of a relative Pythagorean interval. */ export type Degree = { /** * A boolean flag indicating if the degree represents an inverted ratio. */ negative: boolean; /** * Interval class: 1-indexed semiordinal from 1 to 7.5. */ base: number; /** * Number of octaves added to the base interval class. */ octaves: number; /** * Flag to indicate if the degree has minor and major variants. */ imperfect: boolean; }; /** * Fractional modifier for interval qualities and accidentals. */ export type VulgarFraction = '' | '¼' | 'q' | '½' | 's' | '¾' | 'Q' | '⅐' | '⅑' | '⅒' | '⅓' | '⅔' | '⅕' | '⅖' | '⅗' | '⅘' | '⅙' | '⅚' | '⅛' | '⅜' | '⅝' | '⅞'; /** * Augmented interval quality or extra apotomes added or subtracted from the relative interval. */ export type AugmentedQuality = 'd' | 'dim' | 'a' | 'Â' | 'aug' | 'Aug'; /** * Interval quality, possibly fractional. */ export type IntervalQuality = { fraction: VulgarFraction; quality: 'm' | 'min' | 'n' | 'neu' | 'P' | 'M' | 'maj' | 'Maj' | AugmentedQuality; }; /** * Relative Pythagorean interval. */ export type Pythagorean = { type: 'Pythagorean'; quality: IntervalQuality; augmentations?: AugmentedQuality[]; degree: Degree; }; /** * Absolute pitch nominal: Traditional Pythagorean or semioctave. */ export type Nominal = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'alp' | 'α' | 'bet' | 'β' | 'gam' | 'γ' | 'del' | 'δ' | 'eps' | 'ε' | 'zet' | 'ζ' | 'eta' | 'η' | 'phi' | 'φ' | 'chi' | 'χ' | 'psi' | 'ψ' | 'ome' | 'ω' | 'H' | 'I' | 'the' | 'θ' | 'iot' | 'ι' | 'kap' | 'κ' | 'lam' | 'λ' | 'muu' | 'μ' | 'nuu' | 'ν' | 'xii' | 'ξ' | 'omi' | 'ο' | 'pii' | 'π' | 'rho' | 'ρ' | 'fsi' | 'ς' | 'sig' | 'σ' | 'tau' | 'τ' | 'ups' | 'υ'; /** * Musical accidental representing some powers of primes 2 and 3, possibly fractional. */ export type Accidental = '𝄪' | '𝄫' | '𝄲' | '𝄳' | 'x' | '♯' | '#' | '‡' | 't' | '♮' | '_' | 'd' | '♭' | 'b' | '𝄬' | '𝄭' | '𝄮' | '𝄯' | '𝄰' | '𝄱'; /** * Musical accidental representing some (possibly split) powers of primes 2 and 3, possibly fractional. */ export type SplitAccidental = { fraction: VulgarFraction; accidental: Accidental; }; /** * Absolute Pythagorean pitch. */ export type AbsolutePitch = { type: 'AbsolutePitch'; nominal: Nominal; accidentals: SplitAccidental[]; octave: number; }; type PtolInflection = [Fraction, Fraction, Fraction]; /** @hidden */ export declare const ACCIDENTAL_VECTORS: Map; /** @hidden */ export declare const VULGAR_FRACTIONS: Map; export declare function pythagoreanMonzo(node: Pythagorean): TimeMonzo; export declare function absoluteMonzo(node: AbsolutePitch): TimeMonzo; export declare function monzoToNode(monzo: TimeMonzo): Pythagorean | undefined; export declare function absoluteToNode(monzo: TimeMonzo): AbsolutePitch | undefined; export {};