Can Ecasound Play MIDI to Software Synths?
Ecasound cannot natively play back Standard MIDI Files (.mid) directly to external or software synthesizers on its own. While it is a versatile command-line digital audio workstation capable of multitrack recording, signal routing, and effect processing, its MIDI implementation is limited to MIDI continuous controller (CC) automation and timing synchronization rather than musical event sequencing. However, you can easily achieve playback by pairing Ecasound with a lightweight command-line MIDI sequencer alongside a software synthesizer within the Linux audio ecosystem.
Understanding Ecasound's MIDI Limitations
Ecasound treats audio streams as its primary data type. Its built-in ALSA and OSS MIDI capabilities are designed for:
- Controlling effect parameters (like cutoff filters or volume) via MIDI controllers.
- Synchronizing audio tracks via MIDI Clock or MIDI Time Code (MTC).
It does not contain an internal SMF (Standard MIDI File) sequencer to parse note-on/note-off messages and send them to software synthesizers like FluidSynth, TiMidity++, or ZynAddSubFX.
How to Play MIDI Files Through Softsynths with Ecasound
To work with MIDI sequences and route their rendered sound through Ecasound for processing, monitoring, or recording, you combine three tools: a software synthesizer, a dedicated CLI MIDI player, and Ecasound via the JACK Audio Connection Kit or ALSA.
1. Start the Software Synthesizer
Launch a synthesizer daemon such as FluidSynth, specifying an audio driver (JACK is recommended) and a SoundFont:
fluidsynth -a jack -m alsa_seq /path/to/soundfont.sf22. Send MIDI Events Using a Dedicated Player
Use a native ALSA MIDI file player like aplaymidi to
read the .mid file and send note events to the synthesizer
port:
# List available MIDI ports to locate the FluidSynth port number
aplaymidi -l
# Play the MIDI file to the synthesizer's input port (e.g., port 128:0)
aplaymidi -p 128:0 song.mid3. Route Synth Audio into Ecasound
With the synthesizer producing audio from the MIDI stream, use Ecasound to capture, process, or mix that sound:
# Route JACK audio coming from FluidSynth through Ecasound for real-time effects and output
ecasound -i jack -o alsa -ea:150By separating MIDI sequencing tasks to utilities like
aplaymidi and sound generation to software synthesizers,
Ecasound can focus entirely on real-time audio routing, mastering, and
multitrack recording.