How to Use Loop Audio Objects in Ecasound

This article explains the command-line syntax used to create and route loop audio objects in the Ecasound multitrack audio processor. Loop objects act as virtual patch cables, allowing audio to be routed internally between different chains in real time. Readers will learn the exact parameter format, how loop endpoints correspond to each other, and how to implement them in a functional Ecasound command.

Loop Audio Object Syntax

In Ecasound, a loop device is defined using the loop keyword followed by a comma and a unique identifier tag:

-i loop,tag
-o loop,tag

How It Works

Loop audio objects function as inter-chain connections within the same Ecasound engine process. When audio is written to -o loop,1, it becomes available as an input stream to any chain configured with -i loop,1. Unlike standard audio files or hardware devices, loop objects do not write data to disk or require an external sound server like JACK.

Command-Line Example

The following example demonstrates routing an audio file through a loop to apply an effect on a secondary processing chain:

ecasound -a:1 -i input.wav -o loop,1 -a:2 -i loop,1 -efl:1000 -o alsa

Breakdown of the chain setup:

  1. -a:1: Selects chain 1.
  2. -i input.wav -o loop,1: Chain 1 reads from input.wav and sends its output into the loop object tagged 1.
  3. -a:2: Selects chain 2.
  4. -i loop,1 -efl:1000 -o alsa: Chain 2 receives the signal from the loop tagged 1, applies a low-pass filter (-efl:1000), and sends the processed audio to the ALSA sound output.