write_drum_pattern
Write drum patterns into a clip by mapping step strings like "x---x---" to Drum Rack pads or General MIDI notes, with accents, ghost notes, swing, and replace or add modes.
Instructions
Write drums from step strings, repeated across the clip's loop: {"Kick": "x---x---x---x---", "Snare": "----x-------x---"}.
Steps: "x" hit, "X" accent, "o" ghost, "-" or "." rest (spaces and "|" ignored); steps_per_beat=4 means 16ths. Drum names match the track's Drum Rack pads (case-insensitive, "kick" finds "Kick 808"), else General MIDI (kick 36, snare 38, clap 39, closed hat 42, open hat 46, crash 49, ride 51, toms); notes like "C1" or 36 work too. velocities: {"x": 100, "X": 127, "o": 60}. swing 0..1 delays every second step. mode: "replace" (those drums' notes) or "add".
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | replace | |
| slot | No | ||
| swing | No | ||
| track | Yes | ||
| pattern | Yes | ||
| velocities | No | ||
| steps_per_beat | No | ||
| arrangement_clip | No |