How To Read A Musical File Using Python And Identify The Various Frequency Levels Of The Notes?
please help me with the python...this is my project topic...
Solution 1:
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.
Post a Comment for "How To Read A Musical File Using Python And Identify The Various Frequency Levels Of The Notes?"