Tux Guitar

TuxGuitar Documentation » TuxGuitar-ALSA


What is tuxguitar-alsa

tuxguitar-alsa is a plugin for TuxGuitar. It connects TuxGuitar’s MIDI sound output to ALSA (Advanced Linux Sound Architecture). That means that with this plugin TuxGuitar will no longer use Java soundbank, but ALSA MIDI output.

How to install tuxguitar-alsa

tuxguitar-alsa plugin is included on GNU/Linux TuxGuitar distributions as default. If you downloaded a compiled GNU/Linux package, you shouldn’t bother to install it manually.
Ofcourse you may want rebuild and install the plugin.

To install the plugin, you must copy tuxguitar-alsa.jar into $TUXGUITAR_HOME\share\plugins

How do I know if plugin is working?

In Tools/Plugin dialog you should see TuxGuitar-alsa plugin and it should be enabled. In Tools/Settings/Sound new devices should appear, the same ones that you get by invoking shell command

~$ aconnect -o

The plugin is installed, but there is no sound

  • Do you have ALSA installed?
  • Is snd-seq module loaded?
  • Do you have MIDI Synthesizer daemon running?

Do you have ALSA installed?

You may have OSS instead of ALSA. You may have neither. :)

Is snd-seq module loaded?

For some soundcards snd-seq kernel module isn’t loaded as default.
To check if the snd-seq module is already loaded, you can open a terminal and execute the following command:

~$ lsmod | grep snd

This command will show a list of the modules loades on the Kernel, on wich should be snd-seq. If the file isn’t on the list, you can load it executing the following command (as root):

~$ modprobe snd-seq

You can also load this module at GNULinux boot, by adding snd_seq on /etc/modules

Do you have MIDI Synthesizer daemon running?

Yes, ALSA doesn’t come with default synth daemon. You should install Timidity++, or several alternatives : Fluidsynth, AlsaModularSynth, or ZynAddSubFX.

You can test if your ALSA sinthesizer is working by playing some MIDI file. You can try with the command

~$ aplaymidi AnyFile.mid –port 14:0

This is for port 14, which is default, but with aconnect you can determine your available ports.

Using Timidity as a synthesizer daemon

If your GNU/Linux distribution have the timidity init script /etc/init.d/timidity (and it don’t start at boot time), you can run it:

~$ /etc/init.d/timidity start

But if you haven’t /etc/init.d/timidity file, you can manually start it in console as foreground job (To stop timidity use Ctrl+C or Ctrl+Z if it doesn’t respond):

~$ timidity -EFreverb=0 -iA -Os

or run it in background (to stop timidity you need to kill its process):

~$ timidity -EFreverb=0 -iA -Os >/dev/null & </dev/null

or write script to insert module and start sythesizer on computer startup.

Note: command line option -EFreverb=0 is used to disable reverb effect that can take a lot of CPU power.

The ALSA plugin made TuxGuitar very slow...

That’s because your computer is slow. :) If you’re using Timidity, try to reduce it’s sound quality (edit /etc/timidity/timidity.cfg).

doc/tuxguitar_alsa.txt · Last modified: 2011/04/02 18:00 by johnny

Show pagesource