create_clip
Create an empty MIDI clip in a Session slot, specifying track index, slot index, and loop length in beats. Refuses occupied slots to prevent overwriting.
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.
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 | |||