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

    Type Alias VoicingOptions

    Options controlling voiceChord and voiceProgression.

    type VoicingOptions = {
        voices?: number;
        ranges?: VoiceRange[];
        maxSpacing?: number;
        maxCandidates?: number;
        budget?: number;
        key?: KeyLike;
        previousChord?: ChordLike;
    }
    Index
    voices?: number

    Number of voices to realize. Ignored when ranges is given.

    4
    
    ranges?: VoiceRange[]

    Explicit per-voice ranges, ascending (index 0 = lowest). Takes precedence over voices.

    maxSpacing?: number

    Maximum spacing in semitones between adjacent upper voices.

    12
    
    maxCandidates?: number

    Maximum candidate voicings evaluated for one chord.

    Raise this for large voicings when exact optimum matters more than bounded search time.

    4000
    
    budget?: number

    Maximum number of chords voiceProgression will voice. The search per chord is bounded internally, so the cost of a progression is linear in its length; this is the guard against an unbounded caller, not a limit on the search.

    1000000
    
    key?: KeyLike

    The prevailing key, as a key name, a key/scale, or a Key. Supplying it enables the rules that only make sense relative to a tonic: the leading tone is not doubled, and — where the chord being left is known as well — it is not left unresolved. Without it, voicings are chosen from chord structure and voice-leading distance alone.

    previousChord?: ChordLike

    The chord the current voicing was written on, as a chord symbol, chord data, or a Chord.

    It enables every rule that is read from the chord being left: the resolution of a chordal seventh, the resolution of a leading tone, and the cross relation between the two chords. All three are scored exactly as voiceProgression scores them, and none of them is scored without it — a leading tone cannot be told from the third of a chord that merely contains it until the chord it belongs to is known. Supply it whenever the caller has the chord, not only where that chord carried a seventh.