Ecasound -i Option: Defining Inputs Across Chains

In Ecasound, the -i option specifies an audio input, but its routing behavior across different processing chains depends entirely on the active chain selection defined by the -a option. This guide explains how Ecasound pairs inputs to individual or multiple chains, enabling multi-track routing, signal splitting, and parallel processing directly from the command line.

Chain Selection and Input Association

Ecasound processes audio using "chains." A chain is a single audio path through which sound travels from an input, passes through zero or more operators (effects, level adjustments), and routes to an output.

The -i option attaches an audio source (such as a .wav file, an ALSA/JACK device, or a test generator) to whichever chains are currently active. You select active chains using the -a (chain select) option. Any -i flag placed after a -a command applies to all chains listed in that specific -a declaration.

Assigning Separate Inputs to Distinct Chains

To route different audio sources into separate processing chains, declare the chain first with -a, followed immediately by its corresponding input -i.

ecasound -a:1 -i:track1.wav -a:2 -i:track2.wav -a:all -o:alsa

In this setup:

Each chain runs independently, allowing you to apply distinct effects or volumes to track1.wav and track2.wav before they reach the output stage.

Sharing One Input Across Multiple Chains

You can also split a single input across multiple chains by grouping chain names together in a comma-separated list after -a.

ecasound -a:1,2 -i:stereo_mix.wav -a:1 -ea:200 -a:2 -efl:1000 -a:1,2 -o:alsa

In this command:

Rules for the -i Option Across Chains