ALSA midi support

If you don't have a real MIDI sequencer, use a software synthetizer.

Making MIDI soft-synthetizer to work with ALSA 

Make Timidity into an ALSA output device with:

timidity -Os -iA

(-O: output=alsa, -i: interface=alsa)

To make it use less CPU and be more responsive, use:

timidity -Os -iA -B2,8 -EFreverb=0 -EFchorus=0

(-B: 2,8=set small buffers, -EFx=0: disable effects)

Make vkeybd (virtual midi keyboard app) into an ALSA input device with:


View the resulting (software) ALSA input and output devices:

aconnect -i -o

Then connect the vkeybd input to timidity output with:


or if you don't have this UI program, just use 'aconnect' directly:

aconnect <sender port> <receiver port>

Now you can use the virtual midi keyboard for testing the sound synthesis.

Finally You can test how well midi files are played. Check which ALSA port Timidity provides:

aplaymidi -l

And use that port for playing a midi file:

aplaymidi -p <port, e.g. 129:0> test.mid

(or use 'pmidi')

Note: Remember that you need to re-connect the (virtual) device ports each time you restart them.

Using FluidSynth instead of Timidity 

Instead of Timidity, you also use other soft-synthetizers, like FluidSynth:

fluidsynth --audio-driver=alsa --midi-driver=alsa_seq soundfont.sf2

You could play a bit with other options to get more performance, sound volume etc:

--reverb=no --chorus=no -o synth.polyphony=16 --gain=0.6

And if you don't like the FluidSynth shell, use:

--no-shell --server


Playing Midi files for Intel AC'97

Try starting timidity like this:

timidity -iA -Os -B2,8 --reverb 0 --realtime-priority 1

and then see what aplaymidi -l says.