please help me with the python...this is my project topic...
views:
103answers:
1
+1
A:
Fourier transforms. Learn some basics about music and signals before even considering code.
Basic Outline:
Audio Import
See http://wiki.python.org/moin/Audio/ and find one that will import your (unspecified) file.
Analysis
Get numpy
.
>>> from numpy.fft import fft
>>> a = abs(fft([1,2,3,2]*4))
>>> a
array([ 32., 0., 0., 0., 8., 0., 0., 0.,
0., 0., 0., 0., 8., 0., 0., 0.])
We can clearly see the DC component at 0, then the major AC component at fs/4
and 3*fs/4
due to this being a real signal, as all frequency components are mirrored over the X-axis.
Nick T
2010-08-31 16:04:10
No, FFT is not needed here.
duffymo
2010-08-31 16:07:34
i know it is to be done by applying FFT...just got a vague idea about the conversion also...but i need code urgently...
ria
2010-08-31 16:07:53
No, you don't need FFT for pure tones. See my answer. And don't ask for code - that's your job.
duffymo
2010-08-31 16:09:49
@duffymo - How do you know if FFT is needed or not, when the file format has not been specified?
mbeckish
2010-08-31 16:26:18
I don't know, because the file format has not been specified. But then neither do you. We've both staked out our positions: mine is pure tone, yours is continuous time series of amplitudes.
duffymo
2010-08-31 17:05:51
well its not a pure tone...n of course FFT is needed...
ria
2010-08-31 17:16:28
thank you duffymo...but if it was a pure tone...how wud it have been done?could you please tell me dat?
ria
2010-08-31 17:20:13
Not until you provide more details, reema. Go do your own homework.
duffymo
2010-08-31 17:22:04
ok just tell me what all details u need....i have tried a lot myself...nothing worked...if you could help me with it...
ria
2010-08-31 17:28:41
@reema Updated answer. 1) import audio, 2) run FFT
Nick T
2010-08-31 17:56:43
@Nick T...could u give me a solution for this, without using audiolab?
ria
2010-09-02 13:53:51