예제 #1
0
 def beep(freq, duration):
     samples = (sin(arrayrange(duration/1000.0 * samplerate) * (2 * pi * (freq / samplerate))) * float(1 << (bits - 2))).astype(Int16)
     snd = sndarray.make_sound(samples)
     snd.play()
     while mixer.get_busy():
         pass
예제 #2
0
파일: demo.py 프로젝트: dobbs/dobbse.net
 def __init__(self, window, data):
     Txq2dPlotWin.__init__(self, window)
     self.data = data
     self.x = arrayrange(float(data.xmax))
     self.setAxes(data.xmin, data.zmin, data.xmax, data.zmax)