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

    Function getEnharmonics

    • Returns the other spellings of a note, up to double sharps and double flats (##, bb), fewest accidentals first. With an octave, the octave follows the letter (C4 → B#3, Dbb4).

      Parameters

      • noteName: string

        Note name with optional accidental and octave, e.g. "C#", "F#4".

      Returns string[]

      Enharmonic equivalents, e.g. ["Db", "B##"] for "C#"; empty for an invalid name.