Number of bars to generate.
OptionaltsTime signature.
Only 4/4 is accepted: every shape this generator writes — the backbeat, the hi-hat subdivisions, the open-hat and crash beats, the beat a fill starts on — is written against a four-beat bar, so another meter would come back with 4/4 accents in a bar of the wrong length and no sign that anything was wrong. A meter it cannot place is refused rather than mis-placed, and a meter map is read whole: one that opens in 4/4 and changes later is refused for the change, not accepted for the opening. Use generateRhythm or placeDrumPattern for other meters.
OptionalfillsReplace the final bar with a fill.
A pre-chorus leading into a chorus builds instead: the two-bar lift takes
precedence over the fill, since the buildup already marks the phrase end.
Set nextSection to anything but 'chorus' to get the fill.
OptionalfeelThe swing the groove is played with. Naming one is taken at its word by every style, including the ones whose own character is straight: a feel the caller asked for and did not get is worse than one it has to ask for twice. Left out, the style's own feel applies.
OptionalroleVoicing role, from busiest to sparsest:
'full': every voice, backbeat snare at full weight.'ambient': side-stick backbeat, ride instead of hi-hat.'minimal': side-stick backbeat quieter still, pedal hi-hat, no
auxiliary percussion.'fxOnly': no kick, snare, ghost notes, timekeeping hi-hat, or fills —
only the fx and auxiliary voices.Roles express orchestration priority and peak dynamics, not a strict hit count: style-specific ride, foot-hi-hat, and auxiliary patterns may make a sparser role emit more individual onsets in a particular bar.
OptionalctxThe generation context: the tempo, the complexity dials, and the kit this part is written for.
bpm is the tempo in quarter-note beats per minute. complexity.rhythmic
is how busy the backing is, in [0, 1]; the dial is continuous, so every
value moves the result and raising it only adds onsets — the ones already
sounding stay where they were. complexity.ornament sets how many ghost
notes survive, complexity.difficulty caps how fast the generator writes,
instruments.drums — a percussion profile — restricts the output to voices
that kit actually has, and seed fixes every deterministic choice.
OptionalnextSection the final-bar fill leads into. Shapes which fill archetype is
chosen (into-chorus and out-of-intro fills differ from generic ones).
Defaults to section, i.e. a within-section fill.
OptionaleuclideanWhen set, the kick follows this Euclidean rhythm instead of the style/section pattern, giving direct access to evenly spread onsets.
OptionalbudgetMaximum number of onsets generateDrums may write. Generation is linear in bar count, so this is the guard against an unbounded caller rather than a limit on any search.
Options controlling generateDrums.