Unscruffed
Programmer
A very generalized title, but quite frankly I'm lost altogether with this.
Here's what I want to do: Monitor the soundcard input, analyze it, and get the frequency of the input signal in Hertz (as a Double).
All the reading I've done seems to point to using FFT to acomplish this. However all the code samples I find, seem to be based around spectrum analyzers or displaying data in other similar ways. I can't find any examples of how to simply get the frequency of the signal.
The code I have for monitoring the soundcard input returns a buffer via an event (as an array of Integers) every 100 milliseconds or so. But I have no idea of how to analize this buffer.
I've looked at tons of code examples from PSC and elsewhere, but they are all far more complex than what I need, and are so poorly documented and/or formatted to the extent that I can't even follow the flow of the code to be able to learn anything at all from them.
Can anyone help out with a basic example of how to achieve what I'm trying to do?
The buffer is 1 channel @ 22050 sample rate, and is provided via an event as follows:
Thanks in advance for any help.
Edit:
FYI, the monitoring is done using a WaveRecorder class (which I got from an example on PSC from memory).
It uses the waveIn... functions in WINMM.dll. DirectX is not used at all.
Here's what I want to do: Monitor the soundcard input, analyze it, and get the frequency of the input signal in Hertz (as a Double).
All the reading I've done seems to point to using FFT to acomplish this. However all the code samples I find, seem to be based around spectrum analyzers or displaying data in other similar ways. I can't find any examples of how to simply get the frequency of the signal.
The code I have for monitoring the soundcard input returns a buffer via an event (as an array of Integers) every 100 milliseconds or so. But I have no idea of how to analize this buffer.
I've looked at tons of code examples from PSC and elsewhere, but they are all far more complex than what I need, and are so poorly documented and/or formatted to the extent that I can't even follow the flow of the code to be able to learn anything at all from them.
Can anyone help out with a basic example of how to achieve what I'm trying to do?
The buffer is 1 channel @ 22050 sample rate, and is provided via an event as follows:
Code:
Private Sub WaveMonitor_GotData(Buffer() As Integer, Length As Long)
' What to do here?
End Sub
Thanks in advance for any help.
Edit:
FYI, the monitoring is done using a WaveRecorder class (which I got from an example on PSC from memory).
It uses the waveIn... functions in WINMM.dll. DirectX is not used at all.