Module text
Expand description
Parameter value text shared by every export format.
CLAP and the native table (VST3, AUv2, AAX, LV2) format and parse values with these functions, so hosts show the same text everywhere.
Functions§
- format_
value write_valueinto a new string.- parse_
value - Parse text written by
write_valueor typed by a user: a number with an optional unit suffix, orOn/Offfor switches. The result is clamped and snapped to the parameter’s range. - write_
value - Write a physical value as text: clamped and snapped first, then
On/Offfor switches (the bypass parameter and unitless 0/1 toggles). Otherwise a number: whole for integral stepped values and logarithmic values of 1,000 or more, one decimal (dropped when it is zero) from 100, and two decimals below 100, so a value that is not whole never reads as one. The unit follows after a space when the parameter has one. Nonfinite values fail.