add_drum_pattern
Program drum patterns step-sequencer style on a track's drum instrument. Lanes map to note names, saved drum maps, or General MIDI, and the result shows which note each lane landed on.
Instructions
Programs drums step-sequencer style on whatever drum instrument the track has. The result's 'lanes' shows which note each lane landed on and why.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| step | No | Length of one step in QN: 0.25 = 16ths, 0.5 = 8ths, 1/3 = 8th triplets | |
| start | No | Start in QN from the item start | |
| swing | No | 50 = straight, ~58 = light swing, ~66 = triplet shuffle | |
| channel | No | MIDI channel; GM drums use 10 | |
| item_id | Yes | MIDI item id from create_midi_item/get_track_details, or "selected" | |
| pattern | Yes | Lane name -> steps. Name lanes by drum (kick, snare, clap, closed hat, open hat, pedal hat, ride, crash, low/mid/high tom, rim, shaker...); they're matched to the instrument's own note names, then a saved drum map, then General MIDI. Note names/numbers (C1, 36) also work. Steps: x hit, X accent, o ghost, 1-9 velocity level, . rest; spaces and | are ignored. Example: {'kick': 'x...x...x...x...', 'snare': '....x.......x...'} | |
| repeats | No | How many times to play the pattern back to back | |
| replace | No | ||
| humanize | No | Random velocity variation, 0-1 |