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

    Type Alias DetectCadenceOptions

    Options for detectCadence.

    type DetectCadenceOptions = {
        voicing?: [number[], number[]];
        alternatives?: boolean;
        approach?: ChordLike;
    }
    Index
    voicing?: [number[], number[]]

    The pitches actually sounding, as MIDI note numbers: the penultimate chord's voicing first, then the final chord's.

    The lowest pitch of each is its bass and so decides inversion, overriding whatever the chords' own bassPc says; the highest pitch of the final chord is the soprano. Without a voicing the soprano is unknown, and a perfect authentic cadence cannot be told from an imperfect one.

    alternatives?: boolean

    Report the cadences this pair came close to forming and why each was turned down.

    Off by default: the rationale is built from facts the classification already established, while a rival has to be phrased against conditions that did not fire, and most callers read the type only.

    false
    
    approach?: ChordLike

    The chord before from, which is what tells a cadential six-four from an inverted tonic.

    A dominant reached from the tonic triad standing on its own bass was already sounding when that six-four did, so the cadence began there. Only the chord before the dominant settles that, and a caller reading a pair at a time has it to hand; without it the pair is classified on its own, as before.

    Accepted as a chord symbol, chord data, or a Chord.