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

    Class TemperamentAnalysis

    Static methods for comparing tuning systems against JI, detecting wolf intervals, and finding optimal EDOs.

    Index

    Constructors

    Methods

    • Compares multiple tuning systems against JI reference intervals. Returns a comparison table with cent errors for each interval in each tuning.

      Parameters

      • tunings: TuningSystem[]

        Array of tuning systems to compare.

      • intervals: [number, number][]

        JI ratios to compare (e.g., [[3,2], [5,4]] = P5 and M3).

      Returns ComparisonTable

    • Detects wolf intervals: single instances of an interval that stand out from the other intervals of the same number of steps. For each step count k, the typical size (median over all starting degrees) is taken as meant to be the nearest consonance (6/5, 5/4, 4/3, 3/2, 8/5, 5/3) when within threshold of it; an instance more than threshold away from that consonance is a wolf (Pythagorean tuning's G#–Eb fifth). Equal temperaments have none.

      Parameters

      • tuning: TuningSystem

        The tuning system to audit.

      • threshold: number = 20

        Error threshold in cents (default 20: Pythagorean tuning's wolf fifth is a Pythagorean comma, 23.5¢, short).

      Returns { errorCents: number; from: number; interval: number }[]

      Array of { interval (step count), from (starting step), errorCents (from the consonance) }.

      • errorCents: number

        Distance from the just consonance it stands for, in cents.

      • from: number

        Step the out-of-tune interval starts on.

      • interval: number

        Size of the interval in steps of the tuning.

    • Returns definitions of common musical commas, with cents to three decimals. ratioText is exact. The Mercator comma (3^53/2^84) is beyond Number precision: its ratio is the nearest doubles and its cents are computed from the exponents.

      Returns { cents: number; name: string; ratio: [number, number]; ratioText: string }[]

      • cents: number

        Size in cents, to three decimals.

      • name: string

        'Syntonic comma', 'Pythagorean comma', 'Schisma'…

      • ratio: [number, number]

        As [numerator, denominator] (may lose precision for very large ratios; see ratioText).

      • ratioText: string

        Exact ratio as text: '81/80'.

    • Finds unison vectors for a JustIntonation tuning: the known commas by which two sizes of the same interval (same number of steps, different starting notes) differ. In 5-limit JI the fifths 3/2 and 40/27, or the whole tones 9/8 and 10/9, differ by 81/80.

      Parameters

      Returns [number, number][]