Tux Guitar


  Forums : Help
Subject Problem with using sound font

Author Message
Post: Jul 4th 2009 at 8:08 PM

Hi everyone. I installed OpenSUSE yesterday and have no linux experience prior to that so it's most likely me that's causing the problem.

When I installed Tuxguitar, I thought that the distorted guitars sounded like a Super Mario game with lots of reverb, and that the drums sounded like ... I don't know what. So I tried to use a "custom sound bank" thing (SGM 2.01). But when I select it in tools>plugins>configure and reboot, I can't hear any differance? What am I doing wrong? Thanks!

Back to Top
Post: Jul 5th 2009 at 2:44 PM

You are configuring it on the Java Sound Api plugin,
it means a soundbank for a port provided by this plugin.

if you have selected "Java Sound Synthesizer", provided by java sound api plugin, it don't supports .sf2 files.
the soundbank that this synth supports are:
(and beleive me, 3 options still sound as super mario :) )

If you are loading a port provided by alsa, you can't configure the soundfont inside tuxguitar, each port ( see timidity, fluidsynth ) have it's own configuration mode.

So, what MIDI Port do you have selected in tuxguitar ??

Back to Top
Post: Jul 5th 2009 at 4:05 PM

Thanks a lot for the reply!
I am using Gervill (and the only other option I have is "Midi Through Port-0 [14:0]". I've tried to install Timidity, but the terminal says

"/usr/local/share/timidity/timidity.cfg: No such file or directory
Couldn't open output device"

When I type in "timidity config". Even though the config file is there.

I tried to configure Gervill as you described it in this thread


(I copied the soundfont file to /usr/lib64/jvm/jre-1.6.0-sun/lib/audio)

This didn't work, but then I realised that


should be more correct. but there is no audio folder in


Back to Top
Post: Jul 7th 2009 at 9:08 PM

Ok, so..

first about timidity.. well the error is clear, it seems you don't have the configuration files..

This page have some config examples, if you still want use timidity:

Another good option could be fluidsynth ( because latest version, have pulseaudio driver support )

Now, about gervill..
well, gervill is provided by java sound api, and yes it have support for .sf2 files ..

but i think i know what could be happening.
there is one thing that i hate of java, and it is the non "dynamic" memory allocation.
so when you start a java application, you need to set a maximum memory ( or keep it to default 64mg i think it is )
The problem is that gervill is a pure java library.
and, when you load a soundfont, you are loading it on memory.
As default, we distributed tuxguitar, with a maximum of "128mg"
I don't remember the SGM soundfont size, but i think it's greater than 128
so my theory, is that java is throwing OutOfMemoryError in background.. and this is why gervill can't load it.

So, try to open the tuxguitar script.
and find the keys "-Xmx128m" ( it is the maximum size )
and set it to 512 or higher..
Note that, it's a maximum value.. it don't means that the application will use it.

Back to Top
Post: Jul 20th 2009 at 4:45 PM

It works a bit better now thanks

Back to Top
Post: Aug 3rd 2009 at 6:56 AM


Where is this "Tuxguitar script" located? I can't find the file to edit the value of the max allocated memory.

Any help would be greatly appreciated.

Back to Top
Post: Aug 3rd 2009 at 1:53 PM

Ulukai, it may depends on what tuxguitar package did you downloaded ( each package have different scripts )

because your other post, i assume you have:
Ubuntu 9.04 + Tuxguitar 1.0 from ubuntu repositories..

so this script could be at /usr/bin/tuxguitar

Back to Top
Post: Aug 3rd 2009 at 7:26 PM

Thanks Julian, I found the script. Will only changing the 2nd value to 512 be enough to set the max size to 512 MB?

JAVA_FLAGS=${JAVA_FLAGS:="-Xms128m -Xmx512m"}

Back to Top
Post: Aug 3rd 2009 at 10:16 PM

i think 512 is fine..
but it really depends on the size of the soundonf you want to load..
i mean, if you want to load a 1GB soundfont so.. 512 isn't enough..

anyway.. the "Xmx" param, represents a maximum value, it don't means that it will be used.. just when is needed.
so if you set 1024, but your soundfont is lesser than that, so it will not use 1024, just what it needs.

the "Xms" is the "start" size.. so if you set it higher, java will use allways it as a minimum value ( even if it don't needs it )

the recommed is to set the maximum size higher (more than the soundfont size ) so the gervill could load it in RAM, and have extra space to work with the soundfont samples.

Back to Top
Post: Aug 4th 2009 at 11:54 AM

Thanks for the clear explanation :-)
This helps for bigger soundfonts.

Back to Top