Ecasound Command-Line Syntax Structure Explained
This article provides an overview of the core syntax architecture required to build commands in Ecasound, a multitrack audio processing tool for Unix-like systems. Readers will learn how Ecasound organizes audio routing through the interaction of global engine options, chains, audio inputs, audio outputs, and chain operators (effects and filters).
The Core Invocation Template
At its most fundamental level, an Ecasound command follows this sequential structure:
ecasound [global_options] [chain_definition] [chain_operators] [inputs_and_outputs]Ecasound operates on the concept of chains. A chain is an independent audio signal path. Inputs feed audio into a chain, operators modify the audio within the chain, and outputs collect the processed stream.
Key Syntax Components
Global Options Global options affect the behavior of the entire engine rather than individual audio streams. Common global options include:
-c: Starts Ecasound in interactive mode.-B:mode: Sets the buffering mode (e.g.,auto,nonrt,rt,rtlowlatency).-r:rate: Sets the global sampling rate in Hz (e.g.,-r:44100).-b:size: Sets the buffer size in sample frames.
Chain Selection (
-a) The-aswitch assigns subsequent inputs, outputs, and operators to a specific chain or comma-separated list of chains.- Example:
-a:1assigns following parameters to Chain 1. - Example:
-a:1,2applies the following parameters simultaneously to both Chain 1 and Chain 2. - Example:
-a:alltargets all existing chains.
- Example:
Audio Inputs (
-i) and Outputs (-o) Inputs and outputs are attached to the currently selected chain(s). Ecasound supports standard audio files, ALSA/JACK devices, and null sources:- Input syntax:
-i:source_type,parameter(e.g.,-i:track1.wav,-i:alsa,default,-i:null). - Output syntax:
-o:target_type,parameter(e.g.,-o:master.wav,-o:alsa,hw:0).
- Input syntax:
Chain Operators (
-e*,-f*,-c*) Chain operators perform digital signal processing (DSP) sequentially on the audio traveling through the selected chain:- Volume/Amp:
-ea:gain_%(e.g.,-ea:200for a 200% volume boost). - Filters:
-efl:frequency(low-pass filter) or-efh:frequency(high-pass filter). - Routing:
-erc:from_channel,to_channelor-chcopy:from,toto control channel mapping.
- Volume/Amp:
Complete Syntactical Example
A complete multi-track invocation combines these elements into a single execution:
ecasound -B:rt -a:1 -i:vocals.wav -ea:120 -efh:150 -a:2 -i:beat.wav -ea:90 -a:1,2 -o:alsa,defaultIn this structure:
-B:rtglobally configures real-time buffering.-a:1creates Chain 1, attachingvocals.wav(-i), boosting its amplitude to 120% (-ea:120), and applying a 150 Hz high-pass filter (-efh:150).-a:2creates Chain 2, attachingbeat.wav(-i) and reducing its amplitude to 90% (-ea:90).-a:1,2targets both chains simultaneously and routes their combined mix to the system soundcard (-o:alsa,default).