TracktionEngine
Loading...
Searching...
No Matches
Public Attributes | List of all members
engine::StereoFieldAnalyser::Readings Struct Reference

A snapshot of the analyser's current readings. More...

#include <tracktion_StereoFieldAnalyser.h>

Public Attributes

float correlation = 1.0f
 The last 400ms window.
 
float minCorrelation = 1.0f
 Worst window since prepare() or the last reset.
 
float balance = 0.0f
 The last 400ms window, -1..+1.
 
float width = 0.0f
 The last 400ms window, 0..1.
 
float overallCorrelation = 1.0f
 Since prepare() or the last reset.
 
float overallBalance = 0.0f
 Since prepare() or the last reset, -1..+1.
 
float overallWidth = 0.0f
 Since prepare() or the last reset, 0..1.
 
float monoLossDb = 0.0f
 Overall mono summing loss, in dB (positive = quieter in mono).
 
float interChannelDelayMs = 0.0f
 Right-channel delay relative to left, in ms (negative = left is late).
 
int interChannelDelaySamples = 0
 The same offset at the prepared sample rate.
 
bool polarityInverted = false
 True when the channels match best at inverted polarity.
 
bool windowValid = false
 False until 400ms of non-silent audio has been processed.
 
bool overallValid = false
 False until any non-silent block has been processed.
 
bool alignmentValid = false
 False until the channels match strongly enough at some lag to trust the estimate.
 

Detailed Description

A snapshot of the analyser's current readings.

Correlation is the Pearson correlation of the two channels: +1 for identical (mono-compatible), 0 for unrelated, negative for phase-cancelling material. Balance is the energy split, -1 hard left to +1 hard right. Width is the side energy as a fraction of mid + side energy: 0 for mono, 0.5 for uncorrelated channels, 1 for pure side (out-of-phase) content. monoLossDb is how many dB the overall level drops when the two channels are summed to mono ((l+r)/2 against the per-channel average): 0 for centred material, 3 for uncorrelated or hard-panned material, large for phase-cancelling material.

The alignment readings estimate a whole-signal timing offset between the two channels by cross-correlating them over a range of lags, which is what correlation alone cannot tell you: correlation says the channels disagree, alignment says by how much and in which direction. A positive delay means the right channel arrives later than the left.

Member Data Documentation

◆ correlation

float engine::StereoFieldAnalyser::Readings::correlation = 1.0f

The last 400ms window.

◆ minCorrelation

float engine::StereoFieldAnalyser::Readings::minCorrelation = 1.0f

Worst window since prepare() or the last reset.

◆ balance

float engine::StereoFieldAnalyser::Readings::balance = 0.0f

The last 400ms window, -1..+1.

◆ width

float engine::StereoFieldAnalyser::Readings::width = 0.0f

The last 400ms window, 0..1.

◆ overallCorrelation

float engine::StereoFieldAnalyser::Readings::overallCorrelation = 1.0f

Since prepare() or the last reset.

◆ overallBalance

float engine::StereoFieldAnalyser::Readings::overallBalance = 0.0f

Since prepare() or the last reset, -1..+1.

◆ overallWidth

float engine::StereoFieldAnalyser::Readings::overallWidth = 0.0f

Since prepare() or the last reset, 0..1.

◆ monoLossDb

float engine::StereoFieldAnalyser::Readings::monoLossDb = 0.0f

Overall mono summing loss, in dB (positive = quieter in mono).

◆ interChannelDelayMs

float engine::StereoFieldAnalyser::Readings::interChannelDelayMs = 0.0f

Right-channel delay relative to left, in ms (negative = left is late).

◆ interChannelDelaySamples

int engine::StereoFieldAnalyser::Readings::interChannelDelaySamples = 0

The same offset at the prepared sample rate.

◆ polarityInverted

bool engine::StereoFieldAnalyser::Readings::polarityInverted = false

True when the channels match best at inverted polarity.

◆ windowValid

bool engine::StereoFieldAnalyser::Readings::windowValid = false

False until 400ms of non-silent audio has been processed.

◆ overallValid

bool engine::StereoFieldAnalyser::Readings::overallValid = false

False until any non-silent block has been processed.

◆ alignmentValid

bool engine::StereoFieldAnalyser::Readings::alignmentValid = false

False until the channels match strongly enough at some lag to trust the estimate.


The documentation for this struct was generated from the following file: