Tux Guitar

Help

  Forums : Help
Subject Better sound from Gervill



Author Message
Luke
Post: Apr 3rd 2009 at 10:14 AM

Hi,

I just downloaded your tuxguitar 1.1 ubuntu 64Bit package and I use gervill for the sound because it works better with pulseaudio than timidity. But distorted guitars sound like a piano, is it possible to increase the sound quality of gervill?

Thanks for your great work on tuxguitar!


Back to Top
 
Luke
Post: Apr 3rd 2009 at 10:15 AM

Or is it maybe possible to use another/better "output" method which also doesn't need timidity?


Back to Top
 
Julian
Post: Apr 3rd 2009 at 3:58 PM

Luke,

the answer to the first question is yes.
at first you need to download any soundfont ( .sf2 ) file.
or you can try just one that is available at ubuntu repositories: fluid-soundfont-gm ( the .sf2 file is installed at "/usr/share/sounds/sf2/FluidR3_GM.sf2
" )

then you have two options to install it:
1_ install it as default gervill soundbank
it's the best way, because any other midi application will share same config.
just copy (or make a symcolic link ) the soundfont file to:
/usr/lib/jvm/java-6-openjdk/jre/lib/audio
( restart tuxguitar )

2_ configure it on tuxguitar
on tuxguitar, Just go to "Tools -> Plugins" ,select "Java Sound Api Plugin" and click on setup button.
click use custom soundbank, and select the file.


> Or is it maybe possible to use another/better "output" method which also doesn't need timidity?
there is fluidsynth too, that also can read soundfont files.
Gervill is written in pure java, so it may be slowly on some computers ( for me it works great, only tike some time loading big soundfonts, then it works fine )
Fluidsynth is written in a native language ( C ) and it may be a solution if you have speed problems.

if you don't have performance problems, all options ( gervill, timidity, fluidsynth, etc ) are configurable, so nice sounds depends on how do you have it configured.


Back to Top
 
Luke
Post: Apr 4th 2009 at 7:18 AM

Thank you, the first option works fine! :-)


Back to Top
 
JT
Post: Sep 27th 2009 at 9:01 PM

I had the same issue with sound quality from Gervill. I tried option 1, copied the file using "sudo cp" to the correct directory. I noticed no change in the instrument sound. So naturally, I tried step 2, which I checked over and did correctly, without avail. Any suggestions?


Back to Top
 
JT
Post: Sep 27th 2009 at 9:14 PM

Also, sorry for necro-posting, but it seemed appropriate to keep directly related things in the same thread.


Back to Top
 
Julian
Post: Oct 3rd 2009 at 8:55 PM

JT, please tell us what you exactly did..
"sudo cp" is not enougth to understand what did you copied, and where you did it..


Back to Top
 
Eirik
Post: Oct 4th 2009 at 8:38 PM

I tried with both methods to use the .sf2 files, but it didn't work. But when i messed up my system tuxguitar automagically downloaded some sound bank and pointed the plugin to that. This worked, but it used a .gm file. I don't know what the difference is, but maybe I had the same problem as JT. How can I use the nice .sf2 files?


Back to Top
 
Eirik
Post: Oct 4th 2009 at 10:45 PM

...and the answer to my question was that I should install the OpenJDK, not use sun java that I had on my system. Tuxguitar seem to work better with openjdk than sun.


Back to Top
 
Julian
Post: Oct 5th 2009 at 1:07 PM

Eirik, It's not about openJdk VS sun's jdk.

it's about what Synthesizer are you using ( see on tuxguitar's menu Tools -> Settings : Sound ).

Java Sound Synthesizer: supports only .gm files
Gervill: supports .sf2, dls, and audio files.

So if you have the closed JDK, but you have java sound synth selected, you'll not able to load .sf2 files.
to make it works you have to "install" gervill into your sun's JDK, and then select it in tuxguitar.

In other words, it's not closed VS open jdk.
it's about "gervill" vs "java sound synthesizer"
and yes i agree.. i also think that gervill is very better than java sound synthesizer


Back to Top
 
Ed
Post: Oct 31st 2009 at 10:38 AM

Hi Julian,

First of all, you did a wonderfull job with Tuxguitar!

I just installed a fresh Ubuntu Karmic yesterday (was running Jaunty before)
The only issue now is I can not setup the java sound api plugin, nothing happens when clicking on the button (I just installed Tuxguitar + tuxguitar-jsa + openjdk-6-jre, with Gervill as midi port thats all)

I also tried your first advise: just copy the soundfont file to:/usr/lib/jvm/java-6-openjdk/jre/lib/audio (restart tuxguitar) The problem is that the last file "audio" does not exist, so I created it, copied the SGM.sf2 into it, restarted tuxguitar but get an error message like "unavailable soundbank"

I assume there should be another path to copy the sounfile to but don't know where (maybe specific to Karmic)

So I do not know how to use another soundfont in tuxguitar, any help would be appreciated.

Thanks


Back to Top
 
Julian
Post: Oct 31st 2009 at 11:00 AM

Ed,
About the "nothing happens with the button", see here:
https://bugs.launchpad.net/ubuntu/+source/tuxguitar/+bug/455615

( original bug talks about graphics, but the buttons click is related to same story )

About copying the soundfont to the audio folder, it seems to be ok. but for any reason it's not working.

Try please run "tuxguitar -i" in a terminal and paste here the results..


Back to Top
 
Ed
Post: Oct 31st 2009 at 11:52 AM

Hi Julian, many thanks for your prompt reply. Here is the output:

ed57@tuxtoufou:~$ tuxguitar -i
System Info:
-> OS-Name: Linux
-> OS-Arch: amd64
-> OS-Version: 2.6.31-14-generic
-> JVM-Name: OpenJDK 64-Bit Server VM
-> JVM-Version: 14.0-b16
-> JVM-Vendor: Sun Microsystems Inc.
-> Java-Version: 1.6.0_0
-> Java-Vendor: Sun Microsystems Inc.
-> Java-Home: /usr/lib/jvm/java-6-openjdk/jre
-> Java-Class-Path: :/usr/share/tuxguitar/:/usr/share/tuxguitar//tuxguitar.jar:/usr/share/java/itext.jar:/usr/share/java/swt.jar:
-> Java-Library-Path: /usr/lib/jni

Please be advised that I deleted the "audio" folder as I could not launch tuxguitar this way


Back to Top
 
Julian
Post: Oct 31st 2009 at 2:23 PM

Ok, this "-i" thing was to see if tuxguitar was running with openJDK ( note that you may have installed more than one JRE at same PC )

So that's ok, it is working with openJdk, and it's located at /usr/lib/jvm/java-6-openjdk/jre.

So i think there is another problem in background.
try please create again the audio folder, and run tuxguitar under a terminal just type "tuxguitar" (without the -i option), and paste here all messages you see on the terminal when the error happens.


Back to Top
 
Ed
Post: Oct 31st 2009 at 4:50 PM

ed57@tuxtoufou:~$ tuxguitar
java.lang.OutOfMemoryError: Java heap space
at com.sun.media.sound.ModelByteBuffer.loadAll(ModelByteBuffer.java:274)
at com.sun.media.sound.SoftSynthesizer.loadSamples(SoftSynthesizer.java:257)
at com.sun.media.sound.SoftSynthesizer.loadInstruments(SoftSynthesizer.java:267)
at com.sun.media.sound.SoftSynthesizer.loadAllInstruments(SoftSynthesizer.java:743)
at com.sun.media.sound.SoftSynthesizer.openStream(SoftSynthesizer.java:990)
at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:896)
at com.sun.media.sound.SoftSynthesizer.open(SoftSynthesizer.java:881)
at org.herac.tuxguitar.player.impl.jsa.midiport.MidiPortSynthesizer.getSynthesizer(Unknown Source)
at org.herac.tuxguitar.player.impl.jsa.midiport.MidiPortSynthesizer.open(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.loadOutputPort(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.openOutputPort(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.openOutputPort(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.restorePlayerConfig(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)

Then when I load a .gp file I get this error: error opening : {0}
(I translated the error from french)

Hope this can help you to find out the issue


Back to Top
 
Ed
Post: Oct 31st 2009 at 5:00 PM

Here is the message after having loaded the .gp file:

org.herac.tuxguitar.io.base.TGFileFormatException: Erreur dOuverture : {0}
at org.herac.tuxguitar.gui.actions.file.FileActionUtils.open(Unknown Source)
at org.herac.tuxguitar.gui.actions.file.OpenFileAction$2$1.run(Unknown Source)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.herac.tuxguitar.io.base.TGFileFormatException: java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.herac.tuxguitar.io.base.TGSongLoader.load(Unknown Source)
... 3 more
Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded
at org.herac.tuxguitar.song.factory.TGFactory.newString(Unknown Source)
at org.herac.tuxguitar.song.models.TGString.clone(Unknown Source)
at org.herac.tuxguitar.io.gtp.GP4InputStream.readBeat(Unknown Source)
at org.herac.tuxguitar.io.gtp.GP4InputStream.readMeasure(Unknown Source)
at org.herac.tuxguitar.io.gtp.GP4InputStream.readMeasures(Unknown Source)
at org.herac.tuxguitar.io.gtp.GP4InputStream.readSong(Unknown Source)
... 4 more


Back to Top
 
Ed
Post: Nov 1st 2009 at 5:57 PM

Hi Julian,

The issue is fixed with your link to the bug reported at launchpad. I replaced the file swt.jar from the file SWT-3.6M2-gtk-linux_my_arch with the one located in usr/lib/java.

I can now get the windows opened in TG plugins and choose another soundbank.

Just one thing: one cannot create the folder "audio" in /usr/lib/jvm/java-6-openjdk/jre/lib/audio and put a sf2 sound file into it. This way, TG won't open any gp file in my case. This happens at least with ubuntu and maybe with other linux distributions.

This workaround should maybe be marked as a sticky for new posters here (or maybe you will fix it for the 1.2 release)

Thanks for your help and long life to Tuxguitar


Back to Top
 
Julian
Post: Nov 1st 2009 at 6:17 PM

>> Caused by: java.lang.OutOfMemoryError

It can open the soundfont, because it's size is bigger than the maximum memory size setted to java.

Try open your tuxguitar launcher with any text editor.
( if you got the .deb package it should be at /usr/bin/tuxguitar )

and in some place of the script there should be something like: -Xmx128m ( or maybe 256 ).

This -Xmx parameter, tells java what is the maximum memory that the application can use.

try set it to 512, ( of 1024 if you have a lot of RAM, and have plans to open very big soundfonts )

For next release we are going to set it to 512 ( -Xmx512m ) as default.


Back to Top
 
Anonymous
Post: Nov 1st 2009 at 8:31 PM

Julian,

Yes I found it at usr/bin/tuxguitar:
JAVA_FLAGS=${JAVA_FLAGS:="-Xms128m -Xmx128m"}
Should I replace the 2 ones with the size desired?

By the way, which is the best result: put the soundbank into /usr/lib/jvm/java-6-openjdk/jre/lib/audio or choose the one desired in the java api plugin at "use custom soundbank"?

Thanks for your help and the time taken to reply


Back to Top
 
Julian
Post: Nov 1st 2009 at 8:43 PM

"Xms" parameter, means "start" memory. i don't suggest you modify it.. because if you set it, java will take all of this memory even when it isn't used.
"Xmx" is the "maximum" .. java will use memory, and if memory used is equal that limit it will throw OutOfMemoryError.

What could be the difference..
when you modify the JRE/lib/audio, you are modifyng Java.
it means, that if you run a different application than tuxguitar using gervill, it will also use that soundfont as default.
if you use "custom soundbank" from tuxguitar, the change will be applied only in tuxguitar, (not in other applications that uses gervill )

Load it from tuxguitar could be more easy for end user.
but if you find the "best" i think it is using audio folder of JRE.


Back to Top
 
Happy Karmic user
Post: Nov 14th 2009 at 5:11 PM

Thanks Julian, had to take all the steps (install fonts, create audio dir, link the file, edit tuxguitar script) but now it works like a charm!


Back to Top