Ecasound Mono to Stereo Channel Multiplication
Ecasound manages multitrack audio processing through a deterministic chain-and-channel architecture where channel multiplication from mono to stereo does not happen implicitly. When a single-channel mono stream feeds a chain configured for stereo output, Ecasound applies strict one-to-one channel mapping by default, assigning the mono source exclusively to the first channel and leaving subsequent channels silent. To achieve true channel multiplication—duplicating a mono signal across both channels of a stereo field—Ecasound requires explicit format definitions and dedicated channel-routing operators.
The Channel Assignment Architecture
Every processing path in Ecasound is governed by chains. A chain
operates with a specific channel count, typically defined by the global
or chain-specific audio format flag
(-f:format,channels,sample_rate) or inherited from the
connected audio inputs and outputs.
When an input with one channel (mono) is routed into a stereo output without explicit routing commands, Ecasound maintains track separation:
- Input Channel 1 maps directly to Chain/Output Channel 1 (Left).
- Channel 2 (Right) receives no audio data and remains completely unpopulated.
If chain formats are strictly enforced and channel counts between inputs, intermediate chains, and outputs mismatch without proper configuration, Ecasound will halt execution and raise a channel count mismatch error.
Explicit
Channel Multiplication Using -chcopy and
-erc
To duplicate a mono stream across multiple channels within the same chain, Ecasound provides built-in channel manipulation operators:
-chcopy:from_channel,to_channel: This operator clones the audio buffer from one channel index to another. When working with a stereo chain fed by a mono input, applying-chcopy:1,2duplicates Channel 1 into Channel 2, resulting in a dual-mono stereo output.-erc:from_channel,to_channel: The route/copy channels operator serves a similar functional purpose in older or specialized presets, routing the audio data stream from the primary channel into the secondary channel position.
An example of proper in-chain multiplication:
ecasound -f:s16_le,2,44100 -i:mono_input.wav -chcopy:1,2 -o:stereo_output.wavIn this command, the engine initializes a two-channel pipeline, reads the single mono channel into channel slot 1, copies slot 1 into slot 2, and renders a fully balanced stereo file.
Multi-Chain Routing and Channel Splitting
Channel multiplication can also be handled at the routing stage rather than within a single chain. Ecasound allows a single input file or audio device to be attached to multiple chains simultaneously:
ecasound -i:mono_input.wav -a:1,2 -a:1 -chcopy:1,1 -a:2 -chcopy:1,2 -a:1,2 -o:stereo_output.wavBy assigning the input stream across multiple distinct chains
(-a:1,2 -i:mono_input.wav), the mono stream is cloned at
the input level. Users can apply independent filters, equalization, or
delay effects to each chain before routing them into the final stereo
output stage, facilitating stereo widening and pseudo-stereo processing
from a single mono capture.