Ecasound MIDI Disconnection in Live Performance

When a MIDI controller is physically disconnected during a live performance, Ecasound’s response is dictated by its chosen audio/MIDI subsystem interface—specifically RawMIDI, the ALSA Sequencer, or JACK MIDI. While Ecasound excels at lightweight, low-latency signal routing, it does not natively feature dynamic plug-and-play recovery. Depending on the configuration, an unplugged device will either trigger an unrecoverable input/output error that halts the entire engine, or result in silent failure where processing continues uninterrupted while waiting for the missing stream.

RawMIDI Interface Failures

If Ecasound is configured to read directly from a device node using the raw MIDI input module (e.g., -i:rawmidi,/dev/snd/midiC1D0), a hardware disconnection causes an immediate critical failure. The Linux kernel closes or invalidates the underlying character device node, triggering an ENODEV (No such device) or EIO (Input/output error) system error on the next read operation. Ecasound's processing loop treats this as a fatal streaming fault, stopping the engine and exiting the live session to prevent infinite error cycling.

ALSA Sequencer Behavior

Using the ALSA sequencer subsystem (-i:alsaseq,port-id) provides a layer of isolation between the physical port and Ecasound. When a controller is disconnected:

JACK MIDI Abstraction

Running Ecasound inside a JACK Audio Connection Kit environment provides the highest resilience for live performances. JACK decouples physical hardware from client ports by routing MIDI signals through virtual software endpoints:

To avoid total session failure from loose cables or USB dropouts:

  1. Never use RawMIDI in live environments: Direct hardware access lacks fault isolation.
  2. Utilize JACK MIDI or a2jmidid: Decoupling ensures that sudden hardware changes do not terminate the underlying Ecasound process.
  3. Automate Reconnection: Employ background utilities such as udev rules paired with connection scripts to re-bind the device to Ecasound's sequencer ports automatically upon reconnection.