Table of Contents

Namespace PluginUI.Dsp

Signal processing used by the meters and analyzers, usable from a plug-in processor: FFT (Fft), lock-free audio → UI transfer (AudioRingBuffer, PeakValue), meter ballistics, EBU R128 loudness (LoudnessAnalyzer), biquad design, stereo analysis, WAV reading and waveform peaks. The real-time paths allocate nothing and use SIMD (AVX2 / AVX-512 / SSE) when available.

Classes

AudioData

Decoded audio: one float array per channel (−1..1) and the sample rate.

AudioRingBuffer

Lock-free single-producer / single-consumer sample ring buffer that carries audio from the audio thread (Write(ReadOnlySpan<float>), wait-free, no allocation) to the UI thread (CopyLatest(Span<float>), Read(Span<float>)). Feeds the oscilloscope, the spectrum analyzer and custom visualizations.

BiquadDesign

Second-order filter coefficients from the RBJ "Audio EQ Cookbook" and their exact magnitude response, used to draw equalizer curves that match a biquad implementation sample for sample.

CompressorMath

Static characteristic of a feed-forward compressor (drawn by CompressorCurve).

Decibels

Level conversions.

Fft

Radix-2 FFT with precomputed twiddles and a magnitude-spectrum helper for analyzers. One instance per size; not thread-safe (use one per thread).

LevelBallistics

Meter ballistics on the UI side: instant attack / exponential release, and a peak-hold marker. Feed it with the block peak (or RMS) computed on the audio thread and published through a volatile field.

LoudnessAnalyzer

Loudness measurement according to ITU-R BS.1770-4 / EBU R128: momentary (400 ms), short-term (3 s) and integrated (gated) loudness in LUFS, loudness range (LRA, EBU Tech 3342) and sample peak. Feeds LoudnessMeter.

PeakValue

Thread-safe single value published by the audio thread and read by the UI (meters, LEDs, gain reduction). Stores the maximum since the last read so short peaks are never missed.

StereoAnalysis

Stereo image measurements used by CorrelationMeter and Goniometer.

WavReader

Minimal WAV (RIFF / RIFX-free) reader for previews in WaveformView: PCM 8, 16, 24 and 32 bit, IEEE float 32 and 64 bit, WAVE_FORMAT_EXTENSIBLE, any channel count. Not meant for the audio thread (allocates the decoded data).

WaveformPeaks

Multi-resolution min/max summary of a long signal, so that a waveform of millions of samples is drawn at any zoom level by reading at most a few values per pixel (used by WaveformView).

Structs

BiquadDesign.Coefficients

Normalized biquad coefficients: y = b0·x + b1·x₁ + b2·x₂ − a1·y₁ − a2·y₂.

Enums

EqBandType

Filter shapes of an equalizer band (BiquadDesign, ParametricEqEditor).

WindowFunction

Analysis window shapes.