Creating Sub-Mix Chains in Ecasound
This article explains how to construct sub-mix chains inside an Ecasound configuration by routing multiple audio streams into intermediary buses. In Ecasound, sub-mixing is achieved using virtual loop devices, which collect audio outputs from multiple individual chains and redirect them as a combined input into a secondary processing chain before reaching the final master output.
The Loop Device Mechanism
Ecasound uses the loop object syntax (loop,id) to pass
audio internally between chains without writing to physical disk storage
or external sound cards. To create a sub-mix:
- Route the outputs of source chains to a designated loop device:
-o:loop,name - Assign that same loop device as the input for a processing or bus
chain:
-i:loop,name
Any chains that output to the same loop identifier are automatically summed together, effectively functioning as a sub-mix bus.
Core Syntax Structure
When executing via the command line or within an .ecs
preset file, define the individual inputs, direct them to a shared loop,
and attach the loop to a final target chain:
ecasound \
-a:track1 -i:kick.wav -ea:100 -o:loop,drums \
-a:track2 -i:snare.wav -ea:90 -o:loop,drums \
-a:drum_bus -i:loop,drums -efl:800 -o:alsaBreakdown of the Configuration Parameters
-a:chain_name: Declares or selects an active chain. You can select multiple chains simultaneously using comma separation (e.g.,-a:track1,track2).-i:source: Defines the input for the currently active chain. In sub-mixes, the receiver chain sets its input to-i:loop,<id>.-o:target: Directs the processed signal. Feeding source chains into-o:loop,<id>mixes them into the internal bus.-ea:value/-efl:value: Represents chain-specific effects and gain stages. Processing placed on the source chains affects individual tracks, while processing placed on the receiving bus chain applies across the entire sub-mix.
Multi-Bus Sub-Mixing Example
To route multiple sub-mixes (for example, drums and synths) into a final master output bus:
ecasound \
-a:drum1 -i:drum1.wav -o:loop,drums \
-a:drum2 -i:drum2.wav -o:loop,drums \
-a:synth1 -i:lead.wav -o:loop,synths \
-a:synth2 -i:pad.wav -o:loop,synths \
-a:drum_bus -i:loop,drums -ea:110 -o:loop,master \
-a:synth_bus -i:loop,synths -ea:95 -o:loop,master \
-a:master -i:loop,master -epp:50 -o:final_output.wavIn this setup, drum1 and drum2 sum into
loop,drums, which is managed by the drum_bus
chain. Similarly, the synths sum into loop,synths. Both
buses are then processed and routed to loop,master, which
handles global gain and stereo panning before exporting to a physical
output file.