python - I need to convert to a wave file -
here work yet.
import matplotlib.pyplot plot import numpy num def xr(start, stop, step): while start < stop: yield start start = start + step wavef = lambda x: num.sin(x)/x t0 = [wavef(x) x in xr(5.0,200.0,0.1) if x not 0] plot.plot(t0) plot.show()
python has wave module wave — read , write wav files .
an example of how use write function data wav file given here, create synthetic 'sine wave' wave file , how make simple .wav file python.
you use audiolab .
as using numpy, use numpy.linspace or numpy.arange instead of xr function. like,
x = num.arange( 5.0, 200.0, 0.1 ) wavef = num.sin(x)/x
Comments
Post a Comment