Class Goniometer
- Namespace
- PluginUI
- Assembly
- PluginUI.dll
Goniometer (vector scope): plots the stereo signal as a cloud of points rotated by 45°, so that mono material is a vertical line, wide material a broad cloud, and out-of-phase material a horizontal line. Reads two AudioRingBuffer written by the audio thread (one per channel).
public class Goniometer : Control
- Inheritance
-
Goniometer
- Inherited Members
Examples
// Processor: _left.Write(outL); _right.Write(outR); Editor:
root.Add(new Goniometer { LeftSource = processor.ScopeLeft, RightSource = processor.ScopeRight });
Remarks
Each point is (S, M) = ((R − L)/√2, (L + R)/√2), scaled by Gain. The most recent PointCount samples are drawn, older ones fainter, which gives a short persistence without accumulating an image.
Constructors
Goniometer()
Creates a goniometer.
public Goniometer()
Properties
DefaultSize
Natural size used when no explicit size is given.
protected override Size DefaultSize { get; }
Property Value
Gain
Zoom factor (1 = full scale reaches the edge).
public float Gain { get; set; }
Property Value
LeftSource
Left channel samples.
[Browsable(false)]
public AudioRingBuffer? LeftSource { get; set; }
Property Value
PointCount
Number of recent samples drawn.
public int PointCount { get; set; }
Property Value
PointSize
Size of a point in DIPs.
public float PointSize { get; set; }
Property Value
RightSource
Right channel samples.
[Browsable(false)]
public AudioRingBuffer? RightSource { get; set; }
Property Value
ShowAxes
Draws the L / R / M / S axes and labels.
public bool ShowAxes { get; set; }
Property Value
TraceColor
Point color (null = theme accent).
public Color? TraceColor { 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