Class EnvelopeEditor
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Graphical ADSR editor: drag the peak (attack), the decay corner (decay + sustain), the sustain plateau (sustain) or the end point (release). Values are normalized (times scaled by the plug-in) and each can be bound to a parameter; double-click a point resets it.
public class EnvelopeEditor : Control
- Inheritance
-
EnvelopeEditor
- Inherited Members
Constructors
EnvelopeEditor()
Creates an envelope editor.
public EnvelopeEditor()
Properties
Attack
Attack time (normalized).
public double Attack { get; set; }
Property Value
AttackParameter
Parameter bound to the attack time.
public IParameter? AttackParameter { get; set; }
Property Value
Curvature
Curve bend of the segments (0 = straight lines, 1 = strongly exponential).
public float Curvature { get; set; }
Property Value
Decay
Decay time (normalized).
public double Decay { get; set; }
Property Value
DecayParameter
Parameter bound to the decay time.
public IParameter? DecayParameter { get; set; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
FineFactor
Sensitivity multiplier while Shift is held.
public float FineFactor { get; set; }
Property Value
this[EnvelopeStage]
Value of a stage (normalized).
public double this[EnvelopeStage stage] { get; set; }
Parameters
stageEnvelopeStage
Property Value
Release
Release time (normalized).
public double Release { get; set; }
Property Value
ReleaseParameter
Parameter bound to the release time.
public IParameter? ReleaseParameter { get; set; }
Property Value
Sustain
Sustain level (normalized).
public double Sustain { get; set; }
Property Value
SustainParameter
Parameter bound to the sustain level.
public IParameter? SustainParameter { get; set; }
Property Value
ValueText
Text drawn in the value area (null = no value area).
public override string? ValueText { get; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
OnCaptureLost()
The mouse capture was lost without a button release.
protected override void OnCaptureLost()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
OnMouseDown(MouseEventArgs)
Mouse button pressed over the element (or captured).
protected override void OnMouseDown(MouseEventArgs e)
Parameters
OnMouseLeave()
The mouse left the element.
protected override void OnMouseLeave()
OnMouseMove(MouseEventArgs)
Mouse moved over the element (or captured).
protected override void OnMouseMove(MouseEventArgs e)
Parameters
OnMouseUp(MouseEventArgs)
Mouse button released.
protected override void OnMouseUp(MouseEventArgs e)
Parameters
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle
SetFormatter(EnvelopeStage, Func<double, string>?)
Sets the formatter of a stage's value text.
public void SetFormatter(EnvelopeStage stage, Func<double, string>? formatter)
Parameters
stageEnvelopeStageformatterFunc<double, string>
Events
StageChanged
Raised when a stage changes.
public event Action<EnvelopeEditor, EnvelopeStage, double>? StageChanged