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

    Type Alias PlaceLicksOptions

    Options controlling placeLicks.

    type PlaceLicksOptions = {
        genre: Genre;
        difficulty?: number;
        ts?: MeterLike;
        octave?: number;
        instrument?: StringedProfile;
        ctx?: GenerationContextInput;
        budget?: number;
    }
    Index
    genre: Genre

    The genre whose figures may be used. Genre is what selects the material: the dials then deform it, and the ceiling rejects it.

    difficulty?: number

    The hardest figure that may be used, 1 to 5. Sugar for ctx: { complexity: { difficulty } }; the context wins over both.

    Time signature, in any form that names one; defaults to 4/4.

    octave?: number

    Target register as a base MIDI octave; roots land around octave*12+12.

    2
    
    instrument?: StringedProfile

    The instrument the line is written for; its range always applies.

    The generation context. Its vocabulary brings the caller's own figures, its complexity.ornament decides how much decoration survives, and its complexity.difficulty is the ceiling figures are rejected against.

    Its complexity.rhythmic is how busy the line is, in [0, 1]: it decides both how often a segment takes a figure at all and, above its middle setting, how much the figure is syncopated — one dial, because "less busy" means both. Its bpm is the tempo the ceiling is measured against, and its seed fixes which figures are chosen and where they land.

    { seed: 0, bpm: 120, complexity: { rhythmic: 0.6 } }

    budget?: number

    Maximum number of segments placeLicks may lay figures over, and of bars those segments span. One figure is placed per bar of a segment, so both are counted: this is the guard against an unbounded caller — a segment running to a beat far past the music — rather than a limit on any search.

    1000000