Table of Contents

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

double

IsEditing

true between BeginEdit() and EndEdit().

bool IsEditing { get; }

Property Value

bool

Name

Display name.

string Name { get; }

Property Value

string

NormalizedValue

Current normalized value.

double NormalizedValue { get; }

Property Value

double

StepCount

0 = continuous; otherwise number of steps (states − 1).

int StepCount { get; }

Property Value

int

Units

Unit label (Hz, dB, %, ms...).

string Units { get; }

Property Value

string

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

normalized double

ToDisplayString(double)

Text for a normalized value (without units).

string ToDisplayString(double normalized)

Parameters

normalized double

Returns

string

ToNormalized(double)

Plain → normalized value.

double ToNormalized(double plain)

Parameters

plain double

Returns

double

ToPlain(double)

Normalized → plain value.

double ToPlain(double normalized)

Parameters

normalized double

Returns

double

TryParse(string, out double)

Parses user text (with or without units) into a normalized value.

bool TryParse(string text, out double normalized)

Parameters

text string
normalized double

Returns

bool

Events

Changed

Raised after every value change.

event Action<IParameter>? Changed

Event Type

Action<IParameter>