@libraz/libcantus - v1.1.0
    Preparing search index...

    Type Alias ModalCandidate

    How a modal candidate is built out of its parallel major or minor key.

    type ModalCandidate = {
        scaleName: ModalScaleName;
        mode: "major" | "minor";
        mask: number;
        substitutions: readonly (readonly [number, number])[];
    }
    Index
    scaleName: ModalScaleName

    The name reported as KeyMatch.scaleName when this candidate wins.

    mode: "major" | "minor"

    The major or minor key this mode is closest to, reported as mode.

    mask: number

    The 12-bit scale mask of the mode.

    substitutions: readonly (readonly [number, number])[]

    Degree pairs the mode substitutes, as [replaced, replacing] semitone offsets above the tonic. Applying them to the parallel scale yields mask, and applying them to the parallel profile yields this candidate's profile.