If you're a musician and want to record and monitor using a Digital Audio Workstation (DAW) running in a Linux environment you've probably found that the USB connection from the DAW to your Musical Instrument Digital Interface (MIDI) controller isn't always straightforward.

Well, here are solutions for three DAWs, organized from easiest to hardest. The most basic setups are covered for systems with just a computer and a MIDI controller.

Become a Member of Audio

First, make sure you are a member of the Linux group audio. This will provide you with the permissions needed to run things smoothly:

        sudo usermod -a -G audio <your_user_name>
    

After doing this you should reboot your computer, then continue. Verify you are now indeed a member of group audio by running:

        groups
    

You should see audio listed in the output.

Software Installation

Software requirements for these examples are: the DAW, the audio connection kit Jack (with QJackCtl front end), a synth such as FluidSynth (with Qsynth front end) for monitoring and playback, plus a very useful little bridging utility called a2jmidid.

Note that if your MIDI controller has built-in synths, you don't necessarily need an external synth for monitoring and playback - you can just monitor with headphones plugged directly into the controller.

Related: Why You Should Use Your Keyboard as a MIDI Controller

Qsynth with SF2 soundfonts seems to always work with minimal fuss, but if you prefer another synth, give it a try. Jack can be used from the command line, but the graphical front end, QJackCtl will make things easier.

In order to get things talking with the more challenging DAWs, use a2jmidid, which is a bridging utility that recognizes Advanced Linux Sound Architecture (ALSA) sequencer ports and creates MIDI ports from them. The MIDI ports can then be connected through the QJackCtl MIDI tab in the Connections window.

Even though these examples use a MIDI controller keyboard, the connections should work for any MIDI controller, whether it's a pad, wind instrument, or drum machine.

Install qjackctl, a2jmidid, and qsynth with your package manager. For example in Lubuntu:

        sudo apt-get install qjackctl
sudo apt-get install a2jmidid
sudo apt-get install qsynth

How to Use Rosegarden

This example uses Rosegarden version 19.12.

Rosegarden Recording MIDI

Rosegarden is a DAW that usually works right away with minimal setup. It's available as part of the Ubuntu package suite and also as a binary or source code download.

It will automatically detect Jack and FluidSynth, start Jack on its own, then make the needed ALSA and audio connections. Just make sure you start Qsynth before starting Rosegarden because it won't automatically start the synth.

Rosegarden problems are easily resolved by ensuring that the ALSA and audio connections are being created by checking the QJackCtl Connections interface. You'll find various ports listed under the ALSA and Audio tabs.

Jack Rosegarden ALSA

The most frequent problem is a disconnected synth, caused by starting the synth after Rosegarden instead of before. This must be corrected by making the connection through Rosegarden's MIDI connections window, as a feature in the the DAW may not allow it to trap the signal if you try to make the connection through Jack.

Rosegarden MIDI Devices

In order to monitor while tracking or to listen during playback, you must connect the synth output to the audio input of the computer.

Jack Rosegarden audio

Once these connections are established, Rosegarden will generally behave as expected throughout the recording session.

Related: The Best Linux Distros for Artists, Musicians, and Editors

How to Use LMMS

This example uses LMMS version 1.2.2.

lmms recording midi

LMMS can make reliable connections either through MIDI ports via Jack or ALSA. It's available as an Ubuntu package as well as a stand-alone AppImage file.

This example uses Jack-MIDI because it is consistent and understandable in terms of what you are doing with connections. Before starting LMMS, begin by adding the a2jmidid command to Jack as a post startup command. From the QJackCtl Setup window, enter the command:

        a2jmidid -e &
    

in the Execute script after Startup box. Then click OK, and restart QJackCtl.

Jack a2jmidid connection kit

Your next step is to change the Setup LMMS > MIDI settings to the following:

  • MIDI INTERFACE: Jack-MIDI
  • SETTINGS FOR JACK-MIDI: lmms
LMMS Jack MIDI Interface

Now restart LMMS and verify the connections in QJackCtl's MIDI tab.

Jack LMMS MIDI

After choosing a synth and adding it, for example, by dragging ZynAddSubFX into the Song Editor, the QJackCtl audio tab connections should look similar to the audio tab show for Rosegarden except that the output will come from the LMMS master ports instead of the synth directly.

How to Use Ardour

This example uses Ardour version 6.6.0.

Ardour recording midi

If you're using Ardour to record from a MIDI controller, you may become frustrated with it's large number of ports, connections, and names, then decide to use an alternative DAW. But, what if your next work of music consists of mostly audio tracks and Ardour then turns out to be your best choice for production?

This is where a2jmidid can be of assistance.

Do not start Ardour first.

Instead, start QJackCtl. Click the Start button. Then in the Connections window, check that the MIDI tab shows a2j as a client. Click the Expand All button. Verify your MIDI controller shows up as a Client under a2j. If not, try unplugging and then replugging the USB for the MIDI controller.

Now start Ardour and choose a New Session.

It will detect Jack, then raise the session setup window. Choose Empty Template. If you pick Recording Session, it will automatically allow you to add audio recording tracks. If you're recording MIDI, you will want a MIDI track, which you have to add yourself.

Ardour setup windows

Once Ardour is running, add a MIDI track from the Track menu. This should result in your Jack Connections window populating with the proper connections. To check, open the MIDI tab and Expand All.

Ardour a2j MIDI connections

Do the same in the Audio tab.

Ardour a2j Audio connections

Don't forget to check that your Ardour MIDI channel strip has a functional synth plugin. Otherwise, you'll get no sound.

Did You Make the Connection?

Using Linux DAWs for MIDI music production has some huge advantages for artists, with the primary driver cost. Most laptops are more than capable of handling the CPU load and memory requirements, and you can get most of the software tools for free.

There are a large number of tools available in the Linux world and it just takes some time and determination to make them work for you.