Universal Music Theory Library - v0.12.0
    Preparing search index...

    Class Xen

    Xenharmonic chord analysis: neutral triads, otonal/utonal detection, and essentially-just matching.

    Index

    Constructors

    Methods

    • Detects whether a chord contains a neutral third (≈ 350 cents, midway between m3 and M3). Indicates a non-12-TET structure typical of maqam music and neutral scales.

      Parameters

      Returns boolean

    • Tests whether a chord is otonal: its notes are partials n₁ < n₂ < … of one fundamental, none above harmonicLimit (4:5:6 major triad, 4:5:6:7 harmonic seventh).

      Parameters

      • chord: Chord

        The chord to test.

      • harmonicLimit: number = 7

        Highest partial number allowed (default 7).

      • toleranceCents: number = 15

        How far each note may be from its partial (default 15¢, enough for 12-TET's major third; 31¢ would admit its minor seventh as 7/4).

      Returns { harmonics: number[]; isOtonal: boolean }

      The partial number of each note, lowest note first.

      • harmonics: number[]

        Partial number of each note, lowest note first ([4, 5, 6] for a major triad).

      • isOtonal: boolean

        Every note lies on a partial of one fundamental, within the limit and tolerance.

    • Tests whether a chord is utonal: its notes are subharmonics 1/n of one common overtone, none below 1/harmonicLimit (1/6 : 1/5 : 1/4, the minor triad 10:12:15).

      Parameters

      • chord: Chord

        The chord to test.

      • harmonicLimit: number = 7

        Highest subharmonic number allowed (default 7).

      • toleranceCents: number = 15

        How far each note may be from its subharmonic (default 15¢).

      Returns { isUtonal: boolean; subharmonics: number[] }

      The subharmonic number of each note, highest note first.

      • isUtonal: boolean

        Every note lies on a subharmonic of one pitch, within the limit and tolerance.

      • subharmonics: number[]

        Subharmonic number of each note, highest note first.

    • Returns the closest essentially-just chord (a tempered chord heard as a JI chord) and its ratios: each interval of the chord, in its own tuning, goes to the nearest of a set of simple 5- and 7-limit ratios.

      Parameters

      • chord: Chord

        The chord, in any tuning.

      • Optional_tuning: JustIntonation

        Unused; kept for compatibility (the chord's own tuning is used).

      Returns { name: string; ratios: [number, number][] }

      • name: string

        '4:5:6 (JI major triad)', '10:12:15 (JI minor triad)', '4:5:6:7 (harmonic seventh chord)' or 'Unknown JI chord'.

      • ratios: [number, number][]

        The just ratio each interval of the chord is read as, as [numerator, denominator].