Table of Contents

Class StereoAnalysis

Namespace
PluginUI.Dsp
Assembly
PluginUI.dll

Stereo image measurements used by CorrelationMeter and Goniometer.

public static class StereoAnalysis
Inheritance
StereoAnalysis
Inherited Members

Methods

Balance(ReadOnlySpan<float>, ReadOnlySpan<float>)

Stereo balance of a block from the channel energies: −1 = left only, 0 = centered, +1 = right only.

public static double Balance(ReadOnlySpan<float> left, ReadOnlySpan<float> right)

Parameters

left ReadOnlySpan<float>

Left samples.

right ReadOnlySpan<float>

Right samples (same length).

Returns

double

The balance in [−1, 1] (0 for silence).

Exceptions

ArgumentException

The spans have different lengths.

Correlation(ReadOnlySpan<float>, ReadOnlySpan<float>)

Phase correlation of two channels over a block: Σ(L·R) / √(ΣL² · ΣR²), from +1 (mono, in phase) through 0 (unrelated / wide) to −1 (out of phase, cancels in mono). Returns 0 for silence. Vectorized.

public static double Correlation(ReadOnlySpan<float> left, ReadOnlySpan<float> right)

Parameters

left ReadOnlySpan<float>

Left samples.

right ReadOnlySpan<float>

Right samples (same length).

Returns

double

The correlation coefficient in [−1, 1].

Exceptions

ArgumentException

The spans have different lengths.