Tux Guitar

Problems

Subject Timidity sounds like a 3 yr old playing guitar



Author Message
semitone36
Post: Nov 2nd 2008 at 1:54 AM

Hello all

I used tuxguitar with Hardy Heron and it worked great! I learned a ton of songs with its help. I just did a fresh install for Intrepid and I installed tuxguitar, the ALSA plugin, timidity, and did the "timidity -iA -Os" thing in the terminal.

The problem is that I have sound but... Im pretty sure my cat could play guitar better than this sounds. Timidity is all over the place, tracks arent in sync with eachother, some notes are held while others are skipped. How do I fix this so that tux sounds like it did before I upgraded?


Back to Top
 
Julian
Post: Nov 2nd 2008 at 11:32 AM

Ok you installed tuxguitar, alsa plugin and timidity..
but "did you select a timidity Port on tuxguitar ??"
I think you forget this step, because there was no changes on timidity configuration since Hardy to Intrepid.


This "timidity -iA -Os" should not be needed on Ubuntu (or any debian based distribution).
there is an init script: /etc/init.d/timidity [start|stop]
that is loaded as default when your PC Boot.
so as default if you didn't modify it, timidity must be running every time.

> Im pretty sure my cat could play guitar better than this sounds
timidity is a software synthesizer but it don't have own sounds.
Soft Synths often reads sounds from files.

So if you configure timidity with a nice soundfont, it'll sound nice, but if you use a low quality soundfont, so you'll get a low quality output.
But it is not about timidity, fluidsynth or any other software synthesizer. it's about your configuration.


Back to Top
 
semitone36
Post: Nov 3rd 2008 at 10:28 AM

>but "did you select a timidity Port on tuxguitar ??"

yup I did. Before I enter timidity -iA -Os into the terminal I have 4 ports open for timidity in Tux but none of them result in any sound when I play files.

After I enter timidity -iA -Os into the terminal I get 4 more ports (each starting with the number 130) in tuxguitar. These new ports seem to work as they actually produce sound.

The problem though is that it basically sounds like crap when I press play. And I dont mean poor sound quality, I mean the song ACTUALLY sounds like a three year old is trying to play the song lol. The notes dont match the beat. Its like my cpu isnt able to process the notes fast enough to make the songs sound like they should.

Have you ever listened to an elementary school band try to play the Star Wars theme? You have some kids playing too fast, some kids missing notes, and it just overall makes you want to cringe. Thats what tux sounds like after I upgraded.


Back to Top
 
Julian
Post: Nov 3rd 2008 at 10:50 AM

> I have 4 ports open for timidity in Tux but none of them result in any sound when I play files.
This happen because pulse audio
It a known problem on distributions that uses pulse audio that MIDI synthesizers can't run fine.
the only solution i know is to revert default audio configuration to "Alsa".

However, if you have this problem i still suggest you:
# It will stop current daemon
sudo /etc/init.d/timidity stop

# It will start a new timidity daemon
sudo /etc/init.d/timidity start

There is nothing wrong on exec "timidity -iA -Os".
but if you don't kill first 4 ports, these will be tasks running on your system background with no sence..

> The notes dont match the beat.
This is a known timidity problem for some cards

fluidsynth is better for that (or this is my case).
but last time i tested, fluidsynth didn't start with pulse audio..

> And I dont mean poor sound quality
When i say quality, i don't talk about "quality" at all :)
English is not my native language, and there are some things that i don't have idea how to say.
I talk about all.
Nice sounds | Delay | CPU Usage... etc.
as better sounds you have, more CPU you need. and you'll have more delay since "note_on" event was sended and you heard the "real event sound".

I didn't found delay with fluidsynth, but yes i found that CPU is at 100% if i load a "big" soundfont.

but yes i found delay with timidity, but CPU is never upper than 20% on my system.

> Thats what tux sounds ...
TuxGuitar "don't play sounds". it's not a software synthesizer.
This is why you need to have a software synthesizer installed ( timidity, fluidsynth, java sound synthesizer, etc )


Back to Top
 
semitone36
Post: Nov 3rd 2008 at 3:33 PM

Ahhh that makes more sense now. Thank you for your help Julian! I will try the sudo commands the next time I can access my computer.


Back to Top
 
semitone36
Post: Nov 5th 2008 at 4:55 AM

Thank you again Julian for your help. I tried your sudo commands and now I no longer have to type timidity -iA -Os to get tux to work, but I still have the problem of the songs sounding disorganized.

Do you know of a way to work around this? If not is there anything special I need to do to get fluidsynth to work?


Back to Top
 
VC
Post: Nov 13th 2008 at 1:08 AM

Have the exact same problem with the 3 year old playing in timidity. Everyhting used to work perfectly in Ubuntu 8.04 Does anyone know of any changes in Ubuntu that oculd affect this?


Back to Top
 
VC
Post: Nov 13th 2008 at 1:30 AM

Hi,

Having read ALL of the other posts on this forum :) I found the solution.

Don't use timidity, use the Java Sound Sythesizer instead.

If this doesent work for you (if the option doesent appear in Settings->Sound, or if there is no playback) your system is probably configured to use the gcj java virtual machine by default.

GCJ aparently doesnet have a full implementation of the Sound API so you have to install Sun Java and instruct your system to use the sun JVM instead. Here are the steps I used to get it working:

sudo apt-get install sun-java6-jre tuxguitar-jsa
sudo sudo update-alternatives --config java
(select sun-java6 /usr/lib/jvm/java-6-sun/jre/bin/java)

Start up Tuxguitar, go into Tools->Settings->Sound and select the Java Sound Synthesizer.

Hope this helps.
V


Back to Top
 
semitone36
Post: Nov 15th 2008 at 12:22 AM

Hello VC and thank you for your input. I tried out your method and everything installed properly and the Java Sound Synthesiser appeared as an option under Sound. Unfortunately When I select it I get an Error saying that Midi is unavailable... Have I forgotten to do something?


Back to Top
 
Julian
Post: Nov 15th 2008 at 10:16 AM

Try run tuxguitar on a terminal, and paste here the full error log please.

if you get a "MIDIUnavailableException"
see here:
http://www.tuxguitar.com.ar/tgwiki/doku.php?id=doc:error_midi_unavailable_linux


Back to Top
 
Mel
Post: Nov 16th 2008 at 3:39 PM

I have the same MidiUnavailableException problem.
(The log is at the bottom)
By the way I tried the workaround using the alsa-oss as wrapper, however the 3yr old remains playing the same. Even playing only one instrument.

Something happens with Tux Guitar and Intrepid Ibex, because as some other people it worked perfect on Hardy Heron, I backed out from Intrepid to Hardy and again it worked smoothly. The log below is from the problem in Intrepid Ibex.

Thanks in advance for your support.

herrerai@herrerai-t43:~$ tuxguitar
javax.sound.midi.MidiUnavailableException: Audio Device Unavailable
at com.sun.media.sound.MixerSynth.implOpen(MixerSynth.java:165)
at com.sun.media.sound.AbstractMidiDevice.doOpen(AbstractMidiDevice.java:144)
at com.sun.media.sound.AbstractMidiDevice.open(AbstractMidiDevice.java:108)
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.loadPort(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.openPort(Unknown Source)
at org.herac.tuxguitar.player.base.MidiPlayer.addPortProvider(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGMidiPortProviderPlugin.addPlugin(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGMidiPortProviderPlugin.setEnabled(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.base.TGPluginList.setEnabled(Unknown Source)
at org.herac.tuxguitar.gui.system.plugins.TGPluginManager.openPlugins(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
fluidsynth: ALSA driver: Using format s16, rw, interleaved
org.herac.tuxguitar.player.base.MidiPlayerException: MIDI System is unavailable
at org.herac.tuxguitar.player.base.MidiPlayer.play(Unknown Source)
at org.herac.tuxguitar.gui.actions.transport.TransportPlayAction.execute(Unknown Source)
at org.herac.tuxguitar.gui.actions.Action$1.run(Unknown Source)
at org.herac.tuxguitar.gui.helper.SyncThread$1.run(Unknown Source)
at org.herac.tuxguitar.util.TGSynchronizer$TGSynchronizerTask.run(Unknown Source)
at org.herac.tuxguitar.gui.TuxGuitar$2.run(Unknown Source)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3157)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2859)
at org.herac.tuxguitar.gui.TuxGuitar.displayGUI(Unknown Source)
at org.herac.tuxguitar.gui.TGMain.main(Unknown Source)
Caused by: org.herac.tuxguitar.player.base.MidiPlayerException: MIDI System is unavailable
at org.herac.tuxguitar.player.impl.jsa.midiport.MidiPortSynthesizer.check(Unknown Source)
... 12 more


Back to Top
 
Julian
Post: Nov 16th 2008 at 4:06 PM

Mel, do you have "snd-seq" kernel module loaded ?

Try exec:
lsmod | grep snd_seq

I see, that you have fluidsynth plugin installed too.
you can try use it instead of java sound api plugin.

To use it you can do this:
# install a soundfont file.
sudo apt-get install fluid-soundfont-gm

Then open tuxguitar, go to "Tools -> Plugins". and click "configure" on the fluidsynth plugin.
and add the installed soundfont file "/usr/share/sounds/sf2/FluidR3_GM.sf2"

Then, you can go to "Tools -> Settings" and at Sound options, select this fluidsynth port on "MIDI Port".

You'll get nicer sounds than produced by java sound synthesizer..


Back to Top
 
Mel,
Post: Nov 17th 2008 at 7:22 PM

Hi Julian,

I executed the snd_seq:

herrerai@herrerai-t43:~$ lsmod | grep snd_seq
snd_seq_dummy 10884 0
snd_seq_oss 38528 1
snd_seq_midi 14336 0
snd_rawmidi 29824 1 snd_seq_midi
snd_seq_midi_event 15232 2 snd_seq_oss,snd_seq_midi
snd_seq 57776 7 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer 29960 2 snd_pcm,snd_seq
snd_seq_device 15116 5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd 63268 17 snd_intel8x0,snd_ac97_codec,snd_pcm_oss,snd_pcm,snd_mixer_oss,snd_seq_oss,snd_rawmidi,snd_seq,snd_timer,snd_seq_device

and I also added the FluidR3_GM.sf2... but nothing sounded at all. I also tried the FluidR3_GS.sf2 file but nothing happened either.

This is weird!


Back to Top
 
semitone36
Post: Nov 18th 2008 at 3:44 AM

Hey sorry for my delayed responses, midterm week has kept me busy.

Anyways I just wanted to jump in here to say: WHAT?????
Julian, I tried running tuxguitar through the terminal like you said and all of a sudden the Java Sound Synthesiser decided to start working and now tux sounds perfect!

What the heck did I do to fix it?? Haha I feel like fonzie when he smacked the jukebox to get it working again lol. Anyways thank you so much guys for all of your help.

ROCK ON!!!!


Back to Top
 
daddario
Post: Feb 27th 2009 at 10:31 PM

Hi!
Sorry for digging up an old thread but it seemed the right one.
I used to use Java for TG sound. It was great. After a new installation the Java Sound Synth never came into the MIDI output menu. For some time I have used TiMidity. It's terrible. The sounds are bad, and so on.
VC told:
sudo apt-get install sun-java6-jre tuxguitar-jsa
sudo sudo update-alternatives --config java
(select sun-java6 /usr/lib/jvm/java-6-sun/jre/bin/java)

So I did:
debianx:/home/daddario# apt-get install sun-java6-jre tuxguitar-jsa
Reading package lists... Done
Building dependency tree
Reading state information... Done
sun-java6-jre is already the newest version.
tuxguitar-jsa is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 475 not upgraded.
debianx:/home/daddario# update-alternatives --config java

Hetkel on `java' tagamiseks 4 alternatiivi.

Valik Alternatiiv
-----------------------------------------------
1 /usr/bin/gij-4.2
2 /usr/bin/gij-4.3
+ 3 /usr/lib/jvm/java-gcj/jre/bin/java
* 4 /usr/lib/jvm/java-6-sun/jre/bin/java

Vaikimisi[*] valiku jaoks vajuta enter, oma valiku tegemiseks sisesta number: 4
Using '/usr/lib/jvm/java-6-sun/jre/bin/java' to provide 'java'.
debianx:/home/daddario#

But nothing. In the MIDI Port menu there are only choices for TiMidity, MIDI through and some soundcard specific choices. I'm starting to go insane.


Back to Top
 
Julian
Post: Mar 1st 2009 at 4:42 PM

daddario,
Please paste me the result of:
tuxguitar -i

also, please open tuxguitar and go to "Tools -> Plugins"
Is "Java Sound Api plugin" there ??? is it enabled ??

at last.. do you see any error log on tuxguitar startup ??


Back to Top
 
daddario
Post: Mar 2nd 2009 at 2:15 PM

No errors, yes the plugin is enabled.
daddario@debianx:/sg/data/muusika/IJKLMNOP/Meinardus/2004 Meinardus - Christendom's Perdition$ tuxguitar -i
System Info:
-> OS-Name: Linux
-> OS-Arch: i386
-> OS-Version: 2.6.18-6-486
-> JVM-Name: Java HotSpot(TM) Client VM
-> JVM-Version: 11.2-b01
-> JVM-Vendor: Sun Microsystems Inc.
-> Java-Version: 1.6.0_12
-> Java-Vendor: Sun Microsystems Inc.
-> Java-Home: /usr/lib/jvm/java-6-sun-1.6.0.12/jre
-> Java-Class-Path: :/usr/share/tuxguitar/:/usr/share/tuxguitar//tuxguitar.jar:/usr/share/java/itext.jar:/usr/lib/java/swt3.2-gtk.jar:
-> Java-Library-Path: /usr/lib/jni
daddario@debianx:/sg/data/muusika/IJKLMNOP/Meinardus/2004 Meinardus - Christendom's Perdition$


Back to Top
 
Julian
Post: Mar 3rd 2009 at 10:44 AM

It's strange, you should see the java sound synth there.

does this file exists on your file system ?
/usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/resources.jar

If no, make sure that "sun-java6-bin" is installed.

if yes, please open it with file-roller (or any other archive manager) and show me please the content of the file:
/META-INF/services/javax.sound.midi.spi.MidiDeviceProvider

There is where the default sun's synth is configured.


Back to Top
 
daddario
Post: Mar 3rd 2009 at 3:49 PM

Nope.
There is directory /usr/lib/jvm/java-6-sun-1.6.0.12/jre/lib/
but no resources.jar file.

There is no directory /META-INF/. Or is it a subdirectory somewhere?


Back to Top
 
Julian
Post: Mar 3rd 2009 at 4:13 PM

ok, so here is the problem "resources.jar" is missing on your jvm.

/META-INF/ is inside the resources.jar file, see *.jar as a .zip file.

As i saw on packages.debian.org:

http://packages.debian.org/search?searchon=contents&keywords=%2Fusr%2Flib%2Fjvm%2Fjava-6-sun-1.6.0.12%2Fjre%2Flib%2Fresources.jar&mode=path&suite=stable&arch=any


resources.jar is at "sun-java6-bin" package.
you should already have it installed, because it's a dependency of "sun-java6-jre"

why don't you try reinstall the "sun-java6-bin" package and take a look if resources.jar become available


Back to Top
 
daddario
Post: Mar 12th 2009 at 7:41 PM

/META-INF/services/javax.sound.midi.spi.MidiDeviceProvider:

# Providers for midi devices
com.sun.media.sound.MixerSynthProvider
com.sun.media.sound.RealTimeSequencerProvider
com.sun.media.sound.MidiOutDeviceProvider
com.sun.media.sound.MidiInDeviceProvider


Back to Top
 
daddario
Post: Apr 20th 2009 at 3:50 PM

No solution yet...


Back to Top