I wanted to get my MIDI keyboard (an Aturia Keylab Essential 49) working with Debian 12 (bookworm). The web was full of confusing advice about how to get a MIDI keyboard playing sound. The number of programs handling audio is bewildering: ALSA, JACK, Pipewire, PulseAudio…​ I already had ALSA and Pipewire; did I need more?

One recipe suggested I do this:

apt install qjackctl a2jmidid qsynth

This didn’t work. Qsynth was seeing midi events, but no sound was produced. I then went down a rabbit hole, assuming some arcane interaction between Jack, ALSA and Pipewire was to blame.

After much banging of head against wall, I found that all I needed to install was:

sudo apt install qsynth

Qsynth supports ALSA as an audio output, so no JACK required.

The vital piece I had missed was to explicitly set the soundfonts in Qsynth to /usr/share/sounds/sf2/FluidR3_GM.sf2.

Once Qsynth is working properly, then Rosegarden works, so that gives me a DAW capability on Debian. Note that Rosegarden does need JACK as a dependency.

I found these recommended settings in /etc/security/limits.conf which seems to help Qsynth avoid glitching on MIDI keyboard events.

@audio rtprio 99
@audio nice -15
@audio memlock 250000

Note: my user id was already a member of the audio group.