set_notes
Change a MIDI clip's notes by replacing all, or adding and removing specific notes by start and pitch in one undoable step. Use it to move or resize notes without partial edits.
Instructions
Change the notes of a MIDI clip: give replace, or add and/or remove. One undo step.
Removes happen before adds, so to move or resize a note, remove it and add it in one call. If one entry is wrong, nothing changes.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"clip": "<clip>"
},
"name": "set_notes"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| add | No | Notes to add, for example [{"start": 0, "length": 1, "pitch": "C4"}]. Not with replace. | |
| clip | Yes | A MIDI clip handle or path, for example tracks/"Bass"/clips/0 (clips in timeline order). | |
| remove | No | Notes to remove by start and pitch, for example [{"start": 0, "pitch": 60}]. Not with replace. | |
| replace | No | All the notes of the clip; every other note goes. [] clears the clip. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | Yes | ||
| added | Yes | ||
| removed | Yes | ||
| note_count | Yes |