Running Independent Chains in Ecasound Chainsetups
Ecasound fully supports chainsetups containing disconnected chains that process audio completely independently of one another. This article explores how Ecasound handles parallel, isolated signal paths within a single chainsetup, demonstrates the basic syntax required to configure them, and explains how global engine parameters such as buffer sizes and transport controls affect concurrent, independent processing pipelines.
Independent Chains in a Single Chainsetup
In Ecasound, a chain is an audio processing path that connects audio inputs, operators (such as effects, filters, and envelope controllers), and outputs. A chainsetup acts as the master container for all active chains.
A chainsetup does not require chains to be interconnected. If chains do not share inputs, outputs, or inter-chain routing elements (like loop devices), they exist as topologically disconnected graphs. Ecasound processes each of these disconnected chains in parallel without routing audio between them.
Syntax and Configuration
To run disconnected chains, define separate chain names using the
-a option and assign distinct inputs (-i) and
outputs (-o) to each:
ecasound \
-a:chain1 -i:input1.wav -ea:150 -o:output1.wav \
-a:chain2 -i:input2.wav -efl:800 -o:output2.wavIn this configuration:
chain1reads frominput1.wav, applies audio amplification (-ea), and writes tooutput1.wav.chain2simultaneously reads frominput2.wav, applies a low-pass filter (-efl), and writes tooutput2.wav.
Neither chain passes data to the other, making them functionally independent audio pipelines operating within the same process.
Shared Engine Dynamics
Although disconnected chains are functionally isolated in terms of audio routing, they remain governed by the same underlying Ecasound engine instance. This introduces several shared factors:
- Transport Controls: Commands to start, stop, pause, or seek apply globally to the entire chainsetup.
- Buffer Parameters: The processing buffer size
(
-b) and sample rate are determined at the chainsetup level and shared across all active chains. - Termination Conditions: By default, if one independent chain finishes reading its input before another, the behavior of the overall engine depends on the global exit and EOF settings configured for the session.
Typical Use Cases
Running disconnected chains in one chainsetup is useful when:
- Simultaneously recording from different hardware inputs to separate output destinations with different real-time effect chains applied.
- Processing multiple distinct files concurrently within a single command-line execution without managing multiple operating system processes.
- Generating multiple independent test signals or synthesized sources side-by-side for external routing.