From ArchWiki
Revision as of 12:03, 21 March 2008 by Ant (Talk | contribs) (Standalone mode)

Jump to: navigation, search


timidity++ is a MIDI to WAVE converter and player which is basically used to play MIDI files if your sound card does not support the MIDI protocol natively.

How to setup timidity++

timidity++ can be installed via pacman from the extra repository:

# pacman -S extra/timidity++

After timidity++ has been installed, you have to define where the soundfont is located. Because timidity++ comes without any soundfont we have to install it separately.

How to install a soundfont

There are several soundfonts out in the wild. This HowTo will use the fluidr3 soundfont which is accessible via the AUR.

Note: It will be assumed that you know how to build packages from the AUR. This excerpt will be very short and barely explained. Too short if you're completely new to it.

As sfarkxtc, a decompressor for soundfonts, is a make dependency of fluidr3, we install it first:

# pacman -S sfarkxtc

After sfarkxtc has been installed, we will be able to build fluidr3 which may take some time.

# wget http://aur.archlinux.org/packages/fluidr3/fluidr3/PKGBUILD
# wget http://aur.archlinux.org/packages/fluidr3/fluidr3/fluidr3.install
# wget http://aur.archlinux.org/packages/fluidr3/fluidr3/license
# makepkg
# pacman -U fluidr3-122501-2.pkg.tar.gz

If fluidr3 has been installed properly, we have to add it's path to the timidity++ configuration file. Just add this line to /etc/timidity++/timidity.cfg:

soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2

Then timidity++ is ready for use.

How to use timidity++

There are two ways to use timidity++. Either as MIDI player or as daemon adding MIDI support to ALSA.

Standalone mode

You can simply use timidity++ to play MIDI files:

$ timidity example.midi

Add option -in or -ig for a text mode/gtk+ interface. E.g. as a GNOME user you may want to set MIDI files to open with the custom command `timidity -ig'. There are many other options to timidity; see manpage or use -h to get help.

Alsa daemon mode

If you want timidity to run as ALSA daemon, just use:

# /etc/rc.d/timidity++ start

If you want to have permanent MIDI support, add timidity to your daemon list in /etc/rc.conf:

DAEMONS=(... timidity++ ...)

Or if you just want to run timidity with ALSA support once, you can use the following command which will make console output viewable:

$ timidity -iA


timidity++ does not play MIDI files

It may be that your soundfile is not set up correctly. Just run:

$ timidity example.midi

If you find a line like this in the terminal output, your soundfile is not set up properly.

No instrument mapped to tone bank 0, program XX - \
this instrument will not be heard

Make sure your soundfile is added to /etc/timidity++/timidity.cfg. You may refer to the step 'How to install a soundfont'.