David Lamkins picked up his first guitar a long time ago. As best he can recall the year was 1967: the year of the Summer of Love. Four decades later David has conjured up an amalgam of folk, rock and jazz solo guitar music for the occasional intimate Portland audience.

MIDI sysex on Linux

I sometimes need to transfer a MIDI sysex file to or from a MIDI-capable device. This is how one loads new firmware onto some devices, and how one saves and restores backups of patches and other settings.

As installed, Ubuntu Linux doesn't include a tool to support sending and receiving sysex files via a MIDI interface. You can try your luck with Google, only to find a bewildering array of possibilities. The Ubuntu Software Center, as of Ubuntu 11.10, offers no options.

This article describes how to install and use software that you can use to send and receive MIDI sysex files on your Ubuntu Linux system.

SimpleSysexxer is the most accessible, in that it has a graphical UI that's pretty much self-explanatory. You can find a pre-built binary of SimpleSysexxer, but there's no version available in a Debian-style package. That means that you need to either manually move the various components of the software into the appropriate system directories (something that I wasn't willing to research and document) or navigate to the folder containing the program and start it there. Or, if you're not using Unity, you can create a launcher. All in all, too much to keep track of for my tastes.

SimpleSysexxer is also available as source code, and is not difficult to build and install. Here's how:

Install these packages that are necessary for the build (assuming you already have the GNU tool chain installed):

qt4-make

libqt4-dev

libasound2-dev

Read the BUILDING file in the source directory; follow those instructions.

Once you've built and installed SimpleSysexxer, you'll be able to launch it from Unity. But you're not quite done...

MIDI applications on Linux communicate with devices via a common protocol. My Ubuntu installation uses ALSA for this protocol. ALSA depends upon another tool to connect MIDI devices to MIDI-capable programs.

I use QjackCtl to connect my MIDI interface to SimpleSysexxer. You can install QjackCtl on your system via the Ubuntu Software Center.

QjackCtl is simple to use. Plug in your MIDI interface, start up SimpleSysexxer, and start up QJackCtl. The order doesn't matter. Once everything's ready to go, click the Connect button in QJackCtl to open a window. Click the ALSA tabin that window to show all of the available MIDI ports: outputs on the left; inputs on the right.

What you need to do is to use the QJackCtl Connections window to connect outputs (on the left) to inputs (on the right) in such a way that data will flow from the appropriate source to the desired sink.

Let's say that I want to save a MIDI dump from an external MIDI-capable device. Here's what I do:

Tell your MIDI-capable device to begin sending data. If all is right, you'll see activity in the SimpleSysexxer window.

When your device finishes sending data, click the cancel button and then the save button in SimpleSysexxer. Give the file a name ending in .syx, and you're done!

To restore a dump from computer to device, the steps are:

Connect the MIDI interface's output plug to the MIDI input jack on the device.

Click on SimpleSysexxer in the QjackCtl Connect window's list of output ports.

Click on your MIDI interface in QjackCtl's list of input ports.

Click the Connect button. Now you'll see a line connecting the two ports you just connected.

Tell your MIDI-capable device to prepare to receive data.

Click the send button (an upward-pointing arrow) in SimpleSysexxer. If all is right, you'll see activity in the SimpleSysexxer window and on your MIDI device.

When SimpleSysexxer finishes sending data, you're done!

SimpleSysexxer paces sent data in order to avoid overrunning the input buffer on your MIDI device. The default pacing should be fine for most devices. If you experience problems sending sysex to a device, you can adjust the pacing to see whether that helps. Here's how:

Using your plain-text editor of choice, open ~/.config/Simple\ Sysexxer/Simple\ Sysexxer.conf.

Change the value of the SendingDelay parameter, save the file, and restart SimpleSysexxer.

If you'd rather send and receive sysex via the command line, you can use amidi. Use the Ubuntu Software Center to install the alsa-utils package, then read the man page for amidi.