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

Nicolau Werneck nwerneck at gmail.com
Tue May 10 09:05:32 EDT 2011


call your arange "t", then try using a quadratic expression instead of
linear.

What are you using this sweep for?... Many people choose it when
trying to measure transfer functions, but there are much better
alternatives, like Aoshima's Time Stretched Pulse. If that is your
case, try looking for it!

++nic


On Tue, May 10, 2011 at 02:58:35PM +0200, otrov at hush.ai wrote:
> 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
> 
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

-- 
Nicolau Werneck <nwerneck at gmail.com>          C3CF E29F 5350 5DAA 3705
http://www.lti.pcs.usp.br/~nwerneck           7B9E D6C4 37BB DA64 6F15
Linux user #460716
"A huge gap exists between what we know is possible with today's machines and what we have so far been able to finish."
-- Donald Knuth




More information about the SciPy-User mailing list