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

2009-07-22 Thread Jerzy Jalocha N
On Wed, Jul 22, 2009 at 1:53 PM, Ian Mallett wrote: > Curiously, I once made a sound synthesizer using Numeric and sndarray, here: > http://geometrian.com/Programs/Waves2Source.zip.  It doesn't have any > problems.  It looks like it computes the sine wave point by point with a > list, then changes

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 b 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 would be interestin

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

2009-07-21 Thread Jerzy Jalocha N
with similar needs. This code example was adapted from the following source: http://www.google.com/codesearch/p#dOPNNT5w2nY/svn/collective/funittest/trunk/doc/src/soundout.py On Mon, Jul 20, 2009 at 9:44 AM, Jerzy Jalocha N wrote: > Hi, I am starting to experiment with Pygame and how to gener

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 w

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

2009-07-20 Thread Jerzy Jalocha N
>>  * 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 maxtime argument. > > Make sure you aren't calling it repeatedly.  I once had a problem like this > that was solved by not calling the sound repeated

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 Silva 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 calling SoX for conve

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

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 Mobis 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 necessary. #! /usr/bi

[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: *