<se*****@gmail.comwrote:
I need an application written in C++ that converts an audio file (i.e.
wav..) in a spectrogram (png, jpeg or something).
I have found an application called "spectromatic" written in C that
works in Linux, but i have tried to port it in Windows (I am working
with Visual C++) and it doesn't work, I dont know why. I suppose that
the problem lies in the GSL library for Win32, but I'm not completely
sure.
>Could you give me some ideas? I don't know where to search that.
>I know, I can use Matlab for doing it, but I need to do that in C++
language.
You should separate the problem into two parts: first, windowing
the data and computing its power spectral density (PSD); then, creating
the output graphic.
Since you say you know how to do it in Matlab, perhaps a
first step would be to code the PSD part of it in Matlab
(using basic arithmetic and math operations, not complicated
library functions), and then translate this manually into C++.
In C++, use any of the math functions in <cmathsince these
are standard. By comparing the two versions, and doing a quick
Matlab plot of the output, you will be able to determing if
the algorithmic part of your C++ program is correct.
Then, it remains to translate your PSD data into a graphic. Since
C++ does not have built-in graphic primitives, the question is
beyond the scope of this newsgroup but perhaps others will have
graphics library suggestions. (Personally, I use either Matlab
or Excel for plotting, but if you want something integral to
your C++ program, you'll need to use a library.)
Steve