chordsheetjs
    Preparing search index...

    Class TextFormatter

    Formats a song into a plain text chord sheet

    Hierarchy (View Summary)

    • Formatter<TextFormatterConfiguration>
      • TextFormatter
    Index
    • Instantiate

      Parameters

      • Optionalconfiguration: {
            decapo?: boolean;
            delegates?: {
                abc?: {};
                grid?: {};
                ly?: {};
                svg?: {};
                tab?: {};
                textblock?: {};
            };
            directiveNameNormalization?: | DirectiveNameNormalization
            | {
                default?: DirectiveNameNormalization | undefined;
                [key: string]: DirectiveNameNormalization | undefined;
            };
            evaluate?: boolean;
            expandChorusDirective?: boolean;
            instrument?: | { description?: string; tuning?: string; type?: string }
            | null;
            key?:
                | {
                    accidental?: Accidental
                    | null;
                    canBeFlat?: {};
                    canBeSharp?: {};
                    changeGrade?: {};
                    clone?: {};
                    contextualSpelling?: boolean;
                    distanceTo?: {};
                    effectiveGrade?: number;
                    equals?: {};
                    explicitAccidental?: boolean;
                    grade?: number | null;
                    is?: {};
                    isChordSolfege?: {};
                    isChordSymbol?: {};
                    isDiatonicInContext?: {};
                    isMinor?: {};
                    isNumeral?: {};
                    isNumeric?: {};
                    makeMinor?: {};
                    minor?: boolean;
                    minorSign?: "" | "m";
                    modifier?: Accidental | null;
                    normalize?: {};
                    normalizeEnharmonics?: {};
                    note?: string;
                    number?: number | null;
                    originalKeyString?: string | null;
                    preferAccidental?: {};
                    preferredAccidental?: Accidental | null;
                    preferredModifier?: Accidental | null;
                    preferredNotation?: "german" | null;
                    referenceKeyGrade?: number | null;
                    referenceKeyMode?: string | null;
                    relativeMajor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                    relativeMinor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                    respellAsScaleDegree?: {};
                    respellForTransposition?: {};
                    sequenceSpelling?: boolean;
                    setGrade?: {};
                    toChordSolfege?: {};
                    toChordSolfegeString?: {};
                    toChordSymbol?: {};
                    toChordSymbolString?: {};
                    toMajor?: {};
                    toNumeral?: {};
                    toNumeralString?: {};
                    toNumeric?: {};
                    toNumericString?: {};
                    toString?: {};
                    transpose?: {};
                    transposedFromOriginal?: boolean;
                    transposeDown?: {};
                    transposeUp?: {};
                    type?: ChordType;
                    unicodeAccidental?: string | null;
                    unicodeModifier?: string | null;
                    useAccidental?: {};
                    useModifier?: {};
                }
                | null;
            layout?: {
                footer?: {
                    content?: (
                        { template?: string; type?: "text"; value?: string }
                        | undefined
                    )[];
                };
                header?: {
                    content?: (
                        { template?: string; type?: "text"; value?: string }
                        | undefined
                    )[];
                };
                sections?: {
                    base?: {
                        display?: {
                            compact?: boolean;
                            indent?: number;
                            labelStyle?: "uppercase";
                            lyricsOnly?: boolean;
                            repeatedSections?: "hide"
                            | "full"
                            | "title_only"
                            | "lyrics_only";
                            showLabel?: boolean;
                        };
                        fonts?: {
                            annotation?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            barline?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            chord?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            comment?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            instruction?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            metadata?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            noChord?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            rhythmSymbol?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            sectionLabel?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            subtitle?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            text?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            title?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                        };
                        overrides?: ({ condition?: ...; display?: ... } | undefined)[];
                    };
                };
            };
            metadata?: {
                additionalMetadataDirectives?: (string | undefined)[];
                order?: (
                    | string
                    | {
                        customSort?: {};
                        match?: | string
                        | (string | undefined)[]
                        | {
                            "[match]"?: {};
                            "[matchAll]"?: {};
                            "[replace]"?: {};
                            "[search]"?: {};
                            "[split]"?: {};
                            compile?: {};
                            dotAll?: boolean;
                            exec?: {};
                            flags?: string;
                            global?: boolean;
                            hasIndices?: boolean;
                            ignoreCase?: boolean;
                            lastIndex?: number;
                            multiline?: boolean;
                            source?: string;
                            sticky?: boolean;
                            test?: {};
                            unicode?: boolean;
                        }
                        | {};
                        sortMethod?: "custom"
                        | "preserve"
                        | "alphabetical";
                        visible?: boolean;
                    }
                    | undefined
                )[];
                separator?: string;
            };
            normalizeChords?: boolean;
            normalizeChordSuffix?: boolean;
            user?: { fullname?: string; name?: string }
            | null;
            useUnicodeModifiers?: boolean;
        } = ...

        options

        • Optionaldecapo?: boolean

          Whether to eliminate the capo by transposing the chords up by the capo amount. The {key} directive is updated to the sounding key and the {capo} directive is dropped. When false (the default), the chords are rendered as written, because a capo tells the player which shapes to play, not which chords sound.

        • Optionaldelegates?: { abc?: {}; grid?: {}; ly?: {}; svg?: {}; tab?: {}; textblock?: {} }
        • OptionaldirectiveNameNormalization?:
              | DirectiveNameNormalization
              | {
                  default?: DirectiveNameNormalization | undefined;
                  [key: string]: DirectiveNameNormalization | undefined;
              }

          Whether to preserve directive names, prefer long directive names, or prefer short aliases. May be set globally or per directive name, with an optional default fallback.

        • Optionalevaluate?: boolean

          Whether or not to evaluate meta expressions. For more info about meta expressions, see: https://bit.ly/2SC9c2u

        • OptionalexpandChorusDirective?: boolean

          Whether or not to expand {chorus} directives by rendering the last defined chorus inline after the directive. Note that for the measurement-based formatters (PdfFormatter, MeasuredHtmlFormatter) expandChorusDirective runs before the repeatedSections display rule: an expanded chorus counts as a repeated section, so a collapsing repeatedSections mode (the PDF default is title_only) can hide part or all of the recalled chorus. Use repeatedSections: "full" to render the full chorus.

        • Optionalinstrument?: { description?: string; tuning?: string; type?: string } | null
        • Optionalkey?:
              | {
                  accidental?: Accidental
                  | null;
                  canBeFlat?: {};
                  canBeSharp?: {};
                  changeGrade?: {};
                  clone?: {};
                  contextualSpelling?: boolean;
                  distanceTo?: {};
                  effectiveGrade?: number;
                  equals?: {};
                  explicitAccidental?: boolean;
                  grade?: number | null;
                  is?: {};
                  isChordSolfege?: {};
                  isChordSymbol?: {};
                  isDiatonicInContext?: {};
                  isMinor?: {};
                  isNumeral?: {};
                  isNumeric?: {};
                  makeMinor?: {};
                  minor?: boolean;
                  minorSign?: "" | "m";
                  modifier?: Accidental | null;
                  normalize?: {};
                  normalizeEnharmonics?: {};
                  note?: string;
                  number?: number | null;
                  originalKeyString?: string | null;
                  preferAccidental?: {};
                  preferredAccidental?: Accidental | null;
                  preferredModifier?: Accidental | null;
                  preferredNotation?: "german" | null;
                  referenceKeyGrade?: number | null;
                  referenceKeyMode?: string | null;
                  relativeMajor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                  relativeMinor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                  respellAsScaleDegree?: {};
                  respellForTransposition?: {};
                  sequenceSpelling?: boolean;
                  setGrade?: {};
                  toChordSolfege?: {};
                  toChordSolfegeString?: {};
                  toChordSymbol?: {};
                  toChordSymbolString?: {};
                  toMajor?: {};
                  toNumeral?: {};
                  toNumeralString?: {};
                  toNumeric?: {};
                  toNumericString?: {};
                  toString?: {};
                  transpose?: {};
                  transposedFromOriginal?: boolean;
                  transposeDown?: {};
                  transposeUp?: {};
                  type?: ChordType;
                  unicodeAccidental?: string | null;
                  unicodeModifier?: string | null;
                  useAccidental?: {};
                  useModifier?: {};
              }
              | null

          The key to use for rendering. The chord sheet will be transposed from the song's original key (as indicated by the {key} directive) to the specified key. Note that transposing will only work if the original song key is set.

        • Optionallayout?: {
              footer?: {
                  content?: (
                      { template?: string; type?: "text"; value?: string }
                      | undefined
                  )[];
              };
              header?: {
                  content?: (
                      { template?: string; type?: "text"; value?: string }
                      | undefined
                  )[];
              };
              sections?: {
                  base?: {
                      display?: {
                          compact?: boolean;
                          indent?: number;
                          labelStyle?: "uppercase";
                          lyricsOnly?: boolean;
                          repeatedSections?: "hide"
                          | "full"
                          | "title_only"
                          | "lyrics_only";
                          showLabel?: boolean;
                      };
                      fonts?: {
                          annotation?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          barline?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          chord?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          comment?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          instruction?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          metadata?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          noChord?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          rhythmSymbol?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          sectionLabel?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          subtitle?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          text?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                          title?: {
                              color?: ...;
                              inherit?: ...;
                              letterSpacing?: ...;
                              lineHeight?: ...;
                              name?: ...;
                              size?: ...;
                              style?: ...;
                              textDecoration?: ...;
                              textTransform?: ...;
                              underline?: ...;
                              weight?: ...;
                          };
                      };
                      overrides?: ({ condition?: ...; display?: ... } | undefined)[];
                  };
              };
          }
        • Optionalmetadata?: {
              additionalMetadataDirectives?: (string | undefined)[];
              order?: (
                  | string
                  | {
                      customSort?: {};
                      match?: | string
                      | (string | undefined)[]
                      | {
                          "[match]"?: {};
                          "[matchAll]"?: {};
                          "[replace]"?: {};
                          "[search]"?: {};
                          "[split]"?: {};
                          compile?: {};
                          dotAll?: boolean;
                          exec?: {};
                          flags?: string;
                          global?: boolean;
                          hasIndices?: boolean;
                          ignoreCase?: boolean;
                          lastIndex?: number;
                          multiline?: boolean;
                          source?: string;
                          sticky?: boolean;
                          test?: {};
                          unicode?: boolean;
                      }
                      | {};
                      sortMethod?: "custom"
                      | "preserve"
                      | "alphabetical";
                      visible?: boolean;
                  }
                  | undefined
              )[];
              separator?: string;
          }
          • OptionaladditionalMetadataDirectives?: (string | undefined)[]
          • Optionalorder?: (
                | string
                | {
                    customSort?: {};
                    match?: | string
                    | (string | undefined)[]
                    | {
                        "[match]"?: {};
                        "[matchAll]"?: {};
                        "[replace]"?: {};
                        "[search]"?: {};
                        "[split]"?: {};
                        compile?: {};
                        dotAll?: boolean;
                        exec?: {};
                        flags?: string;
                        global?: boolean;
                        hasIndices?: boolean;
                        ignoreCase?: boolean;
                        lastIndex?: number;
                        multiline?: boolean;
                        source?: string;
                        sticky?: boolean;
                        test?: {};
                        unicode?: boolean;
                    }
                    | {};
                    sortMethod?: "custom"
                    | "preserve"
                    | "alphabetical";
                    visible?: boolean;
                }
                | undefined
            )[]
          • Optionalseparator?: string

            The separator to be used when rendering a metadata value that has multiple values. See: https://bit.ly/2SC9c2u

        • OptionalnormalizeChords?: boolean

          Whether or not to automatically normalize chords

        • OptionalnormalizeChordSuffix?: boolean

          Whether to normalize chord suffixes (e.g. sus2 to 2, maj7 to ma7). Only takes effect when normalizeChords is true. Defaults to false for ChordProFormatter so ChordPro round-trips preserve the user's suffix variant.

        • Optionaluser?: { fullname?: string; name?: string } | null
        • OptionaluseUnicodeModifiers?: boolean

          Whether or not to use unicode flat and sharp symbols.

      Returns TextFormatter

    • Configure the formatter with new options

      Parameters

      • config: {
            decapo?: boolean;
            delegates?: {
                abc?: {};
                grid?: {};
                ly?: {};
                svg?: {};
                tab?: {};
                textblock?: {};
            };
            directiveNameNormalization?: | DirectiveNameNormalization
            | {
                default?: DirectiveNameNormalization | undefined;
                [key: string]: DirectiveNameNormalization | undefined;
            };
            evaluate?: boolean;
            expandChorusDirective?: boolean;
            instrument?: | { description?: string; tuning?: string; type?: string }
            | null;
            key?:
                | {
                    accidental?: Accidental
                    | null;
                    canBeFlat?: {};
                    canBeSharp?: {};
                    changeGrade?: {};
                    clone?: {};
                    contextualSpelling?: boolean;
                    distanceTo?: {};
                    effectiveGrade?: number;
                    equals?: {};
                    explicitAccidental?: boolean;
                    grade?: number | null;
                    is?: {};
                    isChordSolfege?: {};
                    isChordSymbol?: {};
                    isDiatonicInContext?: {};
                    isMinor?: {};
                    isNumeral?: {};
                    isNumeric?: {};
                    makeMinor?: {};
                    minor?: boolean;
                    minorSign?: "" | "m";
                    modifier?: Accidental | null;
                    normalize?: {};
                    normalizeEnharmonics?: {};
                    note?: string;
                    number?: number | null;
                    originalKeyString?: string | null;
                    preferAccidental?: {};
                    preferredAccidental?: Accidental | null;
                    preferredModifier?: Accidental | null;
                    preferredNotation?: "german" | null;
                    referenceKeyGrade?: number | null;
                    referenceKeyMode?: string | null;
                    relativeMajor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                    relativeMinor?: { grade?: number | null | undefined; number?: number | null | undefined; accidental?: Accidental | null | undefined; type?: ChordType | undefined; readonly unicodeAccidental?: string | ... 1 more ... | undefined; ... 52 more ...; normalizeEnharmonics?: {} | undefined; };
                    respellAsScaleDegree?: {};
                    respellForTransposition?: {};
                    sequenceSpelling?: boolean;
                    setGrade?: {};
                    toChordSolfege?: {};
                    toChordSolfegeString?: {};
                    toChordSymbol?: {};
                    toChordSymbolString?: {};
                    toMajor?: {};
                    toNumeral?: {};
                    toNumeralString?: {};
                    toNumeric?: {};
                    toNumericString?: {};
                    toString?: {};
                    transpose?: {};
                    transposedFromOriginal?: boolean;
                    transposeDown?: {};
                    transposeUp?: {};
                    type?: ChordType;
                    unicodeAccidental?: string | null;
                    unicodeModifier?: string | null;
                    useAccidental?: {};
                    useModifier?: {};
                }
                | null;
            layout?: {
                footer?: {
                    content?: (
                        { template?: string; type?: "text"; value?: string }
                        | undefined
                    )[];
                };
                header?: {
                    content?: (
                        { template?: string; type?: "text"; value?: string }
                        | undefined
                    )[];
                };
                sections?: {
                    base?: {
                        display?: {
                            compact?: boolean;
                            indent?: number;
                            labelStyle?: "uppercase";
                            lyricsOnly?: boolean;
                            repeatedSections?: "hide"
                            | "full"
                            | "title_only"
                            | "lyrics_only";
                            showLabel?: boolean;
                        };
                        fonts?: {
                            annotation?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            barline?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            chord?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            comment?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            instruction?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            metadata?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            noChord?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            rhythmSymbol?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            sectionLabel?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            subtitle?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            text?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                            title?: {
                                color?: ...;
                                inherit?: ...;
                                letterSpacing?: ...;
                                lineHeight?: ...;
                                name?: ...;
                                size?: ...;
                                style?: ...;
                                textDecoration?: ...;
                                textTransform?: ...;
                                underline?: ...;
                                weight?: ...;
                            };
                        };
                        overrides?: ({ condition?: ...; display?: ... } | undefined)[];
                    };
                };
            };
            metadata?: {
                additionalMetadataDirectives?: (string | undefined)[];
                order?: (
                    | string
                    | {
                        customSort?: {};
                        match?: | string
                        | (string | undefined)[]
                        | {
                            "[match]"?: {};
                            "[matchAll]"?: {};
                            "[replace]"?: {};
                            "[search]"?: {};
                            "[split]"?: {};
                            compile?: {};
                            dotAll?: boolean;
                            exec?: {};
                            flags?: string;
                            global?: boolean;
                            hasIndices?: boolean;
                            ignoreCase?: boolean;
                            lastIndex?: number;
                            multiline?: boolean;
                            source?: string;
                            sticky?: boolean;
                            test?: {};
                            unicode?: boolean;
                        }
                        | {};
                        sortMethod?: "custom"
                        | "preserve"
                        | "alphabetical";
                        visible?: boolean;
                    }
                    | undefined
                )[];
                separator?: string;
            };
            normalizeChords?: boolean;
            normalizeChordSuffix?: boolean;
            user?: { fullname?: string; name?: string }
            | null;
            useUnicodeModifiers?: boolean;
        }

        New configuration options

      Returns this

      The formatter instance for chaining

    • Formats a song into a plain text chord sheet

      Parameters

      • song: Song

        The song to be formatted

      • Optionalmetadata: Metadata

        Optional override of metadata used for formatting

      Returns string

      the chord sheet