create_clip
Create an empty MIDI clip with a chosen loop length in a Session slot on a MIDI track, ready for adding notes and arranging.
Instructions
Create an empty MIDI clip of a given length in a Session slot.
The target must be a MIDI track. An audio slot takes a sample instead, which is a
different call: lom_call with path='song.tracks[N].clip_slots[M]',
method='create_audio_clip' and one absolute file path (catalog row
clip_slot.create_audio_clip).
Returns:
Dictionary with the creation status, the clip path, and the read-back length.
Note:
An occupied slot is refused rather than overwritten, so nothing is lost by
aiming at the wrong slot. To replace a clip, delete_clip first.
The clip arrives empty. Fill it with write_clip_notes, and copy it onto the
Arrangement timeline with arrange once it holds something.
Live gives a new Session clip a loop: ``looping`` reads back true with
``loop_start`` at 0 and ``loop_end`` at the length asked for. That is Live's
own default for Session clips and this does not set it. Turn it off through
``lom_set`` on ``clip.looping`` where the part is to play once.
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": "<track>",
"slot": "<slot>"
},
"name": "create_clip"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Name for the new clip. Empty leaves it unnamed. | |
| slot | Yes | Clip slot index in track.clip_slots, counted from 0. A slot index is the scene the clip sits in, so slot 2 is the third scene down. | |
| track | Yes | Track index in song.tracks, counted from 0. | |
| length_beats | No | Loop length of the new clip in beats, so 4.0 is one bar in 4/4 and 16.0 is four. Must be greater than 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||