Overdubbing and Monitoring Tracks in Ecasound

This article outlines the optimal command-line workflow for overdubbing new audio tracks while monitoring existing takes in Ecasound. By configuring separate processing chains for playback and recording, managing buffer sizes for low latency, and leveraging interactive mode, you can record new layers in perfect synchronization with your backing tracks.

Understanding the Chain Architecture

Ecasound processes audio using chains. To overdub, you must assign playback files and recording inputs to different chains running within the same chainsetup. This ensures that the recording starts at the exact sample the playback begins, maintaining phase accuracy and synchronization.

The Basic Overdub Command

To play an existing take (take1.wav) while recording a new take (take2.wav), open your terminal and run:

ecasound -B:rt -r -a:play -i:take1.wav -o:alsa -a:rec -i:alsa -o:take2.wav

Key options used in this command include:

Configuring Live Monitoring

There are two primary ways to monitor your performance while overdubbing:

The most reliable method to eliminate latency entirely is to monitor your input signal via your audio interface's direct monitoring switch or internal mixer. In this scenario, the command above is all you need, as only the backing track (take1.wav) passes through the software to your headphones.

2. Software Monitoring

If you must monitor through Ecasound (for instance, to hear real-time software effects or if your hardware lacks direct monitoring), route the live input to both the disk and the output simultaneously:

ecasound -B:rt -b:128 -r \
  -a:play,mon -o:alsa \
  -a:play -i:take1.wav \
  -a:rec,mon -i:alsa \
  -a:rec -o:take2.wav

In this setup, the -b:128 parameter sets a low buffer size (128 sample frames) to minimize audible delay. The mon chain takes the incoming audio and routes it directly to the ALSA output alongside the playback track.

Streamlining the Workflow with Interactive Mode

Invoking a new command for every take is inefficient. Use Ecasound’s interactive mode by adding the -c flag:

ecasound -c -B:rt -r -a:play -i:take1.wav -o:alsa -a:rec -i:alsa -o:take2.wav

Once inside the interactive prompt, manage your takes using standard control commands:

To record another take without exiting, adjust the output file with:

-a:rec
-o:take3.wav
setpos 0
start

Low-Latency Optimization with JACK

For complex sessions involving multiple tracks, replacing the native ALSA engine with JACK (-i:jack, -o:jack) provides lower round-trip latency and allows dynamic routing to other digital audio software. Set the JACK server to a low frame size (such as 64 or 128 frames) prior to launching Ecasound to achieve seamless, zero-distraction overdubbing.