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,parametersDepending 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:portor
-i alsaseq,client:portalsaseq: Specifies the ALSA sequencer subsystem.client:port: Identifies the specific MIDI client and port number. You can list available ports on your system by runningaconnect -i.
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:02. Raw MIDI (rawmidi)
If you are accessing hardware ports directly without the ALSA
sequencer layer, Ecasound provides the rawmidi driver.
Syntax:
-i:rawmidi,device_noderawmidi: Direct hardware MIDI driver.device_node: The system path to the MIDI device, typically located in/dev/snd/or/dev/.
Example:
ecasound -i:rawmidi,/dev/snd/midiC1D0 -o:rawmidi,/dev/snd/midiC0D0Standard 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