How to Bind MIDI Controllers in Ecasound

Ecasound enables real-time parameter manipulation using external hardware via MIDI continuous controller (CC) messages. This guide covers the exact command-line syntax used to connect an external MIDI input device and bind specific MIDI CC knobs, sliders, or pedals to chain operator parameters within an Ecasound processing session.

The MIDI Binding Syntax: -km

In Ecasound, continuous parameter controllers are attached to the preceding chain operator using the -km option. The basic syntax is:

-km:param_id,midi-channel,controller-id,lower-bound,upper-bound

The parameters are defined as follows:

Defining the MIDI Input Device: -Md

Before Ecasound can read continuous controller messages, you must register your hardware device using the global MIDI device flag -Md.

For ALSA sequencer connections:

-Md:alsaseq,default

For raw MIDI devices:

-Md:rawmidi,/dev/midi00

Complete Command-Line Example

The following command routes audio from an ALSA input to an ALSA output across a chain named main, adds an amplification operator (-ea), and maps MIDI CC 7 on channel 1 to control the volume level between 0% and 200%:

ecasound -Md:alsaseq,default -a:main -i:alsa,default -o:alsa,default -ea:100 -km:1,1,7,0,200

In this command:

After launching, you can use ALSA utilities like aconnect to connect your physical MIDI controller port to Ecasound's sequencer port if it is not routed automatically.