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
-o loop,tag: Designates the loop as an audio output destination for a chain.-i loop,tag: Designates the loop as an audio input source for another chain.tag: A numerical value or text string identifying the virtual bus. Both the sending and receiving endpoints must share the exact same tag name to connect.
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 alsaBreakdown of the chain setup:
-a:1: Selects chain 1.-i input.wav -o loop,1: Chain 1 reads frominput.wavand sends its output into the loop object tagged1.-a:2: Selects chain 2.-i loop,1 -efl:1000 -o alsa: Chain 2 receives the signal from the loop tagged1, applies a low-pass filter (-efl:1000), and sends the processed audio to the ALSA sound output.