Esempio n. 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
Esempio n. 2
0
 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)