Intelligent Mastering Maximizer

Increase perceived loudness while shaping the balance between clarity, impact and dynamic density. A two-pass, program-dependent offline mastering processor with adaptive lookahead limiting, optional LUFS targeting and oversampled peak protection.

Author: Shai CohenAffiliation: Department of Music, Bar-Ilan University, IsraelVersion: 1.0 (2026)Category: Dynamics & EnvelopeLicense: MIT LicenseRepo: Praat AudioTools
Contents:

What this does

Intelligent Mastering Maximizer analyses an entire recording and uses its peak, loudness and local dynamic characteristics to drive a stereo-linked lookahead limiter. It can approach a selected integrated LUFS target, or operate at a manually chosen drive level. Program-dependent release and transient-sensitive behaviour help balance loudness, punch and smoothness.

Mastering idea: loudness is not the only goal. Different modes deliberately balance transient retention, release behaviour and permissible gain reduction so the same source can be mastered with different musical priorities.

Key Features:

Quick start

  1. Select exactly one Sound object in Praat (mono or stereo).
  2. Run Intelligent_Mastering_Maximizer.praat.
  3. Select a mode; Balanced is the default starting point.
  4. Leave Automatic loudness targeting enabled and select a target, such as -14 LUFS Streaming; alternatively disable it and adjust Manual drive dB.
  5. Set True peak ceiling dBTP (default -1 dBTP) and choose Oversampling (default 4x Standard).
  6. Enable Show dynamics settings for detailed control, or select Custom to open the settings dialog.
  7. Use Generate analysis report, Visualize and Play to review the resulting Sound.
First comparison: master the same phrase in Transparent, Balanced and Punch. Compare at matched playback loudness; otherwise a louder render may seem preferable simply because it is louder.

Core concept

Selected Sound → full-file loudness & dynamics analysis ↓ oversampled peak sidechain ↓ mode settings + adaptive release ↓ lookahead gain-reduction curve ↓ optional bounded LUFS drive search ↓ linked mono/stereo offline rendering ↓ oversampled peak check + correction ↓ new mastered Sound + report

The processor does not add loudness by simple peak normalisation. It determines a time-varying gain envelope and applies it to the audio. A mode-specific gain-reduction budget helps the automatic targeting stage avoid excessive limiting; the Experimental mode deliberately permits a much more radical result.

Six mastering modes + Custom

Transparent

Gentle dynamics with substantial transient preservation, longer lookahead and a conservative gain-reduction budget. For acoustic and dynamically sensitive sources.

Balanced

General-purpose mastering with moderate release adaptation and limiting. A practical starting point for mixed material.

Punch

Short lookahead, faster recovery and stronger transient protection. For attacks, rhythms and percussive clarity.

Dense

Slower release and broader knee to manage sustained, layered and continuous textures while reducing abrupt gain motion.

Aggressive

Higher permitted gain reduction and firmer limiting for louder results, with correspondingly greater risk of audible dynamic coloration.

Experimental

Inverts the normal release response, with long recovery after impulses and faster response on sustained sounds. Designed for audible breathing, density changes and gritty dynamics.

Custom

Starts with Balanced settings and opens a separate dialog to adjust lookahead, release, transient preservation, knee and gain-reduction budget.

Editing modes: Show dynamics settings opens a dialog pre-filled from the selected mode. The changes affect the current render; selecting Custom opens the same settings automatically.

Controls

Main dialog

ControlFunction
ModeTransparent, Balanced, Punch, Dense, Aggressive, Experimental or Custom.
Automatic loudness targetingEnables the offline search for a drive level approaching the selected LUFS target.
Target-18 Dynamic, -16 Gentle, -14 Streaming, -12 Loud, -10 Aggressive, or Custom target.
Custom target LUFSNumeric integrated-loudness target when Custom target is selected.
Manual drive dBInput drive used when automatic targeting is disabled.
True peak ceiling dBTPMaximum estimated reconstructed peak of the output; default -1 dBTP.
Oversampling4x Standard, 8x High or 16x Very high. Higher settings require more computation.
Output trim dBAdditional attenuation after mastering; positive values are not permitted.
Show dynamics settingsOpens the additional dynamics dialog.
Generate analysis reportPrints input/output measurements, targeting details and warnings to Praat Info.
VisualizeDraws a diagnostic overview in Praat Picture.
PlayAuditions the mastered Sound after processing.

Dynamics settings

ControlMusical effect
Lookahead msControls how far before an upcoming peak gain reduction can begin.
Minimum release msFastest permitted recovery of gain reduction.
Maximum release msSlowest permitted recovery, useful for stabilising sustained material.
Adaptive release strengthControls the degree of source-dependent release adaptation. Negative values can invert its normal behaviour.
Transient preservationInfluences limiting response around attacks; does not reconstruct transients after limiting.
Knee dBAdjusts how gradually gain reduction begins around the output ceiling.
Gain reduction budget dBConstrains automatic loudness targeting to avoid demanding excessive gain reduction.

Loudness targeting

With automatic targeting enabled, the maximizer searches for a drive level that approaches the requested integrated LUFS while respecting mode-dependent gain-reduction constraints. The search uses a faster loudness estimate during candidate evaluation and measures the final render separately.

Important: the LUFS target is a request, not a guarantee. If the requested level would exceed the configured gain-reduction budget, the processor may deliver a quieter result and report why.

Choose Manual drive when you want to decide the amount of limiting by ear rather than asking the processor to meet a numerical loudness target. Integrated LUFS reflects measured programme loudness; it is not interchangeable with peak level or RMS.

Adaptive dynamics

The limiter calculates a reduction envelope from its oversampled peak sidechain, with lookahead and smoothing around forthcoming peaks. Release time is adjusted according to local crest factor, recent gain-reduction activity and detected transients. The same final gain envelope is applied to both channels of stereo input.

Upcoming peaks → required attenuation Local dynamics + transient history → adaptive release Lookahead + smoothing → continuous gain envelope Linked gain envelope × mono/stereo samples → output

Transient preservation changes the way limiting reacts to attacks. More preservation typically restricts the loudness that can be achieved without compromising those attacks. In contrast, Experimental deliberately changes the recovery pattern to create audible envelope motion.

True-peak protection

Peak analysis uses 4×, 8× or 16× oversampled reconstruction to estimate between-sample maxima. After rendering, the output is scanned again. Where necessary, the processor attempts additional local ceiling correction and can apply a final safety attenuation.

Measurement distinction: sample peak is the maximum stored sample value; estimated true peak considers peaks between stored samples. The output report labels its true-peak readings as oversampled estimates. For delivery to a strict broadcast or distribution specification, independent metering is recommended.

Visualisation

With Visualize enabled, Praat Picture draws measurements from the actual input, gain control and resulting output.

Input and output

Compare waveform levels and shape before and after mastering.

Gain reduction

Inspect when the limiter engages and how strongly it attenuates peaks.

Adaptive release

Review the changing release behaviour over the recording.

Loudness and diagnostics

Inspect loudness trajectories, the selected target and numerical measurements.

Detailed numerical values and warnings are printed to Praat Info when the analysis report is enabled.

Outputs

The processor creates a new Sound named after the selected source:

Source_mastered

The original Sound is preserved. Output retains the original duration, sample rate and mono/stereo configuration. Temporary processing objects are removed.

Analysis report: where applicable, the report includes input/output integrated LUFS, LRA, sample peak, estimated true peak, crest factor, drive, gain-reduction statistics, effective release, peak-correction activity, processing time and warning messages.

Requirements

ComponentRequirement
PraatPraat 6.x / 7.x; script header reports testing with 6.4.06, 6.4.63 and 7.0.
InputExactly one selected mono or stereo Sound, at least 10 ms long.
ProcessingOffline only; native Praat, with no Python or external processing dependency.
OutputNew Sound object with optional Praat Info report, Picture visualisation and playback.

Limitations & performance

Musical applications

Transparent acoustic mastering

Start with Transparent on chamber music, solo instruments or quiet orchestral material where natural dynamics and attack shape matter.

General-purpose loudness balancing

Use Balanced with an integrated LUFS target to prepare comparable versions of different pieces or mixes.

Rhythmic impact

Try Punch on drums, pop or transient-rich electroacoustic music. Compare attack quality and average loudness against Balanced at matched playback level.

Continuous electroacoustic textures

Choose Dense for drones, layered synthesis or other sustained material that benefits from slower gain recovery.

Creative dynamics as composition

Use Experimental to treat attenuation and recovery as an audible compositional gesture, rather than a transparent mastering stage.

Compositional idea

Render one sound in Transparent, Dense and Experimental. Loudness-match the three versions for listening, then compare how the attack, sustain and recovery shape the perceived articulation of the same source.