Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
I'm looking for some way how to get signal intensity at given frequency from audio input every second. I found waveIn functions but I have no idea how to get these parameters.

Thank you
Posted
Comments
Sergey Alexandrovich Kryukov 23-Apr-14 16:20pm    
What's on input? What's the problem?
—SA
Meldir 24-Apr-14 9:51am    
On input will be signal from VLF receiver, I need to catch frequency from 15kHz to 40kHz. Intensity is from -80 to -20dB. I need to make some function that returns signal intensity at given frequency in real time.
Sergey Alexandrovich Kryukov 24-Apr-14 11:58am    
Thank you for clarification.
—SA

1 solution

What you need is called spectrum analysis. The mathematical background is called Fourier transformation, which can't be implemented directly on a finite machine, but has many restricted implementations, like DFT and FFT. I suppose FFT is the keyword you are looking for. See this explanation: http://www.altdevblogaday.com/2011/05/17/understanding-the-fourier-transform/[^]

You could use NAudio[^] if you would use c# for example.

For MFC check these:
Fast Fourier transform using DX11[^]
http://blogs.msdn.com/b/nativeconcurrency/archive/2011/11/15/fast-fourier-transforms-fft-on-the-gpu.aspx?Redirected=true[^]

But first of all, this one: FFT of waveIn audio signals[^]
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 23-Apr-14 16:21pm    
Good answer, only a bit premature; it would be better to wait for the OP's explanation on what's on input. Anyway, a 5.
—SA
Meldir 24-Apr-14 9:35am    
On input will be signal from VLF receiver, I need to catch frequency from 15kHz to 40kHz. Intensity is from -80 to -20dB. I need to make some function that returns signal intensity at given frequency in real time.
Bernhard Hiller 24-Apr-14 3:58am    
My 5. But I fear that OP does not understand how to receive samples from WaveIn...
Meldir 24-Apr-14 9:37am    
You are right, I found that it has some buffer but I have no idea how access it's data.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900