set_parameter_display
Set a device parameter by the displayed reading you want, such as ms, dB, or Hz, instead of a raw value; get the written value and residual error back.
Instructions
Set a device parameter by the reading it should show, not by its raw value.
Returns:
Dictionary reporting the value written, the display it produced, the residual
error against the target, the unit, and how many probes and round trips it
took. On refusal, why - including the case where the device reports no units.
Note:
The inverse of ``set_parameter``, and there is no formula to invert: the curve from
the raw range onto the displayed unit differs per parameter and is rarely linear. On
one measured third-party compressor Attack is ``v^4 * 1000 ms``, so writing 10 at a
parameter that displays milliseconds lands at 316 ms and reports success.
One batch of probes asks what each raw value would read as, a second refines inside
the bracket around the target, and only then is a single value written and read
back. The probes write nothing: probing with real writes has left Delay Feedback
and Saturator Drive at 100 % (catalog row return_device.str_for_value). They stay
strictly inside the range, because asking at ``min`` or ``max`` has crashed Live in
a plug-in's own formatting code (docs/limits.md, 'Asking for a display string at an
endpoint (Live)').
Where the device reports no unit this refuses instead of aiming: every VST2 reports
a bare number (0 of 36 measured). Use ``set_parameter`` with a normalised value for
those. The result is the stored value and its display, which is not audibility.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"target": "<target>"
},
"name": "set_parameter_display"
}
}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 |
| path | No | LOM path instead of track and device, for what they cannot reach. Either a device, such as song.tracks[0].devices[0].drum_pads[36].chains[0].devices[0] inside a Drum Rack pad, with parameter naming the knob; or a DeviceParameter itself, such as song.tracks[0].devices[0].chains[1].mixer_device.volume for a rack chain's fader. | |
| unit | No | Which unit the target is in: 'dB', 'Hz', 'ms', '%', 'ratio', 'st', 'cents' or 'x'. Give kHz as Hz and seconds as ms. Optional: when omitted the unit the device reports is used, and a device reporting a different unit than you expected is a refusal, not a guess. | |
| track | No | Track index in the collection ``kind`` names, counted from 0. Give track and device, or give path instead. | |
| device | No | Device index in that track chain, counted from 0. get_devices lists the chain with its indices. | |
| target | Yes | The reading you want, as a bare number in the base unit: -26 for -26 dB, 8000 for 8 kHz, 150 for 150 ms, 4 for a 4:1 ratio. Not the normalised value - that is set_parameter. | |
| parameter | No | 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. Not needed when path names the parameter itself. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||