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

    Function getIntervalName

    • Returns the interval abbreviation for a number of semitones above a root, compound intervals included at any size (m9, P11, M13, P15, M17). Pitch alone cannot tell A4 from d5: pass letterSteps (letters above the root, 0 = unison) to choose; without it, 6 semitones is d5 and every other size takes its usual number (3 = m3, 8 = m6).

      Parameters

      • stepsFromRoot: number

        Semitones above the root (negative: measured downwards).

      • is12TET: boolean = true

        If false, returns a generic "Step N" label.

      • OptionalletterSteps: number

        Letter distance, e.g. 3 for a fourth, 9 for a tenth.

      Returns string

      Interval abbreviation, e.g. "M3", "A4", "m10"; "Step N" when the letter distance and the semitones do not make an interval.