Table of Contents

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

Size

Gain

Zoom factor (1 = full scale reaches the edge).

public float Gain { get; set; }

Property Value

float

LeftSource

Left channel samples.

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

Property Value

AudioRingBuffer

PointCount

Number of recent samples drawn.

public int PointCount { get; set; }

Property Value

int

PointSize

Size of a point in DIPs.

public float PointSize { get; set; }

Property Value

float

RightSource

Right channel samples.

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

Property Value

AudioRingBuffer

ShowAxes

Draws the L / R / M / S axes and labels.

public bool ShowAxes { get; set; }

Property Value

bool

TraceColor

Point color (null = theme accent).

public Color? TraceColor { get; set; }

Property Value

Color?

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

dc DrawingContext
widget Rect
style VectorStyle