clip_action
Edit Ableton Live clips in place: crop, duplicate loops, quantize notes or pitch, scrub, adjust warp markers, and copy session clips to the arrangement timeline.
Instructions
Edit a clip in place: crop (discard everything outside the loop), duplicate_loop (loop twice as long, notes and envelopes copied; MIDI only), quantize (grid: rec_q_quarter, rec_q_eight, rec_q_eight_triplet, rec_q_sixtenth, rec_q_thirtysecond...; amount 0-1, default 1; on audio clips it aligns warp markers), quantize_pitch (like quantize for one pitch, 0-127; MIDI only), scrub (position in beats) / stop_scrub, move_playing_pos (amount beats, negative goes back; clip must be playing), and on AUDIO clips add_warp_marker (beat_time; sample_time = seconds in the file, default: where it changes nothing), move_warp_marker (beat_time of an existing marker, distance in beats: this is how audio is retimed) and remove_warp_marker (beat_time); current markers are the clip's warp_markers property. to_arrangement copies a SESSION clip onto its track's arrangement timeline at time (beats) and returns the new clip's address; a clip that carries automation envelopes turns them into arrangement track automation (the envelopes do not stay on the copy; the result lists the parameters now automated), which is how arrangement automation is written: draw_automation on the Session clip first. address must be a clip. crop and quantize rewrite content: one undo step each, and expect ({name}) refuses to act on the wrong clip. Returns the clip's length and loop after the action.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | Song.RecordingQuantization name (quantize, quantize_pitch) | |
| time | No | to_arrangement: destination position in beats on the arrangement | |
| pitch | No | MIDI note number (quantize_pitch) | |
| action | Yes | What to do | |
| amount | No | quantize: 0-1 strength; move_playing_pos: beats | |
| expect | No | Guard: {"name": "..."} must match the clip | |
| address | Yes | A clip, e.g. 'tracks/2/slots/0/clip' | |
| distance | No | move_warp_marker: beats to move by | |
| position | No | Beats from the clip start (scrub) | |
| beat_time | No | Warp marker actions: the marker position in beats | |
| sample_time | No | add_warp_marker: position in the file in seconds |