MIDI on GNULinux

The Advanced Linux Sound Architecture (ALSA) sound-card drivers found in the Linux kernel have MIDI support and a built-in sequencer as standard. You can't use this sequencer to make music directly, but it's useful for connecting between hardware MIDI sockets, sequencer applications, and software instruments.

If you have the on-board type of soundcard, you may not have hardware MIDI sockets available. Connecting an external piano keyboard with five-pin MIDI sockets to a PC like this can be achieved with a small MIDI USB adaptor, which should work with ALSA as long as it's class compliant. (This means it meets the standard for these devices and doesn't need a special driver.) Some MIDI interfaces from M-Audio and Tascam aren't class compliant, although they can be supported with a firmware upload available from the web site http://usb-midi-fw.sourceforge.net and in several GNU/Linux distros. Other, newer MIDI instruments have USB sockets built in, removing the need for the DIN socket adaptor.

To list the MIDI output ports available on a GNU/Linux system, first open a terminal (on Ubuntu, choose Applications > Accessories > Terminal). Next, type in the following command:

$ aconnect -lo

The system responds:

client 14: Midi Through [type=kernel] 0 Midi Through Port-0'

In a similar fashion, you can list input ports with

$ aconnect -li to which the response may be client 0: System [type=kernel]

0 Timer

1 Announce

Connecting To: 15:0

client 14: Midi Through [type=kernel]

0 Midi Through Port-0'

This example is from a typical desktop system with an on-board sound chipset, so only ALSA's MIDI through port is listed; there are no MIDI hardware ports with which to connect external devices. This need not prevent you from sequencing MIDI data and making music, because any PC made in the last decade or so has enough CPU power to use a virtual instrument. That means the synthesis is done in software, instead of having a MIDI-capable chip on the sound card or motherboard. Go back to the PCs of the mid-90s, like the original Pentiums, and you'd often find a Yamaha OPL3 chip insideā€”a crude synthesizer by today's standards, but a real MIDI instrument in its own right. Cost-cutting in PC manufacturing means that contemporary systems rely on the CPU instead, but due to increase in execution speed over the years this is no longer a big deal. A recent machine can run many concurrent virtual instruments without strain, as long as the code is written with efficiency in mind.

In the next section, you use the sequencer seq24 (GNU/Linux, Windows) to trigger AlsaModularSynth (GNU/Linux), also known by its initials as ams. This virtual instrument is a software emulation of the original Moog Modular synth of the 1960s and is a useful tool for learning about synthesis principles. It also makes great bass sounds; and, unlike the real thing, it doesn't go out of tune or weigh half a ton.

0 0

Post a comment