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

    Type Alias BassLineOptions

    Options controlling generateBassLine.

    type BassLineOptions = {
        segments: readonly (Omit<BassSegment, "chord"> & { chord: ChordLike })[];
        key: KeyLike;
        ts?: MeterLike;
        style?: BassStyle;
        octave?: number;
        instrument?: StringedProfile;
        ctx?: GenerationContextInput;
        budget?: number;
    }
    Index
    segments: readonly (Omit<BassSegment, "chord"> & { chord: ChordLike })[]

    Chord placement to follow; need not be pre-sorted. Each segment's chord may be written as a chord symbol as well as given as chord data.

    key: KeyLike

    Key/scale context, used for diatonic approach tones in walking. A key name such as 'C major' is read as that key.

    Time signature; used for metric accents.

    { numerator: 4, denominator: 4 }

    style?: BassStyle

    Bass-line idiom.

    'root'

    octave?: number

    Target register as a base MIDI octave; roots land around octave*12+12. An octave pickup in the pop style may drop a note into the octave below that band, which is where such a pickup belongs, or take the octave above instead on an instrument with nothing below the band to drop into.

    2
    
    instrument?: StringedProfile

    The instrument the line is written for. Giving one is itself the request that the line be playable on it: octave then says where in that instrument to aim rather than which absolute band to use, and where the two disagree the instrument wins — a note below the lowest string comes back an octave up, the way a player would take it. Leave it out for a programmed part, which is generated exactly as before.

    The generation context. Its complexity.rhythmic sets how often the pop style takes a weak-beat pickup, its instruments.bass names the instrument when instrument does not, its bpm together with complexity.difficulty keeps leaps the hand could not make in time out of the line, and its seed fixes every deterministic choice the line makes.

    { seed: 0 }

    budget?: number

    Maximum number of segments, and of notes, generateBassLine may work through. The line is built segment by segment, so this is the guard against an unbounded caller rather than a limit on any search.

    1000000