Thematic background picture
          about Audio

GStreamer, MIDI (and Ubuntu)

So, you have all your old MIDI files lying around and you decide to play them through Totem or another GStreamer based player. What happens? They sound... flat.

Ah, no problem you think, I'll just set up Timidity to use the neat soundfont I have lying around that sounds like my old SoundBlaster card and everything will be peachy, but no, GStreamer doesn't support soundfonts cause it doesn't use timidity but wildmidi - what to do?

Or: How to convert soundfonts to GUS patches for use in wildmidi/gstreamer.

There's a neat little tool called Unsf included in Greg Lee's gt - a stripped down version of Timidity - that can convert a soundfont to a GUS patch usable by wildmidi and therefore GStreamer, so let's get started with the conversion!

First, go to where you want the GUS patch (and its files) - this path shouldn't contain spaces - then download the latest version of gt (I hear there's a version 1.0, but 0.4 is the latest I can find):

cd /where/you/want/the/GUS/files
wget ftp://ling.lll.hawaii.edu/pub/greg/gt-0.4.tar.gz

Now, let's extract it somewhere and build it:

tar -xzf gt-0.4.tar.gz
cd gt-0.4
./configure
cd utils
make

Now, let's convert the soundfont to a GUS patch (remember to replace /path/to/your/soundfont.sf2 with the actual path to your soundfont):

cd ../../GUS
../utils/unsf -F /path/to/your/soundfont.sf2

Now we need to fix the config file that unsf wrote to include the path to where your GUS patch is:

echo -e "dir $PWDn" & wildmidi; cat *.cfg >> wildmidi

Now let's "install" that config file:

sudo cp wildmidi /etc/wildmidi.cfg

There! You're done!

For a nice athentic old school midi sound, I recommend the following soundfont (you need to register to download though): http://www.sf2midi.com/soundfonts/file-detail/roland-sc-55-sf2-3033.html

1 comments

  1. alocloro 124 oil's avataralocloro 124 oil

    very good, i used to install the original soundfont on my ubuntu.

    thank you!

Add a comment

All comments are moderated and may take some time to appear. Please do not submit the same comment multiple times.
Your email address will not be published; it will only be used for verification purposes and to display your avatar. Only your name and comment will be displayed publicly.