add_notes_pattern
Writes one MIDI note cell into an Ableton clip N times to create repeated patterns, with optional per-repeat transposition, in one undo step.
Instructions
Repeat one note cell N times instead of sending every note.
Side effects: adds notes in one Live undo step; existing notes remain.
Example: add_notes_pattern(59, 0, cell, cell_length=4, repeats=16, transpose_per_repeat=0) writes a sixteen-bar ostinato from one bar.
Edge cases: the same validation as add_notes_to_clip applies to every
expanded note; pitch and velocity are clamped to the MIDI range.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cell | Yes | ||
| repeats | Yes | ||
| clip_index | Yes | ||
| cell_length | Yes | ||
| track_index | Yes | ||
| transpose_per_repeat | No | ||
| velocity_scale_per_repeat | No |