[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Screeching, Howling Garbage in One Ear pygame.sndarray



On 5/4/06, andrew baker <failrate@xxxxxxxxx> wrote:
I'm trying to build a stereo tone generator module.  It sort of works, but
I'm getting hellacious garbage noise in the left channel.

Not sure what I'm doing wrong here.  Wrong scale of numbers?  Wrong array
format?  I'm quite stuck at the moment.  Someone please educate me.

I'm too lazy to try to install Numeric to test, but I'd guess that one
problem is the numeric array might be defaulting to 32-bit int, which
probably wouldn't be good

maybe try:
   return Numeric.array(out, Numeric.Int16)

or:
              channels[0].play(pygame.sndarray.make_sound(tone6().astype(Numeric.Int16))

???