maxsap
maxsap

Reputation: 3001

android how to calculate beats per minute

I would like to record from the device microphone and then be able to calculate the beats per second of the recorded audio, is it possible and how? is there any open source project I can look?

Upvotes: 0

Views: 1772

Answers (2)

Jose R. Zapata
Jose R. Zapata

Reputation: 779

Essentia C++/Python library provides several beat tracking algorithms:

http://essentia.upf.edu/documentation/reference/std_RhythmExtractor2013.html

This is the algorithm publish in: J.R. Zapata, M. Davies and E. Gómez, "Multi-feature beat tracker," IEEE/ACM Transactions on Audio, Speech and Language Processing. 22(4), pp. 816-825, 2014.

The Matlab implementation of the multifeature beat tracker is: https://github.com/JoseRZapata/MultiFeatureBeatTracking

Upvotes: 1

Stéphane
Stéphane

Reputation: 6905

To record music from the microphone, use the MediaRecorder and store the sample (a few seconds should be enough).

Finding the beats is trickier, there is a nice explanation at GameDev, but if you have no background in signal processing it will not be easy.

You might also have to use native libraries to get nice and fast implementations of FFTs (search here)

See also this related question : c++ FFT Beat detection library?

Good luck!

Upvotes: 0

Related Questions