clips_write_midi
Write MIDI notes into a MIDI track's session clip slot, creating the clip when empty; choose replace or merge mode and set loop length in beats.
Instructions
Write notes into a session clip slot of a MIDI track, creating the clip if the slot is empty. mode 'replace' (default) leaves exactly these notes, 'merge' adds them. length_beats sets the loop (default: the notes rounded up to whole bars). Times are in beats from the clip start (1 beat = a quarter note; in 4/4 a bar is 4 beats). The clip loops; launch it with clips.launch. Undoable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Replace or merge the clip's notes. | |
| slot | Yes | 0-based clip slot (scene row) on the track. | |
| notes | Yes | Notes to write. | |
| track | Yes | Track id (UUID string from tracks.list, stable) or 0-based index (shifts when tracks are added or moved). | |
| length_beats | No | Loop length in beats. |