Ecasound ALSA MIDI Sequencer Capabilities
This article provides an overview of how Ecasound natively interacts with the Advanced Linux Sound Architecture (ALSA) MIDI sequencer subsystem. Ecasound is a command-line multitrack audio processing tool that includes built-in integration with ALSA MIDI, allowing users to route MIDI streams, synchronize audio transport using standard timing protocols, and control audio processing parameters in real time via external MIDI hardware or software.
ALSA Sequencer Client and Port Integration
Ecasound natively functions as both an ALSA sequencer client and an ALSA MIDI target. When invoked with ALSA sequencer options, Ecasound registers its own input and output ports within the ALSA sequencer framework.
- Port Addressing: Users can specify MIDI inputs and
outputs using the native syntax
alsa,client:portor simplyalsato let Ecasound open dynamic ALSA sequencer subscription ports. - Routing and Patching: Because Ecasound registers
directly with the ALSA sequencer subsystem, its ports appear in standard
ALSA connection utilities, such as
aconnect,jack_midi, and graphical patchbays like QjackCtl. This enables direct, low-latency inter-application MIDI routing without requiring third-party translation bridges.
Real-Time Parameter Control via MIDI CC
One of the primary native ALSA MIDI capabilities in Ecasound is
continuous parameter automation. Using the -km (controller
modulation) and -kmp (parameter controller mapping)
options, incoming ALSA MIDI Control Change (CC) messages can directly
manipulate real-time audio parameters.
- Controller Mapping: ALSA sequencer inputs can be assigned to modulate effect parameters, gain levels, panning positions, and filter cutoff frequencies on active audio chains.
- Range Normalization: Incoming MIDI values (ranging from 0 to 127) are automatically interpolated and scaled to match the defined upper and lower bounds of the target effect parameter.
Transport Synchronization and Clocking
Ecasound supports standard transport synchronization mechanisms routed through the ALSA MIDI sequencer:
- MIDI Machine Control (MMC): Ecasound can listen for MMC commands over ALSA sequencer ports to start, stop, pause, and relocate the audio engine transport, allowing external MIDI hardware or external DAWs to control playback.
- MIDI Beat Clock: The engine can send and receive standard MIDI Clock messages over ALSA sequencer streams, facilitating tempo-locked playback with external hardware drum machines, synthesizers, and external sequencers.
- MIDI Time Code (MTC): Ecasound provides native support for tracking MTC over ALSA MIDI, enabling frame-accurate synchronization with external video and audio playback systems.
MIDI Stream Recording and Playback
While Ecasound is fundamentally an audio processor rather than a full-featured MIDI composition piano-roll environment, its native ALSA sequencer layer handles standard MIDI data streams:
- Recording: Raw MIDI event streams delivered to
Ecasound’s ALSA sequencer input can be written directly to standard
.midfiles in synchronization with multitrack audio capture. - Playback: Standard MIDI files can be assigned to an output chain and transmitted directly to external hardware or software synthesizers via the native ALSA sequencer output port.