Immutable parameter metadata, registered once at plugin initialization. More...
#include <parameter.hpp>
Public Member Functions | |
| bool | auto_resets () const |
| True when this parameter should auto-reset to its default after each process block — i.e. | |
Public Attributes | |
| ParamID | id = 0 |
| std::string | name |
| std::string | unit |
| Display unit: "dB", "Hz", "%", etc. | |
| ParamRange | range |
| int | group_id = 0 |
| Group for hierarchical organization. 0 = ungrouped. | |
| std::function< std::string(float)> | to_string |
| Convert a raw value to a display string (e.g., "440.0 Hz"). | |
| std::function< float(const std::string &)> | from_string |
| Parse a display string back to a raw value. | |
| ParamRate | rate = ParamRate::ControlRate |
| float | smoothing_ramp_seconds = 0.0f |
| 0 = off / immediate control-rate updates. | |
| ParamDesignation | designation = ParamDesignation::None |
| Declared semantic role. | |
| bool | is_trigger = false |
| Momentary "trigger" parameter. | |
| ParamKind | kind = ParamKind::Continuous |
| Semantic value kind. | |
| std::vector< std::string > | value_labels |
| Ordered display/parse labels for Toggle and Enum parameters. | |
| bool | modulatable = true |
| Whether a host may apply a modulation offset to this parameter. | |
| bool | hidden = false |
| Hide this parameter from the host's generic parameter list. | |
| bool | read_only = false |
| Advertise this parameter as readable but not host-writable. | |
| bool | automatable = true |
| Whether the host may record and play back automation for this parameter. | |
Immutable parameter metadata, registered once at plugin initialization.
Each parameter has a unique id, a human-readable name, an optional unit string for display, a range for normalization, and optional string conversion functions for host display.
|
inline |
True when this parameter should auto-reset to its default after each process block — i.e.
it is an explicit trigger or carries the Reset designation (which is defined to behave as a trigger).
| bool pulp::state::ParamInfo::automatable = true |
Whether the host may record and play back automation for this parameter.
Unlike hidden and read_only, the attribute here is the negative one — authors opt in to NON-automatable by declaring false — so the default of true keeps every existing parameter automatable exactly as it is today. is_automatable_param() additionally refuses automation for a read-only parameter.
| ParamDesignation pulp::state::ParamInfo::designation = ParamDesignation::None |
Declared semantic role.
None (the default) preserves legacy behavior: adapters fall back to their name/range bypass heuristic. Declaring Bypass or Reset makes the role explicit and name-independent.
| std::function<float(const std::string&)> pulp::state::ParamInfo::from_string |
Parse a display string back to a raw value.
| int pulp::state::ParamInfo::group_id = 0 |
Group for hierarchical organization. 0 = ungrouped.
| bool pulp::state::ParamInfo::hidden = false |
Hide this parameter from the host's generic parameter list.
A hidden parameter still exists, still serializes, and is still reachable from the plugin's own editor — it simply does not clutter the host's automation lanes and generic UI. Use it for internal or developer-facing controls.
Opt-in: defaults false, so every existing parameter stays visible. is_hidden_param() additionally refuses to hide a bypass control, which hosts require to remain reachable.
| ParamID pulp::state::ParamInfo::id = 0 |
| bool pulp::state::ParamInfo::is_trigger = false |
Momentary "trigger" parameter.
A trigger is a one-shot "do this now" control (panic, reset, tap): the host or UI raises it, the Processor observes it for exactly one process block, and the state plumbing auto-resets it to its range default after the block (see StateStore::reset_triggers_rt). A Reset designation implies a trigger; an author may also set this directly for a custom one-shot.
One-shot latch contract: a trigger value is block-local. Whatever value is present during a process block — raised by the host/UI, or even written by the Processor itself mid-block — is reset to the range default at the END of that block. A trigger therefore never persists across blocks; observe it within the block it fires. Format adapters reset triggers on EVERY audio-callback exit, including bypass / pass-through early-returns, so a panic/reset raised while bypassed still clears that block rather than firing late on the next non-bypassed block.
| ParamKind pulp::state::ParamInfo::kind = ParamKind::Continuous |
Semantic value kind.
Existing declarations remain continuous until they opt in; adapters must not infer this from the parameter name.
| bool pulp::state::ParamInfo::modulatable = true |
Whether a host may apply a modulation offset to this parameter.
Modulation is an additive, host-owned offset on top of the automated value (StateStore::get_modulated()), distinct from automation. It defaults to true so an ordinary control is reachable by a host's modulators without every author opting in; declare false for a control where a continuously applied offset would be meaningless or unsafe.
is_modulatable_param() additionally refuses modulation for a bypass control, a discrete parameter, and one that auto-resets each block — rules this field cannot override.
| std::string pulp::state::ParamInfo::name |
| ParamRange pulp::state::ParamInfo::range |
| ParamRate pulp::state::ParamInfo::rate = ParamRate::ControlRate |
| bool pulp::state::ParamInfo::read_only = false |
Advertise this parameter as readable but not host-writable.
The canonical case is a meter-style value the Processor publishes for display (output level, gain reduction, detected pitch): the host should render it, never drive it. A read-only parameter is also not automatable, because automation is a host write.
Opt-in: defaults false, so every existing parameter stays writable. is_read_only_param() additionally refuses a bypass control and a trigger, both of which are defined by the host writing to them.
| float pulp::state::ParamInfo::smoothing_ramp_seconds = 0.0f |
0 = off / immediate control-rate updates.
| std::function<std::string(float)> pulp::state::ParamInfo::to_string |
Convert a raw value to a display string (e.g., "440.0 Hz").
| std::string pulp::state::ParamInfo::unit |
Display unit: "dB", "Hz", "%", etc.
| std::vector<std::string> pulp::state::ParamInfo::value_labels |
Ordered display/parse labels for Toggle and Enum parameters.
Index zero corresponds to range.min, index one to range.min + range.step (or +1 when the legacy range omitted a step), and so on.