Automating Ecasound LADSPA Parameters with Envelopes
Ecasound supports dynamic automation of LADSPA plugin parameters using internal envelope controllers, external automation scripts, and parsed data files. This article explains how Ecasound addresses LADSPA parameters, how to attach envelope controllers to them, and the methods used to drive these parameters using external envelope data files.
How Ecasound Targets LADSPA Parameters
In Ecasound, audio effects and LADSPA plugins are treated as chain
operators. A LADSPA plugin is inserted into a chain using the
-el syntax:
-el:plugin_label,param1,param2,...Every parameter in a chain operator has an index starting at 1. When applying modulation, Ecasound attaches controllers directly to these parameter indices on a specified chain.
Native Envelope
Control: The -kl Controller
Ecasound includes a built-in linear envelope controller,
-kl, which interpolates parameter values over time. Its
syntax is structured as follows:
-kl:fx_param,initial_val,time1,val1,time2,val2,...fx_param: The parameter index of the LADSPA plugin you wish to automate.initial_val: The starting value at time 0.timeN,valN: Pairs of timestamps (in seconds) and target values.
This controller smoothly transitions between points across the duration of the audio stream.
Automating Parameters with External Envelope Files
Ecasound does not directly accept a raw external text file path
inside the -el operator itself, but you can automate
parameters using external envelope files through two reliable methods:
command-line expansion and the Ecasound Control Interface (ECI).
Method 1: Injecting Envelope Files via Shell Expansion
If you have an external plain text file containing time-value pairs
formatted for -kl (e.g., 1,0.5,2,0.8,4,0.1),
you can dynamically inject it directly into your Ecasound command using
standard shell substitution:
ecasound -i:input.wav -o:output.wav \
-el:caps_crossover,1000 \
-kl:1,500,$(cat envelope.txt)In this setup:
-el:caps_crossover,1000loads the plugin with an initial cutoff of 1000 Hz.-kl:1,500,...attaches a linear envelope to parameter 1, setting the initial value to 500 Hz and reading the remaining time-value nodes fromenvelope.txt.
Method 2: Dynamic Streaming via Ecasound Control Interface (ECI)
For complex, continuous, or generated envelope data, Ecasound can be controlled dynamically via its interactive mode or Python/C API (ECI).
Using a named pipe (FIFO) or standard input in interactive mode
(-c), external programs can read an arbitrary envelope file
and write real-time parameter update commands:
cop-set [chain_operator_index] [parameter_index] [new_value]This method is ideal when envelopes are generated on the fly, streamed from external mathematical models, or exported from digital audio workstations as high-density automation tracks.