Head-Fi.org › Forums › Equipment Forums › Computer Audio › programming involving FLAC
New Posts  All Forums:Forum Nav:

programming involving FLAC

post #1 of 2
Thread Starter 
I'm wanting to get waveform data out of a flac file with some fancy programming, preferably in C++ or python. I want to take this waveform data and basically code myself a spectrum analyzer that can tell me the dB value of different frequencies.

Why? because I plan to use this for an arduino/visualizer project in the future. Trying to build a spectrum analyzer that can pipe its data to a hardware project. The hardware project will either use LED's to display the value, or do other fancy things with those numbers. Essentially, I'm trying to flex my programming and hardware muscle by doing both oscilloscope and spectrum data from a flac file.

Unfortunately, i dont understand a single lick of what FLAC has documented in their API, and I'm unable to find how FLAC stores data in the first place. I'm gonna take a look at audacity's source code but my programming skills arent quite high enough to understand a lot of that. I can just barely program classes using c++, so my knowledge is rather basic.

Any help in finding documentation and whatnot will be greatly appreciated.
post #2 of 2

I think that the flac format is not a key problem in this project since it's the music stream that your will analyze and it will be the same process for any music format.

 

Here is the documentation about the c++ flac lib.

 

http://flac.sourceforge.net/api/index.html

 

Also, this guy did a spectrogram in c++ out of mp3 file, just swap the mp3 decoding with the flac decoding it should work (I don't go through all his code so maybe more tweak than just a simple stream swap is needed).

 

http://www.asawicki.info/news_1385_music_analysis_-_spectrogram.html

 

New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Computer Audio
Head-Fi.org › Forums › Equipment Forums › Computer Audio › programming involving FLAC