Tux Guitar

Problems

Subject Choppy playing



Author Message
Zbynek
Post: Mar 7th 2010 at 9:26 AM

Hi there,
playing of my songs is choppy. Don't know why. Used rosegarder4 to test it and it sound the same, however I prefer tuxguitar for whatever reason...
My machine/OS:
Fedora 12, i386
TiMidity++ version 2.13.2
Timiditi's soundbank file size: 250MB
Intel(R) Pentium(R) 4 CPU 2.00GHz, 512KB cache
Total mem: 1.2GB
Desktop: XFCE

I work like this:
Startup timidity:
timidity --realtime-priority=100 -iA -Os -EFreverb=0 -EFchorus=0 -s 44100 -B 0
### Timidity than takes about 7% of CPU
Startup tuxguitar ... compose ... play

That's all. Nothing more or less. No extra memory consumption servers/apps like httpd, mysql, browsers.

Other apps use for music compositions/playback:
audacity, xmms, mplayer - however not simultanously.

I also tested timidity itself my exporting a tg file to mid and use timidity to play. THAT was OK. No hiccups, chops. Nothing. Playing went smoothly taking up about 20% of CPU.

Any suggestions?


Back to Top
 
Julian
Post: Mar 7th 2010 at 3:21 PM

Do you have PulseAudio running in your OS ??


Back to Top
 
Zbynek
Post: Mar 24th 2010 at 5:01 PM

Yes:
[zby@montana ~]$ ps ax | grep -i pulse
1718 ? S 1775 ? S 0:00 /usr/libexec/pulse/gconf-helper
2130 pts/1 S+ 0:00 grep -i pulse
[zby@montana ~]$


So far this works OK:
[zby@montana ~]$ cat /usr/local/bin/tuxguitar
#!/bin/sh

timidity -iAqqq -B8,8 -s22050 -q8,100 &
TPID=`ps axo pid,cmd|grep -i timidity|grep -iv grep|awk '{print $1}'`
/usr/local/tuxguitar/tuxguitar

kill -9 $TPID

exit 0

[zby@montana ~]$


However it may cause troubles later as I suppose you did not ask about pulseaudio just for fun.
:)


Back to Top
 
Zbynek
Post: Mar 24th 2010 at 5:03 PM

Oops, a better grep output comes:

[zby@montana ~]$ ps ax | grep -i pulse
1718 ? S 1775 ? S 0:00 /usr/libexec/pulse/gconf-helper
2130 pts/1 S+ 0:00 grep -i pulse
[zby@montana ~]$


Back to Top
 
Zbynek
Post: Mar 24th 2010 at 5:07 PM

Sorry for multiple replies, but the grep output lines get messed up after I post. So instead of:

/usr/bin/pulseaudio --start

It displays as:

1718 ? S


Back to Top
 
Julian
Post: Mar 27th 2010 at 3:52 PM

> I suppose you did not ask about pulseaudio just for fun.
:).. i ask because if you have it (and i see yes), timidity could not be the best choise..

So timidity don't have pulseaudio output driver.. you can use it through alsa, jack, etc... but pulseaudio sometimes fail.. (however the choppy sound could be cause by a low buffer size)

My suggest is to use fluidsynth, since it have pulseaudio support..

so you can install fluidsynth, a soundfont..

instead of do:
timidity -iAqqq -B8,8 -s22050 -q8,100 &

you can do:
fluidsynth -s -i -l -z 1024 -a pulseaudio -m alsa_seq [Your .SF2 File] &

then instead of select timidity in tuxguitar, you select the fluidsynth device.


Back to Top