Linux MIDI: a Brief History, Part 1

An overview of the creation and evolution of MIDI, from early standalone equipment to an all-in-one computerized composition environment.
Linux MIDI Support

The OSS/Free kernel sound API supported the basic MIDI capabilities of the original SoundBlaster soundcards. This offered a maximum of 16 channels--no support for multiport interfaces--and support for hardware interfaces only in UART mode, also called dumb mode for its relatively simple capabilities. The OSS/Free API supported a raw MIDI device, /dev/midi, and an advanced device, /dev/sequencer, for interfaces controlling the timing of the MIDI data queue.

From kernel 2.6 onward, ALSA (the Advanced Linux Sound Architecture) is the kernel sound system. Among its many features, ALSA includes backwards-compatibility with OSS/Free MIDI support while offering new support for more modern MIDI systems, including a sequencer architecture that allows easy connections between ALSA sequencer clients and a module for creating virtual MIDI ports on machines without MIDI hardware--very handy on my laptop. ALSA's MIDI hardware support includes standalone MIDI cards, soundcard MIDI hardware connectors, serial and parallel port interfaces and USB MIDI interfaces. The system also installs some useful MIDI utilities, such as the aconnect sequencer client router, the amidi tool for sending and receiving raw MIDI data and the amidirecord utility for recording a standard MIDI file at the command prompt. Besides the OSS/Free /dev/midi and /dev/sequencer devices, ALSA adds its own /dev/snd/midiCxDx logical devices, where C is the card number and D is the device number.

The ALSA sequencer API is a most welcome evolution in Linux MIDI support. Compliant programs may be connected freely, with multiple inputs allowable on a single port. Graphic patch bays are available that display and edit the send/receive status of the available clients. Incidentally, ALSA's virmidi (virtual MIDI) ports appear to the system as though they are real ports, and their data may be routed to and from any other port, real or virtual.

I also must mention that Linux MIDI support extends to a number of operating system and CPU emulation environments, with especially good results achievable with DOSemu, an MS-DOS emulator, and XSteem, an AtariST emulator.

MIDI Software

At the least, a complete software-based MIDI music-making environment should include a MIDI sequencer, a rhythm programmer and one or more software synthesizers. Serious MIDI musicians also should include helper applications, such as patch bays and MIDI event filters. Many interesting MIDI composition environments are available, including MIDI programming languages and GUI-based programs. Music notation programs especially have benefited from MIDI connectivity. Standard MIDI files are fairly easy to convert to notation, and your notated compositions can be rendered and performed easily by way of MIDI.

In Part 2, I will describe Linux programs and utilities in all of these categories. For now I leave you with some eye candy taken from the current Linux MIDI software scene. Enjoy!

Figure 1. The Rosegarden Sequencer

Figure 2. The MusE/Sequencer

Figure 3. The JsynthLib Synthesizer Patch Editor/Librarian

Figure 4. XSteem Running M for the Atari

Figure 5. The Kaconnect MIDI Patch Bay

Figure 6. The midirgui MIDI Channel Router


Similis sum folio de quo ludunt venti.


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I found another MIDI resource

Anonymous's picture

I found another MIDI resource site that may be of interest to others. is domain-parked

Anonymous's picture is domain-parked so don't bother...

Atari emulation

Anonymous's picture

Regarding your XSteem screenshot above, IMHO Hatari is the best Atari ST emulator on Linux, but I have to admit I haven't tested it with music software yet.

Aranym is another promising emulator as it will make better use of the host resources, it even emulates DSP of the newer (10 years old :-)) Atari machines. There's even a Knoppix based live-CD for trying it out.

Wondering if midi control program exists

Anonymous's picture


I have just started playing with midi. One program I would like is something that can record the settings for each song I have on my midi keyboard. I would then assign an unused button/buttons on the keyboard to correspond to the song setting. That way I could just press the key and have the midi program set up the keyboard.

Well that is the thought. I may still be misinterpreting some of midi's functionality.

Thanks in advance

Re: Linux MIDI: a Brief History, Part 1

Anonymous's picture

We are years away from anything that resembles "usable" with regards to linux midi.


1) No default soundfont set (just to listen to a .mid file). It would be nice if someone created a nice GPL GM font set that distro's could include.

2) As nice as fluidsynth is with regards to loading font samples, Jack, the low-latency audio sub-system to which it connects seems quite immature. Sure, if my laptop had a pimpin' SB Audigy or an E-mu card, I probably wouldn't have these problems.

3) Using applications with any of these systems requires that you set up the connections manually to each input/output, connecting your midi in to your jack in, to your oss in... etc. etc. A nice, stable default organization would be nice, so i can focus on connecting my different synths than getting my audio sub-system prepared to do something.

4) USB midi controller support _sucks_. The installation procedures especially for any of the Midisport 1x1's 2x2's,etc, is an absolute pain. Because the firmware has to be written upon device initialization and that firmware is closed source, it requires that you either a) use the open firmware project to get a compatible firmware, or b) rip the .sys file from the windows drivers and set it up. This is unacceptable if you want to be a musician and not a sysadmin.

Promising points

1) Midi latency is much lower than on windows, a testament to how well the ALSA sound drivers were written in that audio synthesis is done much more efficiently resulting in less time between key press on the controller to actual sound output.

2) Software like audacity and rosegarden are getting more mature and while not up to snuff yet with current commercial offerings like Cakewalk *bleh*, Logic, ProTools, etc, given some more time, they might be acceptable replacements.

3) The ladspa plugins, while very far behind the current VSTVSTi offerings, do offer some fairly cool effects. I would like to see, however, some ladspa work with regards to GUI, e.g. a Novation V-Station - like plugin for ladspa... I'm fairly certain this could be done.

Author's reply

Anonymous's picture

Your points are well-taken, but I don't believe we'll be waiting for years.

There's already much concern for a GPL'd soundfont set, it merely awaits someone getting it done. So if you're not too busy... ;-)

I'm not sure I follow you re: your laptop and Jack. Could you clarify what you mean by "immature" ? Jack isn't yet 1.0, it's true, but I use it all the time for audio work on my desktop machine and on my laptop.

I agree with you on your point 3. However, developer Bob Ham has been working on his LASH system that would do a "total recall" of connections and settings. The system is not ready for use yet, but it's a very good start towards resolving that problem. Rui Capela's qjackctl has a GUI he calls Patchbay which can save & load connections, I've been enjoying it for a while now, but it's not up to what LASH intends.

Yep, Linux USB MIDI can be a nightmare, and I don't use it myself. As you suggest, I'd rather be a musician, and I try not to support manufacturers who won't support open source efforts. Until the manufacturers get with us we're bound to workarounds or narrow choices. Ain't closed source grand ? ;)

Not much to add to your promising points, other than to mention that Rosegarden is nearing a 1.0 release after years of a complete rewrite, and Audacity is a already solid soundfile editor. Btw, neither is modeled after Pro Tools, I'd compare that one to Ardour instead.

I've been running VST/VSTi plugins under Linux for quite a while. Two systems (vstserver and libfst) provide a bridge for using VST plugins in Linux, and I've had some great success with quite a few plugins. However, your point of having something native that's similar to VST may be partially answered by the DSSI (Disposable Soft Synth Interface) that's being used in Rosegarden. As the developers say, it's a "LADSPA for instruments", but of course it remains to be seen how well it will be adopted by other apps developers.

So, maybe only *1* year... ;-)

Thanks for your comments !


No amidirecord

Anonymous's picture

There is no amidirecord, the correct command is arecordmidi ... a fruitless Google search until I read the amidi man page. ;-) Quozl.

Author's reply

Anonymous's picture

Ouch, sorry for missing that one. Btw, it works pretty nicely, and of course there's aplaymidi for MIDI file playback.


Re: Linux MIDI: a Brief History, Part 1

Anonymous's picture

I'd like to see some midi sequencers on Linux that support midi units such as motu's usb midi express xt.

Author's reply

Anonymous's picture

Alas, it's not the Linux sequencer that must provide the support, it's the ALSA drivers, and the ALSA team cannot write drivers for which they have no programming information. That information comes from MOTU, so if you really want that piece working under Linux you need to cajole MOTU into releasing the driver specifications to ALSA.

Re: Author's reply

Anonymous's picture

Yeah, I just wish MOTU would release protocal information. I'd also like opensource audio editors that can do sample transfers (like closed source Peak for Macintosh) to hardware samplers. There is an open source program for doing smdi transfers (scsi transfers) but I don't think anyone has touched it lately(opensmdi?).

Edirol UM-880 (was Re: Author's reply)

Anonymous's picture

I purchased a Edirol UM-880, and found that it works quite nicely with the ALSA midi-usb kernel driver in, while in FPT mode. It's an 8port device, shows 9 to the system (the 9th port is to communicate with the processor within the UM880), and even supports the standard OSS midi driver in standard mode.

The OSS driver, however, only gives you one port. Better off with ALSA anyway, so you can route the ports with aconnect.

Edirol UM-880 : Author's response

Anonymous's picture

Do you know if it will work with the 2.4 kernel series ? I'm considering purchasing a USB MIDI interface for testing purposes, and I'd like the install/configure pain to last as briefly as possible. ;)