Setting up Debian etch repositories
fluidsynth is available from the Debian repositories. So add this line (as root) to your /etc/apt/sources.listdeb http://ftp.debian.org/debian/ etch main non-free contribIt seems that recently Debian mirrors have extended their PGP keys even to etch (oldstable) repositories, so if you don't want to see the system complain, you will need to install the PGP key as follows:
/home/user> gpg --keyserver wwwkeys.eu.pgp.net --recv-keys 9AA38DCD55BE302B
gpg: directory `/home/user/.gnupg' created
gpg: can't open `/gnupg/options.skel': No such file or directory
gpg: keyring `/home/user/.gnupg/secring.gpg' created
gpg: keyring `/home/user/.gnupg/pubring.gpg' created
gpg: requesting key 55BE302B from hkp server wwwkeys.eu.pgp.net
gpg: /home/user/.gnupg/trustdb.gpg: trustdb created
gpg: key 55BE302B: public key "Debian Archive Automatic Signing Key (5.0/lenny) " imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
/home/user> gpg --armor --export 9AA38DCD55BE302B | sudo apt-key add -
OK
Installing fluidsynth
Then, you can update apt cache and proceed to install fluidsynth./home/user> sudo apt-get updateI have also tried installing qsynth, a GUI to fluidsynth, but it is not particularly interesting. So, I just work with fluidsynth on the command line.
/home/user> sudo apt-get install fluidsynth
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
ladcca2 libfluidsynth1
The following NEW packages will be installed:
fluidsynth ladcca2 libfluidsynth1
0 upgraded, 3 newly installed, 0 to remove and 226 not upgraded.
Need to get 0B/215kB of archives.
After unpacking 606kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Selecting previously deselected package ladcca2.
(Reading database ... 72482 files and directories currently installed.)
Unpacking ladcca2 (from .../ladcca2_0.4.0-6_i386.deb) ...
Selecting previously deselected package libfluidsynth1.
Unpacking libfluidsynth1 (from .../libfluidsynth1_1.0.7a-1_i386.deb) ...
Selecting previously deselected package fluidsynth.
Unpacking fluidsynth (from .../fluidsynth_1.0.7a-1_i386.deb) ...
Setting up ladcca2 (0.4.0-6) ...
Setting up libfluidsynth1 (1.0.7a-1) ...
Setting up fluidsynth (1.0.7a-1) ...
/home/user>
Setting up fluidsynth to play MIDI
Before you can get fluidsynth to play MIDI files to alsa, you first need to load the alsa MIDI sequencer kernel module./home/user> sudo modprobe snd-seq-midiA better idea is to add "snd-seq-midi" to your /etc/modules file so that the system will automatically load it at start up.
/home/user> sudo bashNow you will need to download a sf2 soundfont for fluidsynth to play MIDI. After all, fluidsynth is just a soundfont player.
asus-1624754341:/home/user> echo snd-seq-midi >> /etc/modules
There are plenty of sf2 you can download from the web. The one I am using is 5MBGMGS.sf2 - not too heavy for the EeePC, but acceptable quality.
Now you are ready to play MIDI with fluidsynth. Of course, you will also need a MIDI file, and the one I use to test MIDI players is the beautiful As Time Goes By in piano.
/home/user> fluidsynth -ni 5MBGMGS.sf2 AsTimeGoesBy.mid
Setting up File Association in File Manager
To set up File Association in File Manager to play MIDIs with fluidsynth, you will have to create a kde desktop shortcut for fluidsynth:home/user> sudo touch /usr/share/applications/fluidsynth.desktopPaste the following content into the file:
home/user> sudo kwrite /usr/share/applications/fluidsynth.desktop &
[Desktop Entry]Then double-click on a MIDI file in File Manager, and select "Open with": /usr/share/applications/fluidsynth.desktop
Type=Application
Encoding=UTF-8
Name=MIDI Player
GenericName=fluidsynth MIDI player front-end
Exec=fluidsynth -ni /home/user/5MBGMGS.sf2 %f
Comment=fluidsynth MIDI soundfont player front-end
Icon=amarok
MimeType=audio/x-midi
Terminal=false
Categories=Qt;KDE;AudioVideo;Player;
Also, remember to check the box "Remember application association..." Then, clicking on a MIDI file will have fludisynth playing it in the background.
Comparing fluidsynth and timidity
But I found that, unlike timidity, playing MIDI with fluidsynth is often affected by running of other applications. Comparing the "top" output running the 2 programs reveal that fluidsynth is using about 80-100% CPU usage, whereas timidity only use 17% at max.So, for my 4G, timidity is obviously the better choice.
Setting up qsynth
For those who would like to use qsynth as GUI interface to fluidsynth for easy setting of Reverbs, chorus effects, etc. Here is how to set it up:From the "Audio" tab, select "alsa" as Audio Driver.
Load a sf2 soundfont file from the "Soundfonts" tab. Then click [OK].
This error is before I loaded the "snd-seq-midi" kernel module.