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

    Interface RespellContext

    Hints for enharmonic respelling decisions. Providing a key or functional role improves spelling accuracy.

    interface RespellContext {
        direction?: "ascending" | "descending";
        functionalRole?:
            | "chromatic-mediant"
            | "neighbor"
            | "passing"
            | "secondary-dominant";
        keySymbol?: string;
    }
    Index

    Properties

    direction?: "ascending" | "descending"

    Without a key: 'ascending' spells with sharps, 'descending' with flats.

    functionalRole?:
        | "chromatic-mediant"
        | "neighbor"
        | "passing"
        | "secondary-dominant"

    Accepted but not read yet by respellNote or respellChord.

    keySymbol?: string

    Key to spell in ('Db major'); takes precedence over direction.