Re: [pygame] noob questions about creating and playing sounds

2009-07-22 Thread Jake b
For the crackle, are you using the latest version of pygame? I know a certain version had problems on win32. On Wed, Jul 22, 2009 at 12:32 AM, Ian Mallett geometr...@gmail.com wrote: Hi again, Hmmm, the note of your original approach is the same, but the timbre is different. Mine matches a

Re: [pygame] noob questions about creating and playing sounds

2009-07-22 Thread Jerzy Jalocha N
On Wed, Jul 22, 2009 at 12:46 PM, Jake bninmonk...@gmail.com wrote: For the crackle, are you using the latest version of pygame? I know a certain version had problems on win32. I am using: * Pygame 1.8.1 * Python 2.6.2 * Xubuntu 9.04 Jaunty Jackalope * Linux 2.6.28-13.45 * ALSA 1.0.18 It

Re: [pygame] noob questions about creating and playing sounds

2009-07-22 Thread Ian Mallett
On Wed, Jul 22, 2009 at 10:25 AM, Jerzy Jalocha N jjalo...@gmail.comwrote: I am using: * Pygame 1.8.1 * Python 2.6.2 * Xubuntu 9.04 Jaunty Jackalope * Linux 2.6.28-13.45 * ALSA 1.0.18 I am using PyGame 1.8.1 Python 2.5.4 Vista (Win32)

Re: [pygame] noob questions about creating and playing sounds

2009-07-21 Thread Ian Mallett
Hi again, Hmmm, the note of your original approach is the same, but the timbre is different. Mine matches a sine wave made with Audacity for tone. I notice mine has less crackle than the original--but it's still there. The issue then is that crackle... I thought the issue might be the buffer

[pygame] noob questions about creating and playing sounds

2009-07-20 Thread Jerzy Jalocha N
Hi, I am starting to experiment with Pygame and how to generate sounds and play them back. Here is a code snippet, the full (working) code is below. def play_maxtime(sound, duration): sound.play(loops=-1, maxtime=duration) pygame.time.delay(duration) I have a few questions about this:

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Yanom Mobis
code gets all gibberishy in the message itself attatch the .py file(s) to the message From: Jerzy Jalocha N jjalo...@gmail.com To: pygame-users pygame-users@seul.org Sent: Monday, July 20, 2009 8:44:45 AM Subject: [pygame] noob questions about creating

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Jerzy Jalocha N
On Mon, Jul 20, 2009 at 9:55 AM, Yanom Mobisya...@rocketmail.com wrote: code gets all gibberishy in the message itself attatch the .py file(s) to the message Oops, sorry, I didn't know that! I forgot to mention, that I am running Python 2.6.6 under Linux. I can provide further information if

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread James Paige
On Mon, Jul 20, 2009 at 09:44:45AM -0400, Jerzy Jalocha N wrote: Hi, I am starting to experiment with Pygame and how to generate sounds and play them back. Here is a code snippet, the full (working) code is below. def play_maxtime(sound, duration): sound.play(loops=-1, maxtime=duration)

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Paulo Silva
just a question: afaik, since Pygame uses SDL, Pygame only can play sounds were loaded, and the only way to 'create' (one of the questions of this mailinglist post) sounds is writing binary data into a .raw file, and calling SoX for converting it as .ogg, .wav, etc.? On 7/20/09, Jerzy Jalocha N

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Ian Mallett
On Mon, Jul 20, 2009 at 6:44 AM, Jerzy Jalocha N jjalo...@gmail.com wrote: def play_maxtime(sound, duration): sound.play(loops=-1, maxtime=duration) pygame.time.delay(duration) I have a few questions about this: * Why is it that play_maxtime doesn't work without the time.delay?

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Jerzy Jalocha N
def play_maxtime(sound, duration):     sound.play(loops=-1, maxtime=duration)     pygame.time.delay(duration) I have a few questions about this:  * Why is it that play_maxtime doesn't work without the time.delay? When I remove the delay line, no sound is played, despite the use of the

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Jerzy Jalocha N
On Mon, Jul 20, 2009 at 11:52 AM, Paulo Silvanitrofur...@gmail.com wrote: just a question: afaik, since Pygame uses SDL, Pygame only can play sounds were loaded, and the only way to 'create' (one of the questions of this mailinglist post) sounds is writing binary data into a .raw file, and

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Ian Mallett
.play() with no arguments just plays the whole sound once. I fixed the problem, I think. The issue is in the way the sound is created. There's sometimes a bit of static-ey stuff in there on my system which I don't have time to track down right now. Hope it helps, Ian #! /usr/bin/env python

Re: [pygame] noob questions about creating and playing sounds

2009-07-20 Thread Jerzy Jalocha N
I fixed the problem, I think. The issue is in the way the sound is created. There's sometimes a bit of static-ey stuff in there on my system which I don't have time to track down right now. Hope it helps, Thank you, Ian, for the correction. You are right, that my math was not correct. I was