#
# sndline.py
# (c) Neil Gershenfeld 2/10/08
# sonify sin(x)/x with pygame
#

from pygame import mixer,sndarray,time
from Numeric import *

t = arange(-1000,1000,.1)
y = 30000*sin(t)/t
mixer.init(11025,-16,0)
snd = sndarray.make_sound(y.astype(Int16))
snd.play()
while mixer.get_busy():
   time.wait(100)
