draw_automation
Draw automation envelopes for device or mixer parameters in Session clips by specifying time-value points, curves, and resolution. Writes editable breakpoints or steps, with replace or merge modes.
Instructions
Draw a clip automation envelope for a device or mixer parameter, inside Live (tempo-locked, sample-accurate). clip: a Session clip address ('tracks/2/slots/0/clip'); parameter: a parameter address on that clip's track ('tracks/2/devices/0/parameters/5', 'tracks/2/mixer/volume', 'tracks/2/mixer/sends/0'). points: [{time, value, curve?}] with time in beats from clip start and value in the parameter's own units (get_device shows min/max). The default style 'breakpoints' writes real envelope breakpoints (straight lines between them; smooth/ease curves get a breakpoint every resolution beats, default 0.25; step curves make jumps), so it is editable in Live and light. 'steps' writes a staircase of fine steps instead (resolution default 0.125). curve: linear (default), step, smooth, ease_in, ease_out (a point's own curve shapes the segment after it). mode replace (default) rebuilds the parameter's envelope, merge rewrites only the drawn range (breakpoints outside connect to it by straight lines). With hold (default true) the clip edges are filled with the first/last value. The result includes a readback of Live's stored values. Arrangement clips have no envelopes in Live's API. One undo step per call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip | Yes | Session clip address, e.g. 'tracks/2/slots/0/clip' | |
| hold | No | Fill the clip before the first and after the last point (default true) | |
| mode | No | 'replace' (default) or 'merge' | |
| curve | No | Default curve between points (default 'linear') | |
| style | No | Default 'breakpoints' | |
| points | Yes | Breakpoints, e.g. [{"time":0,"value":0.2},{"time":8,"value":0.9}] | |
| parameter | Yes | Parameter address, e.g. 'tracks/2/devices/0/parameters/5' or 'tracks/2/mixer/volume' | |
| resolution | No | Beats between generated breakpoints (or steps) on curved segments |