Skip to content

The Mastering Chain ​

This page covers how the libsonare mastering chain is ordered and how the browser demo exposes it. For what mastering is and what it can and cannot fix, see What Is Mastering?.

The chain runs locally in WebAssembly: the file is decoded in the browser, processed through the configurable chain, and exported as WAV without uploading audio to a server.

In The Demo ​

Use Quick Master for preset-driven rendering. Use Studio to adjust module-level controls such as compressor threshold, air band amount, stereo width, limiter ceiling, and lookahead.

Processing Chain ​

The browser demo presents the chain as a small number of musical decisions, but the render still follows a deterministic DSP path. Each stage only sees the audio after every earlier stage has run, so corrective work (repair, tone) always happens before the stages that depend on a clean, balanced signal (dynamics, stereo, limiting, loudness).

Mastering chain
Decoded sourceRepair + inputTone + airDynamicsStereo imageTrue-peak limiterLoudness targetWAV + report
Corrective stages run first; peak safety and loudness are locked in last. The loudness stage applies its gain and then runs its own true-peak limiter, so the ceiling still holds after the gain.

The grouped guides below explain the implementation details without splitting every parameter into a thin page:

Implementation notes

The chain is intentionally ordered from corrective stages to final delivery stages.

Stage areaWhy it appears there
Repair and input gainClicks, noise, DC offset, or very low input level can mislead later detectors
Broad tone shapingDynamics should react to the tonal balance the listener will hear
Stereo processingWidening can change peak relationships and mono compatibility, so limiter and meter stages need to see it

The final loudness stage should not be treated as a simple gain knob.

Integrated LUFS is measured over the rendered material. True peak is checked on an oversampled path. The limiter ceiling remains a separate safety constraint.

When these stages disagree, peak safety wins over target loudness. Otherwise a master can pass a LUFS target while still clipping after codec conversion.

Related: What Is Mastering?, LUFS, True Peak, Loudness Matching and A/B Comparison, Browser Local Processing, Mastering Implementation