MIDI on Linux is highly modular and, as a result, initially overwhelming. It's nice to have a low-complexity solution working before you bother with optimizations, but unfortunately Ubuntu doesn't come with a default working configuration. Here's the simplest way that I have found...
sudo apt install qsynth vmpk ## install components
qsynth & vmpk ## launch
Qsynth -> Setup -> Sountfonts -> Open :
Virtual MIDI Piano Keyboard -> Edit -> Connections ->
Enable MIDI Thru on MIDI Output : (checked)
Input MIDI Connection : (Your Controller)
Output MIDI Connection :
At this point, you should be able to play notes from either your external MIDI controller or from the virtual piano GUI (the GUI works even if you don't have an external controller).
From the Keyboard GUI you can select different instruments (see
Program). From the Qsynth GUI you can manipulate the volume (see
Gain) as well as Reverb/Chorus effects. There is also a
Panic button in case the reverb goes off the rails.
This was specifically tested on clean install of Ubuntu Studio 18.04, but similar steps worked for Ubuntu MATE 16.04, with a notable automatic configuration difference being that
Qsynth -> Setup -> Audio -> Audio Driver defaulted to
jack in Ubuntu Studio but to
alsa on Ubuntu MATE.
Glitchy static with ALSA [SOLVED]
On both 16.04 and 18.04, I have experienced weird static when Qsynth initially starts working with alsa. This static seems to affect all audio sources, but it somehow works itself out in a minute or two (at least partially).
I later tried this setup on a less powerful CPU and noticed a similar static that did not seem to resolve over time. [As an aside, I noticed that this static correlated with the
ALSA plug-in [qsynth] line glitching in and out in the Applications tab of
This led me to play around with some Qsynth Settings, and I found something that seems to solve both static/glitch problems (maybe with a trade-off of a minor latency increase):
Buffer Size :
Buffer Count :
Apparently, the CPU can't always keep up with the required burst rate, so a little extra buffering is needed to prevent underruns. Presumably the are other settings that could also affect this.
vmpk loses its connection to
Qsynth when the settings are changed. The quickest way to experiment with changing settings is to close and restart
vmpk to force a reconnect.