Ecasound MIDI Device Input Syntax Guide

This article explains how to configure a MIDI device as an input source in Ecasound using the command-line interface. It covers the specific option flags, supported MIDI subsystem drivers—primarily the ALSA Sequencer and RawMIDI interfaces—and practical command-line examples for routing MIDI data in real time.

In Ecasound, inputs are defined using the -i option, followed by a driver type and device-specific parameters separated by colons and commas:

-i:type,parameters

Depending on your Linux audio architecture, there are two primary methods to define a MIDI device as an input:

1. ALSA Sequencer (alsaseq)

The ALSA sequencer is the standard and most flexible way to manage MIDI connections in modern Linux environments.

Syntax:

-i:alsaseq,client:port

or

-i alsaseq,client:port

If you do not specify a port (e.g., -i:alsaseq), Ecasound creates an open ALSA sequencer input port that can be subscribed to other devices using tools like aconnect or patchage.

Example:

ecasound -i:alsaseq,20:0 -o:alsaseq,28:0

2. Raw MIDI (rawmidi)

If you are accessing hardware ports directly without the ALSA sequencer layer, Ecasound provides the rawmidi driver.

Syntax:

-i:rawmidi,device_node

Example:

ecasound -i:rawmidi,/dev/snd/midiC1D0 -o:rawmidi,/dev/snd/midiC0D0

Standard MIDI Files

If your MIDI input source is a pre-recorded standard MIDI file rather than a live hardware device, use the midifile parameter:

-i:midifile,filename.mid