Thank you for your replies: Dan, Greg, Inigo, and Ian
I changed the sound buffer size and it helped a lot. I verified that there
was no empty space in the loop with Audacity. I changed the program to queue
the next sound on the key press events and play the queued sound when the
previous sound end
Brian Gryder wrote:
There is a
noticeable lag between the key press events and the sound changes.
Have you tried reducing the size of the sound buffer? It seems
that the pygame mixer can only start a sound on a buffer
boundary, so for accurate sound timing you need quite a small
buffer size.
Shavais Z wrote:
it seems weird to me that while
there is this "Python" menu up there with a "Quit" option that actually
works, when you click it, but the advertised shortcut key (Option Q) for
it doesn't work.
+1 from me on fixing this too... it's really quite lame.
For some reason, the who
I had the same problem in ubuntu... and I think it's yours
There appears to be some problem with pygame (SDL) and ALSA
It worked changing ALSA with pulseaudio... but it was a uggly
solution I've found this one too:
http://ubuntuforums.org/showthread.php?t=429258
But I haven't te
If possible, make the buffer size even smaller. Also, check the sound file
itself to make sure there isn't any blank space in the beginning.
If I recall I had a lag in a game and solved it by loading the sound when the
game started rather than when the key was pressed.
In my case though, the sound file was small.
On Dec 12, 2010, at 10:09 AM, Brian Gryder wrote:
> """
> I am experimenting with playing/changing drum loops with pygam
"""
I am experimenting with playing/changing drum loops with pygame. In the
program below, beat1.wav is played when the up arrow key is pressed and
beat2.wav is played when the down arrow key is pressed. There is a
noticeable lag between the key press events and the sound changes. I am
running the
Hello, and thanks for looking at this. I hope you have patience for a
pygame newbie..
I'm using Mac OS 10.6, python 2.6.6, and pygame 1.9.1. I got this slightly
modified sample working:
[code]
import sys, pygame
pygame.init()
size = width, height = 320, 240
speed = [4, 4]
black = 0, 0, 0
back