Using a midi controller with Ubuntu

A long time ago, I bought a midi controller keyboard (a Cakewalk A-500S) as I wanted a small piano, but did not have space for an actual one. A midi controller does not produce any sound of its own. Instead you are supposed to connect it to a computer with a hardware that can interpret the midi signals from the keyboard to sounds from a library. The nice part is that the sound library can be quite extensive and include many kinds of intstruments.

As a Linux user, the challenge is that there seems not to exist one single program that would make the controller a plug-and-play device. Instead I need to run at least three programs plus a bit of fiddling to get it working on my Ubuntu 18.04 laptop. Since I do not use the controller too often, I tend to forget how it was done. In order not to forget and to perhaps help others with a similar syste, I have written down below the steps how I got it working.

Here are the simple steps that I used to get my midi controller to work with a Ubuntu system:

  • Plug in the midi controller keyboard (via USB)
  • Start QjackCtl (controlls the sound signals between the different programs and the controller)
    • Press the “Start” button.
  • Start ZynAddSubFX jack version (the midi synthesiser that actually produce the sound signals)
  • Start a2jmidid
  • In QjackCtl, in the connections window
    • In the Audio tab, make sure there are connections between zynsubaddfx (left panel) and the system (right panel)
    • In the MIDI tab, connect a2j with zynaddsubfx/midi_input (this is only possible if you are running the a2jmidid program, as instructed before)
    • In the ALSA tab, connect the Midi controller output (left) to the Midi Through (right)
  • By pressing any key on the controller, you should now get a sound; otherwise check your speaker volume.

You can change the instrument from the boring default sinus sound in ZynAddSubFX in the Instrument/Show Instrument Bank menu.

There are other ways to do this, but so far I have found this to be the easiest and best working. If you are interested in composing, try to connect Rosegarden too, which will write out the sheetmusic and allow recording and looping as well.

Leave a comment