[SciPy-User] Convert a time-frequency array to sound file
Mon Feb 15 07:52:31 CST 2010
On Mon, Feb 15, 2010 at 8:35 AM, Yannick Copin <email@example.com> wrote:
>> You could just take the inverse fourier transform of each spectra and then
>> just patch them end to end, but I suspect this will end up sounding pretty
>> awful as you'd get lots of phase discontinuities at the end of each
>> segment. A better strategy might be to generate a continuous sin wave for
>> each frequency (with a good number of samples per segment), multiply each
>> of these sin waves by the corresponding, interpolated, spectral amplitude,
>> and then sum over the different frequencies.
>> This should be easy enough to do with the standard numpy functions.
> Thanks for the tips. Alas, I guess I have to conclude that such a conversion
> procedure does not already exist...
Wav sound files (scipy.io.wavfile)
write (filename, rate, data) Write a numpy array as a WAV file
I don't know what this does, I'm just browsing the docs.
Disclaimer: I don't know anything about sound processing
> .~. Yannick COPIN (o:>* Doctus cum libro
> /V\ Institut de physique nucléaire de Lyon
> // \\ Université de Lyon - CNRS-IN2P3
> /( )\ AIM: YnCopin ICQ: 236931013
> ^`~'^ http://snovae.in2p3.fr/ycopin/
> SciPy-User mailing list
More information about the SciPy-User