Ecasound Mastering: Stereo Width and Brickwall Limiter

This guide explains how to build a clean, terminal-based audio mastering chain using Ecasound, focused on stereo field expansion and transparent brickwall limiting. By leveraging LADSPA plugins within Ecasound's command-line interface, you will learn how to route an audio signal, adjust stereo spread without introducing phase issues, and catch digital inter-sample peaks using a fast-lookahead brickwall limiter.

1. Prerequisites and Required LADSPA Plugins

Ecasound relies on LADSPA plugins for complex signal processing. To configure stereo expansion and brickwall limiting, install the Steve Harris (swh-plugins) and TAP (tap-plugins) packages on your system:

  • Debian/Ubuntu: sudo apt-get install ecasound swh-plugins tap-plugins
  • Arch Linux: sudo pacman -S ecasound swh-plugins tap-plugins

This configuration uses two specific plugins:

  • Matrix Spatialiser (LADSPA label: matrixSpatialiser, ID: 1422): Expands the stereo field using mid/side manipulation.
  • Fast Lookahead Limiter (LADSPA label: fastLookaheadLimiter, ID: 1913): Acts as a true brickwall peak limiter to prevent digital clipping.

2. The Mastering Chain Command

Run the complete mastering process directly from the command line using the following syntax:

ecasound -i:mix_premaster.wav \
  -o:master_final.wav \
  -ea:100 \
  -el:matrixSpatialiser,40 \
  -el:fastLookaheadLimiter,-0.3,20,0.1

3. Understanding the Chain Parameters

The signal flow moves linearly through the defined options:

  • -i:mix_premaster.wav: The raw, unmastered input file (ideally 24-bit or 32-bit float with at least 3 dB to 6 dB of headroom).
  • -o:master_final.wav: The rendered output master file.
  • -ea:100: Gain adjustment set to 100% (unity gain). You can adjust this to feed more or less level into the chain (e.g., -ea:110 adds 10% gain).
  • -el:matrixSpatialiser,40: Controls the stereo width expansion.
    • Parameter 1 (Width): Set in percentage (0% to 100%). A value of 0 collapses the audio to mono, 25 represents standard stereo, and values between 30 and 45 provide controlled stereo expansion without thinning out center content (like kick drums or vocals).
  • -el:fastLookaheadLimiter,-0.3,20,0.1: Controls brickwall peak limiting.
    • Input gain (dB): Set here to 20 (maximum gain to add; set lower if your mix is already loud).
    • Limit (dB): Set to -0.3 dBFS. Leaving -0.3 to -1.0 dB of headroom avoids inter-sample clipping during lossy MP3/AAC encoding.
    • Release time (s): Set to 0.1 (100 milliseconds) for smooth, transparent release behavior without low-frequency distortion.

4. Interactive Real-Time Monitoring

To audition changes before rendering to disk, replace the output file flag with your sound card's ALSA driver to monitor in real time:

ecasound -i:mix_premaster.wav -o:alsa -el:matrixSpatialiser,35 -el:fastLookaheadLimiter,-0.5,10,0.08

You can interactively tweak plugin parameters while audio plays by entering interactive mode:

ecasound -c -i:mix_premaster.wav -o:alsa -el:matrixSpatialiser,35 -el:fastLookaheadLimiter,-0.5,10,0.08

Inside the interactive console:

  • Type start to begin playback.
  • Type cop-set 1,1,40 to change the stereo width to 40% in real time.
  • Type stop to end the session.