edit_notes
Edit existing MIDI clip notes: modify, remove, replace, duplicate, or select them. Use note IDs from get_notes to change pitches, timing, and velocity.
Instructions
Change notes that already exist in a MIDI clip. action: modify (changes: [{id, }] or ids + set: {field: value}; keeps note ids and per-note events), remove (exactly one of ids, a range from_time/time_span/from_pitch/pitch_span, or all: true), replace (swap the notes in a range, or all notes, for notes in one step; if Live refuses the new notes the old ones are restored; omit notes to clear the range), duplicate (ids, optional destination_time and transposition semitones), duplicate_region (start, length, destination_time, optional pitch and transposition) and select (ids, all: true or none: true, for the editor's selection). Get ids from get_notes; unknown ids are refused (NOT_FOUND) with nothing changed. expect ({name}) guards against the wrong clip. One undo step; DESTRUCTIVE (remove, replace).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| all | No | remove or select every note | |
| ids | No | Note ids (modify with set, remove, duplicate, select) | |
| set | No | modify with ids: fields to set on all of them | |
| none | No | select: clear the selection | |
| notes | No | replace: the new notes (same fields as write_notes) | |
| pitch | No | duplicate_region: only this pitch (-1 = all) | |
| start | No | duplicate_region: source start in beats | |
| action | Yes | What to do | |
| expect | No | Guard: {"name": "..."} must match the clip | |
| length | No | duplicate_region: source length in beats | |
| address | Yes | A MIDI clip | |
| changes | No | modify: [{id, pitch?, start_time?, duration?, velocity?, mute?, probability?, velocity_deviation?, release_velocity?}] | |
| from_time | No | Range start (remove, replace) | |
| time_span | No | Range length (remove, replace) | |
| from_pitch | No | Lowest pitch (remove, replace) | |
| pitch_span | No | Pitch count (remove, replace) | |
| transposition | No | duplicate, duplicate_region: semitones | |
| destination_time | No | duplicate, duplicate_region: where the copies start |