How to Build an Ecasound Stem Mixing Template
This guide explains how to design a modular stem mixing template using Ecasound chainsetups. By taking advantage of Ecasound’s lightweight routing engine, chain operators, and loop devices, you can group individual audio tracks into dedicated submixes—such as drums, bass, instruments, and vocals—apply bus-level processing, and sum them to a final stereo master without the overhead of a graphical digital audio workstation.
Core Concepts of Ecasound Routing
Ecasound structures audio processing using chains,
inputs, outputs, and
operators. To construct a stem mixing workflow, you
must route multiple chains into intermediate mixing buses using virtual
loop devices (loop,id).
- Chains (
-a:chain_name): Independent signal paths. - Audio Inputs (
-i:source): Audio files, JACK ports, or loop devices feeding into chains. - Audio Outputs (
-o:target): Soundcards, output files, or loop devices receiving audio from chains. - Loop Devices (
loop,N): Internal buffers that allow the output of one or more chains to act as the input for another chain, functioning exactly like a bus or aux track.
Designing the Routing Architecture
A standard stem mixing template routes individual tracks into four primary stems, which then sum to a master output:
- Track Chains: Play individual audio files, apply track-level pan/gain, and output to a stem loop.
- Stem Chains: Receive input from the stem loop, apply group effects (compression, EQ), and output to the master loop.
- Master Chain: Receives audio from the master loop, applies final limiting/metering, and routes to hardware playback or a bounce file.
Constructing the Chainsetup Template
You can define your template in an Ecasound Chainsetup
(.ecs) file or as an executable shell script using standard
Ecasound arguments. Below is a complete, scalable template
structure.
1. Define Track Inputs and Assign to Stems
Group individual audio tracks into specific stems using designated
loop devices (loop,1 for Drums, loop,2 for
Music, loop,3 for Vocals):
# --- DRUM TRACKS -> DRUM STEM (loop,1) ---
-a:kick -i:kick.wav -ea:100 -epp:50 -o:loop,1
-a:snare -i:snare.wav -ea:90 -epp:50 -o:loop,1
-a:hihat -i:hihat.wav -ea:70 -epp:35 -o:loop,1
# --- MUSIC TRACKS -> MUSIC STEM (loop,2) ---
-a:bass -i:bass.wav -ea:95 -epp:50 -o:loop,2
-a:guitar -i:guitar.wav -ea:80 -epp:20 -o:loop,2
-a:keys -i:keys.wav -ea:75 -epp:80 -o:loop,2
# --- VOCAL TRACKS -> VOCAL STEM (loop,3) ---
-a:lead_vox -i:lead.wav -ea:100 -epp:50 -o:loop,3
-a:bg_vox -i:harm.wav -ea:70 -epp:65 -o:loop,3
2. Configure Stem Processing and Sum to Master
Create chains that capture the loop inputs, apply bus processing
(such as LADSPA plugins or internal gain adjustments), and forward the
signals to a master loop (loop,99):
# --- DRUM BUS ---
-a:stem_drums -i:loop,1 -ea:100 -o:loop,99
# --- MUSIC BUS ---
-a:stem_music -i:loop,2 -ea:90 -o:loop,99
# --- VOCAL BUS ---
-a:stem_vox -i:loop,3 -ea:105 -o:loop,99
3. Master Output Configuration
Take the summed signal from loop,99, apply final
limiting or monitoring levels, and direct it to your audio interface or
a stereo bounce file:
# --- MASTER STEREO BUS ---
-a:master -i:loop,99 -ea:100 -o:alsa
# Alternatively, bounce to disk:
# -a:master -i:loop,99 -ea:100 -o:final_mix.wav
Executing and Interacting with the Template
Save your configuration in a text file named
mix_template.ecp (or as a shell script). Run Ecasound in
interactive mode (-c) to control the mix in real time:
ecasound -c -f:s16_le,2,44100 \
-a:kick -i:kick.wav -o:loop,1 \
-a:snare -i:snare.wav -o:loop,1 \
-a:stem_drums -i:loop,1 -ea:100 -o:loop,99 \
-a:master -i:loop,99 -o:alsaWhile running in interactive mode, you can dynamically modify levels, mute stems, or adjust stereo panning using standard Ecasound commands:
c-select stem_drumsfollowed byc-set-parameter 1 80to adjust stem volume.c-mute stem_voxto check the instrumental balance.startandstopto control playback across all synchronized chains.