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

    Type Alias CompositionViolation

    One way a candidate melody departs from its plan.

    type CompositionViolation = {
        kind:
            | "span"
            | "phraseBoundary"
            | "cadence"
            | "harmony"
            | "motifDerivation"
            | "motifDisplaced"
            | "register"
            | "peakPosition";
        severity: "error"
        | "warning";
        atBeat: number;
        expected: string;
        actual: string;
        rationale: string;
    }
    Index
    kind:
        | "span"
        | "phraseBoundary"
        | "cadence"
        | "harmony"
        | "motifDerivation"
        | "motifDisplaced"
        | "register"
        | "peakPosition"

    What kind of departure this is.

    severity: "error" | "warning"

    Whether this rules the candidate out, or only flags it.

    atBeat: number

    Where in the candidate this was found.

    expected: string

    What the plan called for.

    actual: string

    What the candidate did instead.

    rationale: string

    Why this counts as a departure.