473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Spectrogram in C++

Hi,
I am working in a project of computer vision, but I have problem...

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.

Thanks,

Nov 26 '06 #1
1 4836
<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
Nov 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Luna Moon | last post by:
seeking highly efficient caches scheme for demanding engineering computing? HI all, To same the time of costly function evaluation, I want to explore the possibility of caching. Suppose in...
16
by: mike3 | last post by:
(I'm xposting this to both comp.lang.c++ and comp.os.ms- windows.programmer.win32 since there's Windows material in here as well as questions related to standard C++. Not sure how that'd go over...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.