Can Ecasound Host Multi-Channel LADSPA Plugins?
Ecasound fully supports hosting LADSPA plugins with multiple audio inputs and outputs, provided the audio chain's channel count matches the plugin's port configuration. This article explains how Ecasound handles multi-channel LADSPA plugins, the requirements for matching channel counts, and how to route audio properly to avoid configuration errors.
The Linux Audio Developer's Simple Plugin API (LADSPA) defines each audio stream as an individual mono port. Multi-channel LADSPA plugins—such as stereo choruses, ambisonic processors, or multichannel equalizers—operate by defining multiple mono input and output ports within a single plugin descriptor.
To run a multi-channel LADSPA plugin in Ecasound, the chain processing the audio must match the exact number of audio ports the plugin expects. Ecasound maps the plugin’s audio input and output ports sequentially to the audio channels in the active processing chain.
For instance, if a LADSPA plugin requires two audio inputs and
produces two audio outputs (a typical stereo effect), the Ecasound chain
hosting the plugin must be set to two channels. You attach the plugin
using the -el (or -eli) operator followed by
the plugin label and any required control parameters:
ecasound -f:16,2,44100 -i stereo_in.wav -el:stereo_reverb,0.5,0.8 -o stereo_out.wavIf there is a mismatch between the number of channels in the chain and the audio ports on the LADSPA plugin, Ecasound will return an error and fail to initialize the chain.
A specific limitation arises with plugins that do not have a
symmetric number of inputs and outputs, such as a mono-to-stereo reverb
(one input, two outputs). Ecasound chains enforce a fixed channel count
from input to output along a single chain. To use an asymmetric
multi-channel plugin, you must route audio through loop devices
(loop,label) or use channel-routing operators like
-erc (copy channel) and -erm (mix channels)
across separate chains to adjust the channel format before and after the
effect is applied.
As long as the processing chain is configured with the correct channel width, Ecasound functions as an effective, low-latency command-line host for complex multi-channel LADSPA plugins.