Table of Contents

Class LoudnessMeter

Namespace
PluginUI
Assembly
PluginUI.dll

EBU R128 loudness meter: momentary and short-term bars against a target line, integrated loudness, loudness range and sample peak, read from a LoudnessAnalyzer fed by the audio thread.

public class LoudnessMeter : Control
Inheritance
LoudnessMeter
Inherited Members

Remarks

Values are shown in LUFS (absolute) or in LU relative to TargetLufs (ShowRelative). Double-click resets the measurement (thread-safe, through RequestReset()). Common targets: −23 LUFS (EBU R128 broadcast), −24 (ATSC A/85), −14 (most streaming services), −16 (podcasts).

Constructors

LoudnessMeter()

Creates a loudness meter.

public LoudnessMeter()

Properties

Analyzer

The analyzer (fed by the audio thread).

[Browsable(false)]
public LoudnessAnalyzer? Analyzer { get; set; }

Property Value

LoudnessAnalyzer

DefaultSize

Natural size used when no explicit size is given.

protected override Size DefaultSize { get; }

Property Value

Size

Integrated

Last integrated loudness read (LUFS).

[Browsable(false)]
public double Integrated { get; }

Property Value

double

MaxLufs

Top of the bars in LUFS.

public float MaxLufs { get; set; }

Property Value

float

MinLufs

Bottom of the bars in LUFS.

public float MinLufs { get; set; }

Property Value

float

Momentary

Last momentary loudness read (LUFS).

[Browsable(false)]
public double Momentary { get; }

Property Value

double

ShortTerm

Last short-term loudness read (LUFS).

[Browsable(false)]
public double ShortTerm { get; }

Property Value

double

ShowDetails

Shows the loudness range and the peak below the integrated value.

public bool ShowDetails { get; set; }

Property Value

bool

ShowRelative

Shows values in LU relative to the target instead of LUFS.

public bool ShowRelative { get; set; }

Property Value

bool

TargetLufs

Target loudness in LUFS (drawn as a line; reference of relative mode).

public float TargetLufs { get; set; }

Property Value

float

ToleranceLu

Tolerance around the target (green zone), in LU.

public float ToleranceLu { get; set; }

Property Value

float

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()

OnMouseDown(MouseEventArgs)

Mouse button pressed over the element (or captured).

protected override void OnMouseDown(MouseEventArgs e)

Parameters

e MouseEventArgs

Refresh(double)

Reads the analyzer (every frame; integrated loudness and range 4 times per second).

public void Refresh(double elapsedSeconds)

Parameters

elapsedSeconds double

Time since the previous call.

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