Tux Guitar

Problems

Subject Yet more sound problems



Author Message
mssever
Post: Jan 8th 2009 at 8:31 PM

I just installed tuxguitar, and I have no sound output. I'm running Ubuntu Intrepid (with pulseaudio) with the tuxguitar package in the repos, along with tuxguitar-alsa. I'm using Sun Java. In addition, I have timidity installed and working correctly (I know this because I can play MIDI files from the command line).

In tuxguitar, there's only one sequencer available. I have four options for the MIDI port: Midi Through Port-0 and TiMidity ports 0-3. I've tried all options but without sound. I get no error messages, and when I run from the terminal I get no exceptions. Furthermore, there's no entry in the PulseAudio volume control app, which I assume means that no sound is going out the ALSA plugin (other ALSA apps show up there just fine).

I've read the section of the documentation on sound problems, as well as looked through this forum (which is limited since there's no search function). However, I haven't found anything that worked.


Back to Top
 
Julian
Post: Jan 8th 2009 at 9:20 PM

> working correctly (I know this because I can play MIDI files from the command line).
Warning, one thing is timidity as aplication, and another is as server.
When you get timidity as a MIDI Server, it connects to alsa, then Alsa sequencer send events to it.
While if you run timidity as application, it uses it's oun sequencer.

Try load timidity again under a terminal:
timidity -iA -Os

then try connect the first of the new ports (allmost times 129:0)

and see if timidity is showing anything on the terminal.


You can also install tuxguitar-jsa package.. and select java sound synthesizer (not the best sounds).
then start tuxguitar, with the OSS wrapper of pulseaudio:
padsp tuxguitar

Not really sure if the command was "padsp" now.. just check it.


Back to Top
 
mssever
Post: Jan 8th 2009 at 10:51 PM

Julian,

Thanks for the reply. The timidity server is already running, albeit with slightly different options than you gave:

~:$ ps -ef | grep timidity
root 6417 1 0 Jan07 ? 00:00:00 /usr/bin/timidity -Os -iAD

The selected port is 128:0 (there is no 129).

Earlier, I tried installing timidity-jsp, but when I tried using it, I got a whole army of exceptions (unfortunately, I didn't write them down and no longer remember what they were). Maybe that's because I uninstalled the OSS plugin? OSS is rather naïve, so I assumed that it was unnecessary. On the other hand, Java's multimedia support is pretty bad, so I suppose that Java might depend on an inferior sound system. At any rate, I'll give it another try. But I'd really prefer to use timidity.


Back to Top
 
mssever
Post: Jan 8th 2009 at 10:56 PM

OK. I tried using padsp and tuxguitar-jsa, and I now have sound. This is progress. But I still would rather have timidity work.


Back to Top
 
mssever
Post: Jan 8th 2009 at 11:10 PM

Further testing revealed that the problem is that for some reason tuxguitar won't work when timidity is running as root. Which is, of course, how timidity is set up. The timidity package includes an init script that runs the server as root. I don't know whether this is a problem with tuxguitar or timidity, but I don't like the fact that tuxguitar doesn't report any errors when it fails. Also, why does tuxguitar report a bunch of timidity ports? Why not just auto-detect the proper one?


Back to Top
 
Julian
Post: Jan 9th 2009 at 9:46 AM

Hi,

> The timidity server is already running ...
Sure (this is why you can select it from tuxguitar)
i tried mean launch a "new" instance of it.
just to test, if the problem may be pulseaudio.

A "known" issue with timidity and pulse, was that first timidity was loaded, and then pulseaudio .
pulseaudio makes a capture of alsa input, but as timidity was loaded "before" than pulse, it wasn't captured.
Starting a new timidity after PC is booted, let you know if the problem is at boot time, or if it's allways.

> tuxguitar won't work when timidity is running as root.
IT's supposed it should.
i have timidity started as root, and it don't give me problems.

> tuxguitar doesn't report any errors when it fails
This is the issue.
there is no error here.
from application, you "can't" catch the speakers.
you don't have any way to know if sounds are played on speakers or not.
you can only connect to output ports, and send MIDI events to them.
then, you don't have control to know if events are played or not. so you can't display error/success messages.

> why does tuxguitar report a bunch of timidity ports?
It is not tuxguitar. it is alsa.
execute in a terminal:
aconnect -o

on TuxGuitar (and because this kind of problems) we made an interface to make output port plugeable.
TuxGuitar-alsa, is a plugin for "Alsa".
it connects to alsa libraries, and ask alsa for available midi ports. then connect to the port selected by the user, and at last, send midi events when song is running.

But it's important to difference it.
tuxguitar never connect with "timidity"
what tuxguitar does, is connect and send events to "Alsa".
and, timidity is also connected to alsa, but as "receiver".

So here you have the reply of:
> Why not just auto-detect the proper one
because timidity may be not installed on your system.
because it's not a dependency.
timidity is a software synthesizer, but it's not the "only one".
there are others, you can try fluidsynth for example.
because, on tuxguitar level, alsa isn't the only plugin too.
and, at last, tuxguitar run on other platforms.. so alsa ports are only for GNU/Linux.

As default, tuxguitar autodetects "Java Sound Synthesizer"
it's not the best, but as it's from java, it's multiplatform, and it should be installed allways.
(you didn't see this autodetect, because tuxguitar-jsa wasn't installed, but this plugin is installed by default on official releases).


To test if the problem is at tuxguitar-alsa plugin, or if it's outside.
you can test play a midi file with timitidiy (but as server).
aplaymidi --port 128:0 YourFile.mid

If file don't sounds, so problem isn't at tuxguitar.
otherwise we need see why it works with aplaymidi, and not with tuxguitar.


Back to Top
 
mssever
Post: Jan 9th 2009 at 11:38 PM

Thanks for the explanation. TuxGuitar must use a different method to play sounds then, for example, NtEd. I just tested and found that if I issue the command "sudo service timidity restart" everything works. However, pulseaudio starts at S25, while timidity starts at S99. So unless Ubuntu does something with Upstart that changes that order, then something else must be going wrong. I suppose that my next step should be to file a bug report against timidity with Ubuntu.


Back to Top