How Ecasound Syncs Paired Stereo LADSPA Plugins

This article explains how the Ecasound multitrack audio processor handles and synchronizes parameter changes across paired or multi-channel LADSPA plugin instances. When mono plugins are applied to stereo or multichannel tracks, Ecasound duplicates the plugin under a single operator abstraction, ensuring that parameter updates—whether triggered interactively, by controllers, or via external protocols—are uniformly applied to every channel before audio processing occurs.

Multi-Instance Replication

Many LADSPA (Linux Audio Developer's Simple Plugin API) plugins are designed strictly for single-channel (mono) operation. When a user applies a mono LADSPA effect to a stereo or multichannel chain, Ecasound automatically detects the channel count mismatch and instantiates an identical, independent plugin instance for each audio channel. Although these instances run separately in the host's memory to process distinct audio buffers, Ecasound manages them as a single logical chain operator.

Unified Control Architecture

Ecasound prevents parameter drift between channels by maintaining a single set of control parameters for the unified operator. In standard LADSPA implementations, parameters are exposed as floating-point control ports. Rather than exposing duplicate controls for the left and right audio channels, Ecasound's internal engine maps user-facing parameter IDs to all underlying plugin instances simultaneously.

Processing Cycle and Update Synchronization

Parameter changes can originate from multiple sources, including the interactive mode (iam), real-time MIDI control, Open Sound Control (OSC), or native dynamic controllers like Low-Frequency Oscillators (LFOs) and envelopes. Synchronization across paired instances occurs within Ecasound's continuous processing loop:

  1. Parameter Interception: When a parameter value changes, the new floating-point value is written to the primary operator controller structure.
  2. Pre-Run Distribution: Prior to calling the LADSPA run() callback for the current audio block, the engine loops through each channel's plugin instance and writes the updated parameter value to the memory address allocated for that specific instance's control port.
  3. Deterministic Execution: The run() functions for both the left and right plugin instances are executed sequentially within the same audio frame iteration using the identical control inputs.

Because parameter distribution happens synchronously in the pre-render phase of the processing block, both audio channels process audio using identical control data, eliminating channel phase discrepancies and stereo-imaging shifts.