Interface IParameter
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Value a control can be bound to: a plug-in parameter (through an adapter such as PluginUI.NPlug) or a local value (LocalParameter).
public interface IParameter
- Extension Methods
Remarks
Values are normalized to [0, 1], as in VST3. StepCount > 0 means discrete values
(StepCount + 1 states: 1 = on/off).
Edits follow the gesture protocol: BeginEdit(), any number of PerformEdit(double), EndEdit(). Several parameters may be edited at the same time.
Changed must be raised on the UI thread, for every change (user, host automation, preset).
Properties
DefaultNormalizedValue
Default normalized value.
double DefaultNormalizedValue { get; }
Property Value
IsEditing
true between BeginEdit() and EndEdit().
bool IsEditing { get; }
Property Value
Name
Display name.
string Name { get; }
Property Value
NormalizedValue
Current normalized value.
double NormalizedValue { get; }
Property Value
StepCount
0 = continuous; otherwise number of steps (states − 1).
int StepCount { get; }
Property Value
Units
Unit label (Hz, dB, %, ms...).
string Units { get; }
Property Value
Methods
BeginEdit()
Starts an edit gesture.
void BeginEdit()
EndEdit()
Ends the edit gesture.
void EndEdit()
PerformEdit(double)
Sets the value during a gesture.
void PerformEdit(double normalized)
Parameters
normalizeddouble
ToDisplayString(double)
Text for a normalized value (without units).
string ToDisplayString(double normalized)
Parameters
normalizeddouble
Returns
ToNormalized(double)
Plain → normalized value.
double ToNormalized(double plain)
Parameters
plaindouble
Returns
ToPlain(double)
Normalized → plain value.
double ToPlain(double normalized)
Parameters
normalizeddouble
Returns
TryParse(string, out double)
Parses user text (with or without units) into a normalized value.
bool TryParse(string text, out double normalized)
Parameters
Returns
Events
Changed
Raised after every value change.
event Action<IParameter>? Changed