Features Help Download

I don't get any sound while running LenMus in Linux

The problem with sound is, usually, that in some Linux distros a MIDI synthesizer is not installed by default. These are the issues you should check:

  1. Check that a MIDI synthesizer is installed.
  2. Check that the MIDI is correctly configured and running.

Check that a MIDI synthesizer is installed.

To check that you have a MIDI synthesizer installed and running, do the following:

  1. Run LenMus and open the MIDI Wizard (main menu > Sound > Run Midi wizard).
  2. In the wizard you can choose the MIDI synthesizer to use. If the selector is empty the problem is that there is no MIDI synthesizer installed or it is not running.

See bellow for instructions to install a MIDI synthesizer

Check that the MIDI is correctly configured and running

Run LenMus and open the MIDI Wizard (main menu > Sound > Run Midi wizard). In the 'Output device' selector choose the MIDI shynthesizer you would like to check. Click on 'Next' button and a new wizard page will be displayed. Click 'Test sound' button and, if the selected device is working, you should hear the test sound.

Install a MIDI synthesizer

The most used software synthesizers in Linux are FluidSynth and Timidity. I recommend FluidSynth, as it is actively developed and it is easier to set it as a sound server.

Option a) Install FluidSynth

Use your package manager to install FluidSynth, and the soundfonts to use (I would recommend the fluid-soundfont-gm package). To do all this, in Ubuntu and Mint you can use the following command:

sudo apt-get install fluidsynth fluid-soundfont-gm

Now FluidSynth and the soundfont are installed. But before starting LenMus you will need to start the FluidSynth synthesizer. To avoid having to do this everytime you would like to run LenMus, I would recommned to add FluidSynth to startup menu, so that it will start automatically every time you log in your desktop. How to do it depends on the distro you are using. For instance, to do it in Linux Mint with Xfce, do the following:

And that's all. Restart your session, run LenMus, open LenMus MIDI Wizard, select device 'FluidSynth', click 'Next' and a new wizard page will be displayed. Click 'Test sound' button. You should now hear the test sound.

Option b) Install Timidity

In my machine (Linux Mint 13) I used to install Timidity as follows:

sudo apt-get install timidity

And now you have to configure timidity to run as server. Issue the following commands to load any missing module(you may not need all these but doesn't harm):

sudo modprobe snd-seq-device
sudo modprobe snd-seq-midi
sudo modprobe snd-seq-oss
sudo modprobe snd-seq-midi-event
sudo modprobe snd-seq

Now the following command:

timidity -iA -B2,8 -Os1l -s 44100

loads timidity as a midi server and opens 2 midi ports, 128:0 and 128:1. After issuing it, you should have midi players working. Test this with LenMus. Open LenMus MIDI Wizard, select device 'TiMidity port 0', click 'Next' and a new wizard page will be displayed. Click 'Test sound' button. You should now hear the test sound.

A final step is to automatically start TiMidity server on boot, to avoid having to start it manually each time you reboot the machine. Ubuntu sets up scripts in /etc/init.d when you install TiMidity. To start it on boot, edit /etc/default/timidity

sudo gedit /etc/default/timidity

and uncomment the line

TIM_ALSASEQ=true

You'll also need to add the modules you loaded earlier to the /etc/modules file:

sudogedit /etc/modules

At the end of the file, add this:

snd-seq
snd-seq-device
snd-seq-midi
snd-seq-oss
snd-seq-midi-event

And that's all. Timidity will start as server at boot time. And LenMus should produce sounds.

Last updated: 2019/04/28