pub struct ParamInfo {
pub id: u32,
pub name: &'static str,
pub short_name: &'static str,
pub group: &'static str,
pub range: ParamRange,
pub default_plain: f64,
pub flags: ParamFlags,
pub unit: ParamUnit,
pub kind: ParamValueKind,
pub midi_map: Option<MidiSource>,
pub midi_channel: Option<u8>,
}Expand description
Metadata for a single parameter, used by format wrappers.
Copy because every field is POD (&'static str, scalars,
bitflags, the ParamRange / ParamUnit enums). Lets the
audio path pass param_infos[i] by value without clone() noise.
Fields§
§id: u32§name: &'static str§short_name: &'static str§group: &'static str§range: ParamRange§default_plain: f64§flags: ParamFlags§unit: ParamUnit§kind: ParamValueKindWhich *Param type backs this entry. Drives display rounding
(IntParam skips fractional digits) and value_text parsing,
independently of ParamRange - a FloatParam declared with
range = "discrete(...)" should still format as a float, so
inferring kind from range alone is wrong.
midi_map: Option<MidiSource>Default host MIDI-learn binding: the MIDI message that should
drive this parameter. None (the common case) means the host
maps it itself with no plugin hint. Set by #[param(midi_cc = …)] / #[param(midi_source = …)]; read by the VST3
IMidiMapping, AU parameter-MIDI-mapping, and LV2 midi:binding
paths. Ignored by CLAP / VST2 / AAX (the host owns the mapping).
midi_channel: Option<u8>Optional channel scope for Self::midi_map, as the wire
channel 0..=15. None matches any channel.