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

    Function getIntervalBetween

    • Names the interval between two written notes by their letters and octaves: C4–F#4 is A4, C4–Gb4 is d5, C4–E5 is M10. Order does not matter; the interval is measured from the lower note. Notes without an octave are taken in octave 4.

      Parameters

      • a: string

        Note name, e.g. "C4", "F#", "Bb3".

      • b: string

        Note name.

      Returns string

      if either name is not a note.