I need to write a function in C++ that does the following:

-Reads an audio file as input (preferably in Mp3 format).
-Calculates the average frequency (Hz) and the tempo (bpm) of that file.
-Stores the average frequency and tempo for future use.

Any idea on how to write such a function? Thanks.

Recommended Answers

All 3 Replies

Learn C++, learn the format of selected file type, study endless audio algorithms till you go blind.

Learn C++, learn the format of selected file type, study endless audio algorithms till you go blind.

I was studying audio manipulation algorithms for more than a month now. With all the available code being extensive and thorough to cover all aspects of audio processing, it's really difficult to find the piece of code that I need in such massive algorithms.

At this rate, I will be going blind soon. Not expecting a full code from anyone, just hoping for pointers in the right direction. For startes, how do you open an mp3 file in C++ or VB.NET?

For startes, how do you open an mp3 file in C++ or VB.NET?

like this:

ifstream infile ("Never_Gonna_Give_You_Up.mp3", ios::in|ios::binary);

Next I would start by reading out the header, which would be the 'simple' part of the program

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.