Building a GUI Using Ecasound Net-ECI
A graphical user interface (GUI) can be constructed entirely on top of the Ecasound Network Control Interface (Net-ECI) protocol. Net-ECI exposes the complete control functionality of the Ecasound multitrack audio processing engine over a standard TCP/IP or Unix domain socket using a plain-text, request-and-reply architecture. By utilizing Net-ECI, developers can build fully functional audio workstations, control panels, or remote processing interfaces without directly linking to the underlying C++ libraries.
Net-ECI operates by accepting standard ASCII commands identical to
those used in the interactive Ecasound Control Interface (ECI). When a
GUI application connects to Ecasound running in server mode
(ecasound --daemon), it establishes a two-way socket
stream. The GUI sends text commands to configure signal routing, load
inputs and outputs, instantiate real-time effects, and control the
global audio transport. The engine processes these commands and returns
structured string responses indicating success, failure, or requested
state values.
To manage audio session setups, the GUI can generate and modify
complete chainsetups over the socket. Commands such as
cs-add, c-add, ai-add, and
ao-add permit the dynamic creation of tracks, insertion of
audio files or hardware devices (via ALSA, JACK, or OSS), and routing
between channels. Real-time signal processing parameters—such as LADSPA
plugins, equalizers, amplifiers, and compressors—are fully adjustable
while the audio engine is running through commands like
cop-add and copp-set.
Transport control and monitoring are similarly achieved through
Net-ECI primitives. Commands like start, stop,
and cs-set-position handle playback and recording states.
For visual feedback, such as timecode displays and transport status, the
GUI queries the engine with commands like cs-get-position
or engine-status. Audio level metering can be implemented
by querying controller outputs or peak levels where supported by the
specific chain configuration.
Because Net-ECI is synchronous and follows a request-reply model rather than an event-driven publish-subscribe model, the primary architectural challenge in a pure Net-ECI GUI is state synchronization. Continuous UI elements, such as moving playheads and peak meters, require periodic polling of the engine. Developers must implement an efficient polling loop on a dedicated thread or asynchronous event loop to avoid freezing the graphical user interface while waiting for socket responses.
Despite the polling requirement, the decoupled nature of Net-ECI provides significant benefits. The GUI can be written in any programming language capable of opening a network socket—such as Python, JavaScript/Node.js, Rust, Go, or C#—freeing developers from the specific build environments of the Ecasound C++ codebase. Furthermore, this architecture natively supports remote control, allowing a lightweight interface on a desktop, tablet, or web browser to operate an Ecasound backend running on a dedicated headless server or embedded hardware.