I'm trying to create a .wav file using scipy.io.wavfile.write(), but the result is a noisy wav file, I have tryed with iNotebook with the same result, here is the code:
import numpy as np
from scipy.io import wavfile
x= np.arange(25600.0)
sig= np.sin(2*np.pi*(1250.0/10000.0)*x)
def makewav(data,outfile,samplerate):
wavfile.write(outfile,samplerate,data)
makewav(sig,'foo.wav',44100)
It happens only when I try to generate pure tones. Any problem when reading the .wav whith scipy.io.wavfile.read() and writing again with scipy.io.wavfile.write().