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

    Function getFretboardVoicings

    • Generates all valid chord voicings for a fretted instrument using backtracking.

      Each voicing covers all pitch classes of the chord. Results are sorted by position (lowest fret first), then by stretch, then by number of muted strings.

      Parameters

      • chord: Chord

        The chord to voice.

      • tuning: readonly number[]

        Open string steps from A4, low→high, in steps of the chord's tuning, one fret per step (a 31-EDO guitar has a fret per 31-EDO step). The exported presets (GUITAR_STANDARD, UKULELE_STANDARD, etc.) are 12-TET: to place a chord of another tuning on a 12-TET instrument, pass chord.retune(TET12).

      • Optionaloptions: FretboardVoicingOptions

        Search constraints: maxFret (default 12), maxStretch (default 4).

      Returns FretboardVoicingResult[]

      Array of voicings sorted by playability. Empty if no valid voicing exists.