Table of Contents

Class ParametricEqEditor

Namespace
PluginUI
Assembly
PluginUI.dll

Interactive parametric equalizer display (FabFilter-style): frequency response of all bands, draggable band nodes, Q on the mouse wheel, per-band shape menu, and an optional live spectrum behind the curve.

public class ParametricEqEditor : Control
Inheritance
ParametricEqEditor
Inherited Members

Examples

var eq = new ParametricEqEditor { SampleRate = 48000 };
eq.Bands.Add(new EqBand(EqBandType.LowCut, 40, 0, 0.7071) { FrequencyParameter = Parameters[model.LowCut] });
eq.Bands.Add(new EqBand(EqBandType.Bell, 1000, 3, 1.2)
{
    FrequencyParameter = Parameters[model.MidFreq], GainParameter = Parameters[model.MidGain], QParameter = Parameters[model.MidQ],
});
eq.SpectrumSource = processor.OutputScope; // optional analyzer underlay

Remarks

Mouse. Drag a node to change frequency (horizontal) and gain (vertical; Shift = fine), turn the wheel over a node to change Q, double-click a node to bypass it, right-click it for its shape, bypass and delete commands. With AllowAddBands, double-clicking an empty area adds a bell band there.

Accuracy. The curve is the exact magnitude of the digital RBJ biquads at SampleRate (BiquadDesign), so it matches a processor using the same formulas.

Parameters. Bind each band to the plugin parameters through EqBand; drags send complete edit gestures, frequency and gain in parallel. The display follows host automation every frame.

Constructors

ParametricEqEditor()

Creates an equalizer editor.

public ParametricEqEditor()

Properties

AllowAddBands

Double-click on an empty area adds a band; the band menu offers "Delete".

public bool AllowAddBands { get; set; }

Property Value

bool

Bands

The bands (add, remove or replace freely; the display updates on the next frame).

public IList<EqBand> Bands { get; }

Property Value

IList<EqBand>

CurveColor

Total response color (null = theme accent).

public Color? CurveColor { get; set; }

Property Value

Color?

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

GainRangeDb

Gain range above and below 0 dB.

public float GainRangeDb { get; set; }

Property Value

float

MaxBands

Maximum number of bands when AllowAddBands is set.

public int MaxBands { get; set; }

Property Value

int

MaxFrequency

Highest displayed frequency in Hz.

public float MaxFrequency { get; set; }

Property Value

float

MaxQ

Highest Q reachable with the wheel.

public float MaxQ { get; set; }

Property Value

float

MinFrequency

Lowest displayed frequency in Hz.

public float MinFrequency { get; set; }

Property Value

float

MinQ

Lowest Q reachable with the wheel.

public float MinQ { get; set; }

Property Value

float

SampleRate

Sample rate used to compute the digital response, in Hz.

public float SampleRate { get; set; }

Property Value

float

SelectedIndex

Selected band index (−1 = none).

[Browsable(false)]
public int SelectedIndex { get; set; }

Property Value

int

ShowBandCurves

Draws each band's own curve below the total response.

public bool ShowBandCurves { get; set; }

Property Value

bool

SpectrumSource

Audio to analyze and draw behind the curve, or null.

[Browsable(false)]
public AudioRingBuffer? SpectrumSource { get; set; }

Property Value

AudioRingBuffer

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

e MouseEventArgs

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

e MouseEventArgs

OnMouseUp(MouseEventArgs)

Mouse button released.

protected override void OnMouseUp(MouseEventArgs e)

Parameters

e MouseEventArgs

OnMouseWheel(MouseEventArgs)

Mouse wheel over the element.

protected override void OnMouseWheel(MouseEventArgs e)

Parameters

e MouseEventArgs

RenderVector(DrawingContext, Rect, VectorStyle)

Vector rendering of the widget area.

protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)

Parameters

dc DrawingContext
widget Rect
style VectorStyle

ResponseDb(double)

Total response in dB of the enabled bands at a frequency.

public double ResponseDb(double frequency)

Parameters

frequency double

Frequency in Hz.

Returns

double

Sum of the band magnitudes in dB.

Events

BandAdded

Raised after the user added a band (AllowAddBands).

public event Action<ParametricEqEditor, EqBand>? BandAdded

Event Type

Action<ParametricEqEditor, EqBand>

BandChanged

Raised after the user changed a band.

public event Action<ParametricEqEditor, EqBand>? BandChanged

Event Type

Action<ParametricEqEditor, EqBand>

BandRemoved

Raised after the user deleted a band.

public event Action<ParametricEqEditor, EqBand>? BandRemoved

Event Type

Action<ParametricEqEditor, EqBand>

SelectionChanged

Raised when SelectedIndex changes.

public event Action<ParametricEqEditor>? SelectionChanged

Event Type

Action<ParametricEqEditor>