From the ALSA wiki
What is MIDI?
MIDI is an international standard for communicating music as electronic messages from one musical instrument or computer to another musical instrument or computer. MIDI is very useful for composing and playing music using musical instruments such as MIDI keyboards (e.g. Roland, Yamaha Clavinovas,...). To use MIDI, you typically need a computer with MIDI software as well as a MIDI keyboard (any MIDI instrument is ok) which you connect using MIDI cable to a MIDI interface on the computer's soundcard.
ALSA has full support for MIDI. If your computer's soundcard has a MIDI interface (most soundcards do), you can make music using MIDI. Alternatively, you can use USBMidiDevices to connect your PC via one of its USB ports to a MIDI keyboard or instrument. You will also need some MIDI sequencer software on your computer such as Rosegarden or MusE. The following two links are to pages on this Wiki that explain various ways of playingMIDIFiles and of recording MIDI files.
MIDI is an acronym for "Musical Instrument Digital Interface".
Retrieved from "http://alsa.opensrc.org/MIDI"