Audio Analyse library

Hi,

i want to write an App for Android that can analyse Audio. There is no need for Speech recognition, i'm more interested in bpm, frequency,... values from music.

I'm new to Android development and audio, but i know c++ well. Any recommendations for an library i can use?
Someone else might have better thoughts but when it comes to analyzing audio, but one think you're definitely going to want is to use the Fast Fourier Transform to analyze the frequency domain.

Libraries that can do this include FFTW (Fastest Fourier Transform in the West)
http://fftw.org
Type in [FFT library][Your language here] on a search engine for alternatives (or possibly implement it yourself, but this is complex).

There might be higher-level libraries, but I don't know of any off the top of my head.
Last edited on
Thank you. I'll have a closer look on it later. First i'm looking for a library that allows me to access the audio data.
It won't be a big problem to me to implement it by myself, since i'm studding electrical engineering that contains digital signal processing. I already implemented FFT with matlab and worked with silexica to parallelize such an algorithm. But if there is a ready to use library it saves a lot of time :D
First I'm looking for a library that allows me to access the audio data.

For sample rate and format conversions (to raw LPCM, e.g.), I found ffmpeg basically indispensable for a similar project.
https://ffmpeg.org/

It's a pretty heavyweight tool, but it is certainly possible to trim it down at compile-time. I've also heard good things about libsamplerate, but not used it (directly) myself.

FFTW3 seems pretty good too, if a little challenging to set-up. But my requirements were quite simple.
Last edited on
I'd say fftw is easier to set up than ffmpeg (unless you're just referring to the pre-built utility), due to ffmpeg's dependencies and vast configuration options (that was hell to compile on windows). But fftw of course knows nothing of actual audio files, it just knows how to take the FFT of an array of a data.

I already implemented FFT with matlab
Funny you mention matlab, as matlab uses fftw for its fft functionality.

Other audio file formats are more complicated, but uncompressed WAV is pretty simple to work with to dip your toes in the water. You can make your own code by studying the file format of PCM WAV files, or use a library such as https://github.com/adamstark/AudioFile
For more-complicated formats like mp3, ogg, etc. either search for libraries encoding/decoding that particular format type, or see if ffmpeg can handle it.
https://ffmpeg.org/download.html#get-sources

When you build your own code that uses ffmpeg, you link with the individual libav* libraries.
Last edited on
I'd say fftw is easier to set up than ffmpeg
Yeah, I absolutely agree. ffmpeg is notoriously hard to build.
Topic archived. No new replies allowed.