Using Pykaraoke...some Songs Studder..why?


trikkedaddy

Still Fresh
Joined
Feb 5, 2008
Messages
13
Age
55
Location
Newark, NJ
Website
www.myspace.com
Hi there,
I have installed PyKaraoke on my gp2x f-200. I am going to be the life of the party Thursday but some of my files studder. Why is that and what can I do?
 
Frank P said:
Hi there,
I have installed PyKaraoke on my gp2x f-200. I am going to be the life of the party Thursday but some of my files studder. Why is that and what can I do?
What kind of stutter? Occasional pops are normal, I think, but generally not noticeable. If you're getting something more severe than that, something must be wrong.

I haven't tried it on the F-200 yet (I only have the original F-100). It might be an F-200 issue. Are you using midi-style .kar files, or CDG files?

The latest source code has quite a few fixes over the current distribution here. One of these fixes includes explicit CPU speed management; it's possible that this will solve the problem. It might be time to make a new release--I'll look into it.

David
 
Last edited by a moderator:
drwr said:
Frank P said:
Hi there,
I have installed PyKaraoke on my gp2x f-200. I am going to be the life of the party Thursday but some of my files studder. Why is that and what can I do?
What kind of stutter? Occasional pops are normal, I think, but generally not noticeable. If you're getting something more severe than that, something must be wrong.

I haven't tried it on the F-200 yet (I only have the original F-100). It might be an F-200 issue. Are you using midi-style .kar files, or CDG files?

The latest source code has quite a few fixes over the current distribution here. One of these fixes includes explicit CPU speed management; it's possible that this will solve the problem. It might be time to make a new release--I'll look into it.

David


hi are you involved in the pykaraoke project? if so then it would be great if you could get a new package ready based on the latest verstion :)

i think the fix you mention concerning cpu speed management may be the issue - stuttering of sound appears both with kar files and cdg files. furthermore,on uptempo, complex type rythymic music seems to stutter more.

the stutter seems to occurs, most clearly in the cgd files, at the lyrics screen transitions points?

i'll have read of the procedure to compile for gp2x if it is not a too complicated process :)
 
Last edited by a moderator:
peelie said:
hi are you involved in the pykaraoke project? if so then it would be great if you could get a new package ready based on the latest verstion :)
Right, I'm the guy who made the original port of PyKaraoke to the GP2X, and I have everything I need to make a new GP2X package release. I'm not the original developer of PyKaraoke, though, so I'll contact him to see if he's ready to make a release in general. It's better if he is, because that way we can keep the version numbers consistent across the different platforms. If not, though, then I can certainly provide an interim release for you.

peelie said:
i think the fix you mention concerning cpu speed management may be the issue - stuttering of sound appears both with kar files and cdg files. furthermore,on uptempo, complex type rythymic music seems to stutter more.
OK, that does sound promising. It may also be helpful to tune down the sample rate of your MIDI synthesis if your kar files have lots of instrumentation or particularly complex patches. This is not possible with the currently-released version, but it will be configurable with the latest version.

peelie said:
the stutter seems to occurs, most clearly in the cgd files, at the lyrics screen transitions points?
This is a bug that I have certainly fixed in the latest version. Previously, there was a noticeable audio pause during screen-blank for many cdg files. No longer.

peelie said:
i'll have read of the procedure to compile for gp2x if it is not a too complicated process :)
It is kind of complicated, but you're more than welcome to have a go at it. The biggest issue is to ensure that you get the right versions of the SDL_mixer libraries, which include hacks to run ogg and mp3 in integer mode instead of floating-point mode. Without these hacks, your audio performance will certainly suffer. :) You can download these hacked libraries from the file archive, but it will probably be sufficient to compile against existing standard SDL libraries, and then just drop in the SDL*.so files from the PyKaraoke distribution.

David
 
Last edited by a moderator:
drwr said:
Frank P said:
Hi there,
I have installed PyKaraoke on my gp2x f-200. I am going to be the life of the party Thursday but some of my files studder. Why is that and what can I do?
What kind of stutter? Occasional pops are normal, I think, but generally not noticeable. If you're getting something more severe than that, something must be wrong.

I haven't tried it on the F-200 yet (I only have the original F-100). It might be an F-200 issue. Are you using midi-style .kar files, or CDG files?

The latest source code has quite a few fixes over the current distribution here. One of these fixes includes explicit CPU speed management; it's possible that this will solve the problem. It might be time to make a new release--I'll look into it.

David



HI there,
Yes, all of my files are in KAR format. I thought it was a cpu issue too. Some of the KAR files would play normal, slow down, then speed up again.

Should I use a different format?
 
Last edited by a moderator:
Frank P said:
Yes, all of my files are in KAR format. I thought it was a cpu issue too. Some of the KAR files would play normal, slow down, then speed up again.
Hmm, that's a little different. If you mean the tempo of the song is changing unexpectedly, that's not a CPU issue, but some problem with MIDI interpretation. It might indicate a flawed kar file. Can you play the same files on a Linux or Windows PC?

QUOTE

Should I use a different format?


The kar format should work well. There are, however, some bug fixes in the upcoming release. When we get this out, we'll see if it addresses your issues.

David
 
Last edited by a moderator:
hi

next pre-release seems to have solved the "transition stutter" with cdg files;

stutter still appaears on midi files as described by Frank P - i.e. playback slows down and speeds up.

also mpg playback does not seem to work (the pykaraoke web page says mpg playback is available?

cheers

/edit/ sorry did not read in readme that video files need to be converted first - did this and they play fine
 
peelie said:
stutter still appaears on midi files as described by Frank P - i.e. playback slows down and speeds up.
Is it all your midi files, or only some of them, that behave this way? Can you email me one or two midi files that demonstrate this problem? Please zip them up and send it to gp2xkarsample at ddrose dot com.

Tell me more about the problem: is it actually a tempo change of the music, or is it only a synchronization issue with the lyrics display? Do you have access to a PC to see if the same problem occurs there?

Many thanks,
David
 
Last edited by a moderator:
drwr said:
peelie said:
stutter still appaears on midi files as described by Frank P - i.e. playback slows down and speeds up.
Is it all your midi files, or only some of them, that behave this way? Can you email me one or two midi files that demonstrate this problem? Please zip them up and send it to gp2xkarsample at ddrose dot com.

Tell me more about the problem: is it actually a tempo change of the music, or is it only a synchronization issue with the lyrics display? Do you have access to a PC to see if the same problem occurs there?

Many thanks,
David



hi

trying to emaill you file but yahoo does not seem to like your address? will email facility in these forums work?

the problematic file works fine under winamp on my windows pc.

cheers
 
Last edited by a moderator:
peelie said:
trying to emaill you file but yahoo does not seem to like your address? will email facility in these forums work?
This forum's email facility will work, except there's no way to send attachments that way. Are you sure you're writing to gp2xkarsample@ddrose.com ? No reason that email address should be rejected. What does yahoo say about it?

David
 
Last edited by a moderator:
drwr said:
peelie said:
trying to emaill you file but yahoo does not seem to like your address? will email facility in these forums work?
This forum's email facility will work, except there's no way to send attachments that way. Are you sure you're writing to gp2xkarsample@ddrose.com ? No reason that email address should be rejected. What does yahoo say about it?

David



wierd it works now :) sent file
 
Last edited by a moderator:
OK, I received the file, and I can hear what you're talking about. It does appear to be a CPU-speed issue. This is a very ornate MIDI file, and the GP2X has no native floating-point support so it does have a hard time with MIDI synthesis.

Edit the file pykaraoke/settings.dat on your GP2X, and change the line "CPUSpeed_kar = 200" to "CPUSpeed_kar = 240" or even higher if you want to overclock (and your box can take it). That seems to help for me. You can also try reducing the sample rate in "MIDISampleRate = 12000", but then the music starts to sound bad for other reasons.

There's still a bit of popping when the lyrics scroll. Maybe I can improve this a bit further in code.

David
 
hi

changing cpu speed to 240 does improve it a little - will try it with 250.

thanks for your help!
 
I can set mine as high as 280. Some chips will go higher than others; you'll know you've reached your limit if it locks up when you pick a song. When that happens, just turn it off and set it lower.

Other things that seem to help a tiny bit include setting MIDISampleRate = 11025 and BufferMs = 250 .

David
 
drwr said:
I can set mine as high as 280. Some chips will go higher than others; you'll know you've reached your limit if it locks up when you pick a song. When that happens, just turn it off and set it lower.

Other things that seem to help a tiny bit include setting MIDISampleRate = 11025 and BufferMs = 250 .

David
Gonna figure out something. Last Thursday, I was going to host a Karaoke party, but didn't have a proper cord for tv, another person took over. Aside from that, was worried that there might be a particular song someone wanted to sing, but a few of them had studders. So, would be good to take some time out and figure this out the right way. Wanted to represent Gp2x! :p
 
Last edited by a moderator:
I'm changing the default kar CPU to 240 and the default MIDI sample rate to 11025. And here's the text I'm adding to the README on this topic:
QUOTE
GP2X: STUTTERING MIDI FILES

The GP2X has no hardware to perform MIDI synthesis, so it must perform
this work on the CPU (it uses the Timidity software MIDI player to do
this). Unfortunately, Timidity requires lots of floating-point
calculations, and the GP2X also lacks hardware to perform
floating-point arithmetic, so this kind of work is hard for the GP2X
to do. Consequently, MIDI playback requires a lot of CPU power.

The default parameters that ship with PyKaraoke are sufficient to play
most MIDI karaoke files acceptably well. You may, however, come
across the occasional MIDI file that gives the GP2X a hard time. This
is especially likely if the MIDI file uses lots of voices
(simultaneous notes), with complex patches (timbres), like strings or
trumpets or certain percussion instruments. You will know you have
found a MIDI file like this when you hear it stutter and appear to
slow down a little bit, as it plays through the difficult passages.

You have several choices in this case.

(1) Edit your settings.dat file (described above) and change the line:

CPUSpeed_kar = 240

To some higher value, such as 260 or higher. This means you are
overclocking your GP2X's CPU, asking it to run faster than its
certified maximum speed. This won't hurt your CPU, but it might
fail to work--different chips have different effective maximum
speeds, and the only thing that the CPU manufacturer guarantees is
that all of them can do at *least* 240 MHz. Most can also do 260,
some can do 280, and a lucky few can go as high as 300 reliably.
If you ask for a speed your particular CPU can't do, your GP2X
will freeze up when you start to play a song; if this happens,
simply reset it (turn it off) and set this value lower until it
doesn't freeze up any more.

(2) Edit your settings.dat file and change the line:

MIDISampleRate = 11025

To some lower value, such as 5512. This will reduce the sound
quality of the instruments, but it will be easier for the GP2X to
play it at full speed. (The song will just sound uniformly bad
instead of bad in places.)

(3) Use a MIDI editor program (there are many free programs available)
to simplify your troublesome .kar files. Either delete some of
the tracks, or change their patches to something simpler, like
piano or flute. Or even just delete a few notes out of the
more complex passages.

(4) Use PyKaraoke (on your PC) to convert your troublesome .kar files
to AVI format. See CONVERTING CDG/KAR TO MPEG, above. The new
AVI files will be a *lot* bigger than the original KAR files, but
they should play without popping.

(5) Use some other third-party software to convert your troublesome
.kar files to CDG+MP3 format. These will not be nearly as large
as AVI files (though still larger than the original KAR), and they
will be easier for PyKaraoke to play. However, there don't appear
to be any free tools that will make this conversion. Prepare to
spend some money.

(6) Simply remove the troublesome .kar files from your database and
forget about them. Look for simpler versions to replace them if
desired; many songs have multiple versions on the internet.
 
Great news! I found some more internal config options for Timidity that I'd evidently forgotten to include in previous releases. When I build the new GP2X release with these options enabled, MIDI performance is much, much better. In fact, I'm able to play the troublesame .kar file at only 200 MHz without any stuttering.

I'm removing the long README note quoted above. We should have a new 0.6 release available in the next couple of days; when we do, it should solve these stuttering problems out-of-the-box. No need for extreme measures like editing down your MIDI files.

David
 
drwr said:
Frank P said:
Yes, all of my files are in KAR format. I thought it was a cpu issue too. Some of the KAR files would play normal, slow down, then speed up again.
Hmm, that's a little different. If you mean the tempo of the song is changing unexpectedly, that's not a CPU issue, but some problem with MIDI interpretation. It might indicate a flawed kar file. Can you play the same files on a Linux or Windows PC?

QUOTE

Should I use a different format?


The kar format should work well. There are, however, some bug fixes in the upcoming release. When we get this out, we'll see if it addresses your issues.

David


I played them in Windows and it worked fine. You may have a point with the interpretation.
 
Last edited by a moderator:
We just officially released PyKaraoke version 0.6, which I believe should solve this problem nicely. Some compromises do remain on certain MIDI files; you may or may not find these compromises objectionable or even notice them.

Please try it out. You can download the latest from SourceForge, here: pykaraoke-0.6-gp2x.zip

David
 
Back
Top