Note tools
The MIDI workhorses. live_get_notes reads a clip’s notes as plain note
objects; live_set_notes replaces the whole note array in one transaction. The
read-then-transform-then-write pattern is how humanize, quantize, and write-a-melody
all work. A huge clip returns a summary plus the first notes rather than a silent
partial dump.
live_get_notes read
Read all MIDI notes from one clip as plain note objects (pitch, startTime, duration, and optional velocity / muted / probability). For a very large clip, returns a summary (count, pitch range, beat span, first notes) plus a hint instead of a full dump. The clip id must be a MIDI clip from live_list_clips.
| Parameter | Type | Required | Description |
|---|---|---|---|
clipId | string | yes | Stable clip id from live_list_clips, e.g. 'track:2/clipslot:4/clip' |
live_set_notes write
Replace ALL MIDI notes in one clip with the given array (whole-array assign-back: read with live_get_notes, transform, write back). One undo step. Pitch and velocity are clamped to 0-127. The clip id must be a MIDI clip. Returns the clip id, name, and resulting note count.
| Parameter | Type | Required | Description |
|---|---|---|---|
clipId | string | yes | Stable clip id from live_list_clips, e.g. 'track:2/clipslot:4/clip' |
notes | object[] | yes | Full replacement set of notes for the clip |