[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] sndarray tutorial?




> sndarray is fairly new, i should put together a small tutorial or
> example for it.

I would like this very much.  I'd be happy to give you feedback on it if you
choose to work on one.

> i do have some code sitting on my hard drive, i've
> attached a simple one to create an 'echo' effect.

I've gotten it and modified the shebang line to load python2.1, the
mixer.Sound line to load a wav I have available, and the mixer.init to reflect
the sample rate of the wav file: mixer.init(44100, 16, 0)

When I run echo.py I get the following output:
$ ./echo.py
(44100, -16, 1)
SHAPE1: (88160, 2)
Traceback (most recent call last):
  File "./echo.py", line 25, in ?
    myarr[:length] = a1
ValueError: Object too deep for desired array

Am I doing something wrong here?

> i think the problem you are getting is due to Numeric v22. That new
> version of Numeric added several data types, and for some reason that is
> throwing off pygame's type detection. this is something i've really got
> to look into, but haven't done yet. if you can easily drop back to
> Numeric v21 that might solve the problem.

I'm running Debian Unstable, so I *think* running python 2.1 (with Numeric
2.1) is as easy as invoking the scripts with: #!/usr/bin/python2.1.  If I'm
being dense, I'd be happy to be told.

Thanks for the quick response; sorry to draw the conversation out.  I haven't
had time to play with the code until just now.

    Joe

-- 
Joseph Blaylock, UITS SC SysAdmin
blaylock@indiana.edu     855-5772

____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org