Revision as of 01:18, 11 January 2013

Timidity++ is a software synthesizer that can play MIDI files without a hardware synthesizer. It can either render to the sound card in real time, or it can save the result to a file, such as a PCM .wav file.

Fluidr3

There are other soundfonts available. This will show how to install the fluidr3AUR soundfont.

Now we have to add its path to the timidity++ configuration file. Just add this line:

/etc/timidity++/timidity.cfg

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

Daemon

Start and configure to autostart the timidity.service. Read Daemons for more details.

If you are using PulseAudio, that may not work. You may want to add the following command as an auto start program in your desktop environment. Or, if you just want to start timidity in daemon mode once, you can use the following command which will make console output viewable:

$ timidity -iA

Usage

Play files

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-based/gtk+ interface. E.g. as a Xfce/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 man timidity or use -h to get help.

Daemon mode

If you are runing timidity as a #Daemon (ALSA sequencer client), it will provide MIDI output support for other programs such as rosegarden, aplaymidi, vkeybd, etc.

This will give you four output software MIDI ports (in addition of hardware MIDI ports on your system, if any):

Option --addr 128:0 connects the input (readable) software MIDI port provided by vkeybd to the first output (writable) ALSA port provided by Timidity. Alternatively you can use aconnect(1), community/aconnectgui or AUR packages patchage, kaconnectAUR. As a result when you play around with the keys on the vkeybd timidity plays the appropriate notes.

Connect to virtual MIDI device

Once you have the timidity++ daemon running and it is working with aplaymidi, you can connect it to a virtual MIDI device that will work in programs such as rosegarden or scala.

Load the snd-virmidikernel module and (optionally) configure it to be loaded at boot. Read Kernel modules for more information.