set_parameter
Set a device parameter by index or name and verify the read-back in Ableton Live. Uses normalised values, reports clamps for quantized steps.
Instructions
Set one device parameter by index or name and verify the read-back.
Returns:
Dictionary reporting the write, the parameter index it resolved to, the
read-back value, and the display string where the device offered one.
Note:
Parameter values are normalised, not the unit the device displays. Read ``min``
and ``max`` (``describe`` with ``with_parameters=True``) rather than assuming
a range.
The curve from 0..1 onto the displayed unit is not linear and differs per
device. On one third-party compressor Attack is ``v^4 * 1000 ms``, so writing
"10 ms" linearly lands at 316 ms, a factor of 30, silently. Where the device
reports a display, aim with the display. Where it does not (all VST2), write
normalised and calibrate by eye once.
A parameter that shows a display also answers ``str_for_value``: lom_call with the
parameter path, ``method='str_for_value'`` and one value returns the string that
value would display, and moves nothing. That maps a unit onto the scale without
deriving the taper by trial (catalog row param.str_for_value).
A quantized parameter takes discrete steps, so a written 0.5 can legitimately read
back as something else, and that is reported as a clamp rather than as a failure.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Which collection the track index counts in: 'track' for song.tracks, 'return' for song.return_tracks, 'master' for the master track, where the track index is ignored. | track |
| track | Yes | Track index in song.tracks, counted from 0. | |
| value | Yes | Target value in the parameter own units, which are normalised and device-specific rather than the unit the device displays. Read ``min`` and ``max`` with ``describe`` first: the range is whatever the device declares and is often not 0..1. | |
| device | Yes | Device index in that track chain, counted from 0. get_devices lists the chain with its indices. | |
| parameter | Yes | Which parameter, either its index as a string ('1') or its name, which may be a glob ('Attack*'). A name that matches more than one parameter is refused rather than guessed at. ``describe`` with with_parameters=True lists the names. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||