pub struct Parameter {
pub id: u32,
pub name: String,
pub value: f64,
pub min: f64,
pub max: f64,
pub default: f64,
pub unit: String,
pub step_count: i32,
pub can_automate: bool,
pub is_read_only: bool,
pub is_bypass: bool,
pub flags: u32,
}Expand description
Plugin parameter information
Fields§
§id: u32Parameter ID
name: StringParameter name
value: f64Current normalized value (0.0 to 1.0)
min: f64Minimum value in normalized space (VST3 parameters are always 0.0..=1.0;
the plain/engineering range is private to the plugin — use
crate::Plugin::format_parameter for human-readable values).
max: f64Maximum value in normalized space (always 1.0 for VST3 parameters).
default: f64Default value
unit: StringParameter unit (e.g., “Hz”, “dB”, “%”)
step_count: i32Step count (0 = continuous)
can_automate: boolWhether the parameter can be automated
is_read_only: boolWhether the parameter is read-only
is_bypass: boolWhether the parameter is a bypass control
flags: u32Parameter flags
Implementations§
Source§impl Parameter
impl Parameter
Sourcepub fn normalized_to_plain(&self, normalized: f64) -> f64
pub fn normalized_to_plain(&self, normalized: f64) -> f64
Convert normalized value (0.0-1.0) to plain value
Sourcepub fn plain_to_normalized(&self, plain: f64) -> f64
pub fn plain_to_normalized(&self, plain: f64) -> f64
Convert plain value to normalized value (0.0-1.0)
Sourcepub fn format_value(&self, normalized: f64) -> String
pub fn format_value(&self, normalized: f64) -> String
Approximate a human-readable value string from normalized space.
This cannot know the plugin’s internal mapping (VST3 keeps that private), so
for continuous parameters it just reports the normalized number with the unit.
For accurate display (e.g. "440.00 Hz"), use
crate::Plugin::format_parameter, which asks the plugin to format it.
Sourcepub fn is_discrete(&self) -> bool
pub fn is_discrete(&self) -> bool
Check if this is a discrete/stepped parameter
Sourcepub fn is_boolean(&self) -> bool
pub fn is_boolean(&self) -> bool
Check if this is a boolean/switch parameter