Ecasound Loop Devices as Intermediate Routing Buses

In Ecasound, loop devices serve as powerful internal signal conduits that route audio dynamically between processing chains within a single session. By acting as virtual intermediate routing buses, loop devices enable complex audio workflows—such as submixing, parallel signal processing, and auxiliary effect sends—without writing temporary files to disk or requiring an external routing daemon like JACK. This guide explains the mechanics of Ecasound loop devices, their syntax, and how to deploy them effectively as intermediate routing buses.

The Mechanics of Ecasound Loop Devices

Ecasound structures audio processing using chains. A chain typically consists of one or more inputs, a series of audio operators (effects, filters, volume adjustments), and one or more outputs.

A loop device is an abstract audio object designated by the syntax loop,label, where label is a user-defined string identifier. Unlike file or hardware inputs/outputs, a loop device exists entirely within Ecasound’s memory buffer. It operates bidirectionally:

Because read and write operations happen synchronously within Ecasound's processing cycle, loop devices maintain sample accuracy without introducing hardware-related buffer underruns or latency overhead.

Using Loop Devices as Summing and Submix Buses

One primary application of loop devices is summing multiple independent audio sources into a single submix bus. When multiple chains assign their output to the same loop label, Ecasound automatically mixes their signals together.

For example, to group drum tracks onto a single intermediate bus before applying global compression:

ecasound \
  -a:kick   -i:kick.wav   -ea:120 -o:loop,drums \
  -a:snare  -i:snare.wav  -ea:100 -o:loop,drums \
  -a:hihat  -i:hihat.wav  -ea:80  -o:loop,drums \
  -a:drumbus -i:loop,drums -epp:50 -o:alsa

In this setup:

  1. Chains kick, snare, and hihat run independently with their own volume adjustments (-ea).
  2. All three outputs feed directly into the loop,drums bus, where they are summed.
  3. The drumbus chain takes the combined output from loop,drums, applies stereo panning or compression, and directs the final sound to the hardware soundcard (alsa).

Parallel Processing and Aux Sends

Loop devices can also replicate the function of an auxiliary send or split a signal for parallel processing (such as parallel compression or wet/dry effect blends).

To split an audio signal:

  1. Direct the dry input source into an intermediate loop bus.
  2. Create two separate downstream chains that both use the loop device as their input.
  3. Keep one chain unprocessed (dry) and apply intense processing to the other (wet).
  4. Combine both chains into a final master output.
ecasound \
  -a:source   -i:vocal.wav -o:loop,vocal_bus \
  -a:dry      -i:loop,vocal_bus -ea:100 -o:alsa \
  -a:reverb   -i:loop,vocal_bus -ete:40,20,2 -ea:70 -o:alsa

Here, vocal.wav is sent into the vocal_bus intermediate loop. The dry chain and reverb chain read simultaneously from the loop, allowing non-destructive parallel effect routing before sending the mixed result to the speakers.

Best Practices for Intermediate Bus Routing