Class EffectParameter
A thin, delegate-backed facade over one of an effect's existing typed properties, describing it enough to drive a generic UI (or a VST3-style host, presets, automation). It does not store state — get/set forward to the effect — so the effect's property remains the single source of truth and IAudioEffect is unaffected. Build these with the static factory methods.
public sealed class EffectParameter
- Inheritance
-
EffectParameter
- Inherited Members
Properties
Choices
Choice labels for Choice; otherwise null.
public IReadOnlyList<string> Choices { get; }
Property Value
DefaultValue
The value at the time the parameter was created.
public float DefaultValue { get; }
Property Value
IsReadOnly
True for a Meter (set is ignored).
public bool IsReadOnly { get; }
Property Value
Kind
The control kind.
public EffectParameterKind Kind { get; }
Property Value
Maximum
Maximum value (also upper display bound for a meter).
public float Maximum { get; }
Property Value
Minimum
Minimum value (also lower display bound for a meter).
public float Minimum { get; }
Property Value
Name
Display name.
public string Name { get; }
Property Value
Unit
Unit string for display (e.g. "dB", "Hz", "ms"); empty if none.
public string Unit { get; }
Property Value
Value
The live value, read from / written to the underlying effect property. Writes are clamped to [Minimum, Maximum]; writes to a meter are ignored. If a dispatch has been attached (the effect is running behind an audio thread) the clamped write is deferred and applied at the next block boundary on the audio thread; the getter then returns that just-requested value (optimistically) so a UI bound two-way does not snap back before the audio thread has applied it. Otherwise it is applied inline. See ParameterDispatchQueue.
public float Value { get; set; }
Property Value
Methods
Choice(string, IReadOnlyList<string>, Func<int>, Action<int>)
Creates a one-of-N choice parameter (Value is the index).
public static EffectParameter Choice(string name, IReadOnlyList<string> choices, Func<int> getter, Action<int> setter)
Parameters
Returns
Continuous(string, string, float, float, Func<float>, Action<float>)
Creates a continuous numeric parameter.
public static EffectParameter Continuous(string name, string unit, float minimum, float maximum, Func<float> getter, Action<float> setter)
Parameters
Returns
Meter(string, string, float, float, Func<float>)
Creates a read-only meter parameter (e.g. live gain reduction).
public static EffectParameter Meter(string name, string unit, float minimum, float maximum, Func<float> getter)
Parameters
Returns
Toggle(string, Func<bool>, Action<bool>)
Creates an on/off parameter.
public static EffectParameter Toggle(string name, Func<bool> getter, Action<bool> setter)