create_drum_pattern
Create drum patterns from step-sequencer shorthand using letters for kicks, snares, hi-hats, and more. Automatically generates MIDI items with specified steps and bars.
Instructions
Create a drum pattern from step-sequencer shorthand.
Each line of pattern is one drum lane. Characters map to GM drums:
k=kick, s=snare, h=hi-hat closed, o=hi-hat open, c=crash,
r=ride, t=mid tom, l=low tom, i=high tom, p=clap, b=rimshot.
. or space = rest. Any unknown character is ignored.
Example — standard 16-step rock beat:
k...k...k...k...
....s.......s...
h.h.h.h.h.h.h.h.Defaults: 16 steps per bar = 1/16-note grid. channel=9 = GM drum channel.
Pass item_index=-1 to auto-create a new MIDI item starting at start_qn.
Returns the item index and number of notes inserted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| pattern | Yes | ||
| item_index | No | ||
| start_qn | No | ||
| steps_per_bar | No | ||
| bar_count | No | ||
| velocity | No | ||
| channel | No |