[SciPy-user] playing numpy arrays on a soundcard

Christopher Brown c-b@asu....
Tue May 27 17:58:17 CDT 2008


Hi List,

There was a problem building pyaudiere on windows, caused by a docstring 
that was too long for the ms compiler. I added the docstrings from home 
over the weekend on my linux machine, and didn't get to test it until 
today. Sorry about that. This has been corrected.

There is now a windows installer and a zip file of the source, available 
here:
http://pal.asu.edu/packages/pyaudiere-0.1.win32-py2.5.exe
http://pal.asu.edu/packages/pyaudiere-0.1.zip


And for a straight up analog to matlab's wavplay, try this:

def wavplay(buff, fs, pan=0):
   import audiere
   from time import sleep
   d = audiere.open_device()
   s = d.open_array(buff,fs)
   s.pan = pan
   s.play()

   while s.playing:
     sleep(.01)

-- 
Chris


More information about the SciPy-user mailing list