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

    Type Alias RhythmOptions

    Options controlling generateRhythm.

    type RhythmOptions = {
        bars?: number;
        subdivision?: number;
        ctx?: GenerationContextInput;
    }
    Index
    bars?: number

    Number of bars to generate.

    1
    
    subdivision?: number

    Grid resolution as the number of equal grid steps per quarter-note beat. The default of 2 yields an eighth-note grid; 4 yields a sixteenth-note grid, 3 an eighth-note triplet grid, and so on.

    2
    

    The generation context.

    Its complexity.rhythmic is this generator's overall onset density: it scales the per-slot onset probability, so higher values fill more grid slots. A value outside [0, 1] is rejected. Its seed fixes which slots are taken, so the same seed always yields the same pattern.

    { seed: 0, complexity: { rhythmic: 0.5 } }