write_clip_notation
Write MIDI notes to Ableton clips using compact bar|beat notation instead of verbose JSON, reducing tokens and avoiding float-beat errors. Automatically creates or resizes clips when replace=true.
Instructions
Write MIDI notes using compact bar|beat notation instead of verbose note JSON.
Cuts token usage 3-5x and avoids float-beat errors. Creates or resizes the clip automatically when replace=true.
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": {
"track_index": "<track_index>",
"clip_index": "<clip_index>",
"notation": "<notation>"
},
"name": "write_clip_notation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| length | No | Clip length in beats (auto-inferred to full bars when omitted). | |
| replace | No | True replaces/creates the clip; False layers onto an existing clip. | |
| notation | Yes | Compact bar|beat MIDI lines (1-indexed, Live C3=60). Syntax: `<bar[-end]>|<beat[+num/den][,beat...]> <pitches|drum_names> [d<beats>|n/<val>[.|t]] [v<1-127>] [p<0-1>] [mute]`. Use decimals like `1|3.75` for exact beat fractions; `+num/den` adds a musical note value (whole note = 4 beats, so `+1/16` = +0.25 beats, `+1/8` = +0.5 beats). Example: `1|1 C3 E3 G3 d4 v72\n1-4|1,3 kick n/16 v105`. | |
| clip_index | Yes | Zero-based Session-view clip-slot index on the track. | |
| track_index | Yes | Zero-based index of a regular track in the Live set. | |
| beats_per_bar | No | Beats per bar for bar|beat math (default 4.0). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| error | No |