Record Multitrack Audio with Ecasound

This guide provides a direct walkthrough for configuring Ecasound to record simultaneous, discrete tracks from a multichannel audio interface on Linux. By mapping hardware inputs to independent chains and routing specific channels to individual destination files, you can capture isolated multi-track sessions from the command line without the overhead of a graphical digital audio workstation (DAW).

1. Identify Your Multi-Channel Audio Device

Before building the Ecasound command, identify the ALSA card and subdevice index of your audio interface. Run the following command in your terminal:

arecord -l

Locate your interface in the output list. Note the card number and device number. For example, if your multi-input interface is listed as card 1: USB [Audio Interface], device 0: USB Audio, your ALSA device string will be hw:1,0.

2. Ecasound Multi-Track Architecture

Ecasound uses chains to process audio. To record multiple inputs to separate files:

  1. Define a set of active chains (one for each track).
  2. Assign the multi-channel ALSA hardware source to all chains simultaneously.
  3. Configure each chain to isolate its assigned channel.
  4. Output each chain to a distinct audio file.

3. The Multitrack Recording Command

Assume you are recording 4 simultaneous mono tracks from a 4-channel interface (hw:1,0) at 24-bit depth and a 48 kHz sampling rate. Use the following command:

ecasound \
  -f:s24_le,4,48000 -a:1,2,3,4 -i:alsa,hw:1,0 \
  -a:1 -f:s24_le,1,48000 -chorder:1 -o:track_01.wav \
  -a:2 -f:s24_le,1,48000 -chorder:2 -o:track_02.wav \
  -a:3 -f:s24_le,1,48000 -chorder:3 -o:track_03.wav \
  -a:4 -f:s24_le,1,48000 -chorder:4 -o:track_04.wav

Parameter Breakdown:

4. Running and Stopping the Session

Once executed, Ecasound will initialize the ALSA interface, report buffer configurations, and begin recording immediately.