Real-Time LADSPA Modulation in Ecasound
Ecasound fully supports real-time modulation of LADSPA plugin control parameters. Users can dynamically alter audio effects during playback or processing using internal automation operators, external MIDI continuous controllers, or live commands sent through Ecasound’s interactive mode (ECI). This guide explains how Ecasound interacts with LADSPA controls and outlines the primary methods available for real-time parameter modulation.
How Ecasound Integrates LADSPA Plugins
LADSPA plugins are attached to an Ecasound chain using the
-el (or -eli) chain operator, followed by the
plugin name and its static default parameters:
ecasound -i input.wav -o alsa -el:ladspa_plugin_name,param1,param2In LADSPA architecture, parameters designated as "control inputs" can be adjusted on the fly without interrupting the audio stream. Ecasound numbers these control ports sequentially, allowing you to attach control sources directly to them.
Method 1: Internal Control Oscillators (LFOs and Envelopes)
Ecasound includes built-in controller operators that can modulate any chain operator parameter automatically at runtime. These controllers attach to the target parameter by specifying its index number.
- Sine LFO (
-kos): Modulates a parameter using a low-frequency sine wave.-kos:fx_param,min_val,max_val,frequency,initial_phase - Linear Ramp / Envelope (
-kog): Generates a time-based linear envelope or ramp to transition parameter values gradually.
For example, to attach a low-pass filter and oscillate its cutoff frequency between 500 Hz and 3000 Hz at a rate of 0.5 Hz:
ecasound -i input.wav -o alsa \
-el:lowpass_iir,1000,2 \
-kos:1,500,3000,0.5,0In this command, -kos:1,... targets parameter
1 (the cutoff frequency of the filter) in real-time.
Method 2: MIDI Hardware Controllers
You can map physical MIDI continuous controllers (knobs, sliders, or
pedals) directly to LADSPA plugin parameters using the -km
operator.
The syntax for MIDI continuous controller mapping is:
-km:fx_param,min_val,max_val,midi_controller_number,midi_channelExample: To modulate the resonance or cutoff of a filter using MIDI controller #74 on channel 1:
ecasound -i input.wav -o alsa \
-el:lowpass_iir,1000,2 \
-km:1,200,8000,74,1Ecasound translates the 0–127 MIDI control values smoothly into the target range (200 Hz to 8000 Hz) while audio continues running.
Method 3: Interactive Mode (ECI)
Ecasound includes the Ecasound Control Interface (ECI), which enables direct command-line or programmatic manipulation while the audio engine runs.
- Launch Ecasound in interactive mode:
ecasound -c -i input.wav -o alsa -el:lowpass_iir,1000,2 - Start playback with the
startcommand. - Use operator control commands to inspect and update parameters in
real-time:
cop-select 1(select the LADSPA plugin operator)cop-set 1,2500(instantly update parameter 1 to 2500)
Because ECI commands can be issued over standard input, Python
bindings, or via a TCP/IP network socket (--server), you
can build external GUIs or automated scripts to modulate LADSPA
parameters dynamically.
Control Rate vs. Audio Rate
LADSPA control parameters are updated at the block control rate
rather than the sample rate. While this allows for extremely low CPU
overhead when automating complex filters, delays, and reverbs, very
rapid modulation may cause audible stepping if the buffer size
(-b) is set too high. Reducing the buffer size improves
modulation responsiveness and resolution.