@libraz/libcantus - v0.9.3
    Preparing search index...

    Type Alias CounterMelodyOptions

    Options controlling generateCounterMelody.

    type CounterMelodyOptions = {
        melody: NoteEvent[];
        chordAt: (beat: number) => ChordData | null;
        chordChangeBeats?: number[];
        key: KeyScale;
        ts?: TimeSignature;
        register?: "above" | "below";
        rhythm?: "complement" | "follow";
        profile?: "strict" | "pop";
        pitchLow?: number;
        pitchHigh?: number;
        seed?: number;
    }
    Index
    melody: NoteEvent[]

    The lead line to write against, in ascending onset order.

    chordAt: (beat: number) => ChordData | null

    Chord sounding at an absolute beat position, or null when none applies.

    chordChangeBeats?: number[]

    Exact chord-change beats exposed by the caller's timeline. The generator also probes its half-beat grid, but callback discontinuities between grid points are not introspectable and should be listed here.

    Key/scale context for scale-tone decisions.

    Meter used for strong-beat decisions.

    4/4
    
    register?: "above" | "below"

    Which side of the melody the counter line occupies.

    'below'
    
    rhythm?: "complement" | "follow"

    Onset strategy: 'complement' moves where the melody holds or rests and reinforces some strong beats; 'follow' mirrors melody onsets.

    'complement'
    
    profile?: "strict" | "pop"

    Safety profile applied to candidate pitches.

    'pop'
    
    pitchLow?: number

    Lowest MIDI pitch the counter line may use (default derived from register).

    pitchHigh?: number

    Highest MIDI pitch the counter line may use (default derived from register).

    seed?: number

    PRNG seed; the same seed always yields the same line.

    0