write_drum_pattern
Program drum patterns into Ableton Session clips from style presets or custom role layers; maps roles to Drum Rack pads or MIDI notes when no rack exists.
Instructions
Program drums into a Session slot (clip created to fit) on a track with a Drum Rack. Roles are mapped to the kit's pads by their names (a similar free pad stands in for a missing role; missing ones are reported); without a Drum Rack, General MIDI notes are used.
Start from a library style and/or give layers: {role: grid} or
{role: {"euclid": [hits, steps, rotate]}}; layers override or extend the
style. Roles: kick, clap, snare, rim, closed_hat, open_hat, pedal_hat,
ride, crash, tom_low, tom_mid, tom_high, perc, shaker, tambourine, conga,
bongo, clave, cowbell, fx. A grid shorter or longer than a bar cycles
over the whole clip (a 12-step loop drifts against 16-step bars).
Grid: x hit · X accent · o ghost · . rest · 2/3/4 ratchet · ? 50 % · * 25 % ghost
(probabilities use Live 12's per-note chance, so the loop varies as it plays).
Parameters:
track_index / clip_index: Drum track and Session slot
style: Library pattern (see drum_patterns)
layers: Extra or replacement grids per role
bars: Clip length in bars (4/4)
steps_per_bar: Grid resolution (16 = 16ths, 12 = 8th-note triplets, 32)
swing_pct: Swing on odd steps, 50 = straight (default: the style's)
fill: Every
fill_everybars: roll, drop, open_hat, ratchet or crashvariation: 0-1, chance of extra ghost hats (written with low probability)
humanize: Timing spread in beats (e.g. 0.005), with small velocity changes
replace: Clear an existing clip in the slot first
seed: Random seed for variation/humanize
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"track_index": "<track_index>",
"clip_index": "<clip_index>"
},
"name": "write_drum_pattern"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | No | ||
| fill | No | ||
| seed | No | ||
| style | No | ||
| layers | No | ||
| replace | No | ||
| humanize | No | ||
| swing_pct | No | ||
| variation | No | ||
| clip_index | Yes | ||
| fill_every | No | ||
| track_index | Yes | ||
| steps_per_bar | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |