Skip to content

Normalize

mzuelch edited this page Jan 24, 2026 · 1 revision

plugin_id: normalize · UI: Normalisierung · Source: plugins/normalize.py

Peak-normalizes a stream to a target peak level (linear 0..1). This is a gain-only operation (no dynamics).

Parameters

Parameter Type Default Range Meaning
target_peak float 0.999 0..1 Target peak amplitude (dBFS ≈ 0 at 1.0).

Algorithm

peak = max(abs(x))                 # across all samples and channels
if peak is ~0: return x
gain = target_peak / peak
return x * gain

Implementation notes

  • Multi-channel: a single gain factor is computed from the global peak to preserve stereo balance.
  • If the signal is silent (peak ≤ 1e-12), the input is returned unchanged.
  • Intended for offline use; does not add latency.

References

  • U. Zölzer (ed.), DAFX: Digital Audio Effects, 2nd ed., Wiley, 2011. ISBN 978-0-470-66599-2. (Normalization and basic level operations.)

Clone this wiki locally