Class CorrelationMeter
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Phase correlation meter: a horizontal bar from −1 (out of phase) through 0 to +1 (mono), computed from two AudioRingBuffer over WindowMilliseconds and smoothed. Red on the left half warns that the mix will lose content when summed to mono.
public class CorrelationMeter : Control
- Inheritance
-
CorrelationMeter
- Inherited Members
Constructors
CorrelationMeter()
Creates a correlation meter.
public CorrelationMeter()
Properties
Correlation
Current (smoothed) correlation in [−1, 1].
[Browsable(false)]
public double Correlation { get; }
Property Value
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
LeftSource
Left channel samples.
[Browsable(false)]
public AudioRingBuffer? LeftSource { get; set; }
Property Value
RightSource
Right channel samples.
[Browsable(false)]
public AudioRingBuffer? RightSource { get; set; }
Property Value
SampleRate
Sample rate of the sources, used to convert the window to samples.
public float SampleRate { get; set; }
Property Value
SmoothingSeconds
Smoothing time constant in seconds (0 = none).
public float SmoothingSeconds { get; set; }
Property Value
WindowMilliseconds
Analysis window in milliseconds.
public float WindowMilliseconds { get; set; }
Property Value
Methods
OnAttached()
Called when the element joins a host (subscribe to external events here).
protected override void OnAttached()
OnDetached()
Called when the element leaves its host (unsubscribe here).
protected override void OnDetached()
RenderVector(DrawingContext, Rect, VectorStyle)
Vector rendering of the widget area.
protected override void RenderVector(DrawingContext dc, Rect widget, VectorStyle style)
Parameters
dcDrawingContextwidgetRectstyleVectorStyle
Update(double)
Recomputes the correlation from the sources (called every frame).
public void Update(double elapsedSeconds)
Parameters
elapsedSecondsdoubleTime since the previous update.