@libraz/libcantus - v0.9.3
    Preparing search index...

    Function transposeChordSymbol

    • Transpose a chord symbol by a number of semitones.

      Parameters

      • text: string

        The chord symbol text.

      • semitones: number

        Signed semitone offset to apply to the root and bass.

      • Optionalopts: { flats?: boolean }

        Formatting options for the result; see formatChordSymbol.

      Returns string

      The transposed chord symbol text.

      If text does not parse as a chord symbol.

      import { transposeChordSymbol } from '@libraz/libcantus';
      transposeChordSymbol('C/G', 2); // 'D/A'