[SciPy-User] Making sweep wave with numpy/scipy

otrov at hush.ai otrov at hush.ai
Tue May 10 08:58:35 EDT 2011


Hello community :)

I hope my question is not too trivial, as I joined just to ask it 
:D but I guess many have answer to it, nonetheless

I can tell Python how to make sine wave file (from examples 
provided elsewhere):

----------------------------------
import numpy as np
from scikits.audiolab import Sndfile

s = np.sin(2 * np.pi * 1000/44100 * np.arange(0, 44100 * 2))

f = Sndfile('foo.wav', 'w', 'wav', 2, 44100)

f.write_frames(s)
f.close()
----------------------------------

but I have no idea how to make sweep wave, let's say from 10 Hz to 
22 KHz in 10s

Can someone provide solution, please?


Thanks in advance




More information about the SciPy-User mailing list