V
V
Viktor Korovin2013-03-25 15:57:37
Python
Viktor Korovin, 2013-03-25 15:57:37

Get a list of frequencies from an mp3 file?

It is necessary to get a list of frequencies from an mp3 file for their subsequent processing.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
R
relgames, 2013-03-26
@relgames

en.m.wikipedia.org/wiki/%D0%9F%D1%80%D0%B5%D0%BE%D0%B1%D1%80%D0%B0%D0%B7%D0%BE%D0%B2 %D0%B0%D0%BD%D0%B8%D0%B5_%D0%A4%D1%83%D1%80%D1%8C%D0%B5
Google about fast Fourier transform and python.

@
@ntkt, 2013-03-26
_

1) To be honest, it is necessary to parse MPEG-frames and tear out the frequencies from each sample.
It will not be easy, like writing a decoder, and either will not help here, because. they often take out the actual encoding-decoding in the native code for the sake of speed.
Just one very slow pure python decoder was found right away - bitbucket.org/portalfire/pymp3
convert MP3 to WAV (PCM) with something, and then run an FFT over it (python + numpy + scipy), but then there will be no “list of frequencies”, there will be a frequency spectrum of the restored signal, in which there is very little valuable information.

I
igrishaev, 2013-03-26
@igrishaev

Compress mp3 to wav, which is easy to work with in Python: habrahabr.ru/post/113239/

A
Andrew, 2013-03-26
@xaoc80

You can make an FFT of the entire signal, and then select frequencies with more or less significant amplitudes (for example, select 100 frequencies) This can be done using fftw, a python port is available at launchpad.net/pyfftw/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question