 |
|
 |
I'm trying to implenet a high pass filter how did you do it? can you give me some relevent documentation all i found was not that relevent to sound analysis
|
|
|
|
 |
|
 |
I am able to get the audio from wavOut class and process them to get the various displays. But there is a lot of noise. How do I reduce it? Also, the Time Domain Display does not show any significant variation of amplitude. Any way out?
|
|
|
|
 |
|
 |
How can I change the source to line-out instead of line-in and display the results in the same way?
|
|
|
|
 |
|
 |
Is it possible to change the source to an existing wav file? or alternately, capture the sound as it is being played by the system?
|
|
|
|
 |
|
|
 |
|
 |
Could you give me some directions to input the wav file data to the program instead of the inline mic? I can get the format of the file. But thereafter, how do I get the audio frames of the file input for FFT?
Also, is it possible to do band pass filtering in this code?
|
|
|
|
 |
|
 |
To make a band pass the filter, simply put the FFT with the value zero on the frequencies that you don't wish. For example, if you want the human voice (it's more and less 130-1100Hz). You can convert to Hz using the scaleHz on the values of the FFT array.
To get the audio frames you will have to do the inverse of the FFT calculated (IFFT).
I want this as well :P If he answers me or you find out, please post here.
aF was here -.-
|
|
|
|
 |
|
 |
Did you manage to change the source to an existing wav. file?
if you do can you please give me details how to do this procedure ?
|
|
|
|
 |
|
 |
Hi!
There is a huge mistake in the source!
Exactly we have bug in Form1.cs file in the function "private void Start()":
-String, that was written by author:_waveFormat = new WaveFormat(_audioFrameSize, _audioBitsPerSample, _audioChannels);
Generally, we have "bad" sampling rate exactly due to error in WaveFormat - call, such that the first argument should be sampling rate (public WaveFormat(int rate, int bits, int channels))
!!!We should use string like: -String, that was written by author:_waveFormat = new WaveFormat(_SamplingRate, _audioBitsPerSample, _audioChannels);
So, guys... all the problems about "Error in Frequency domain" are being solved (I think so).
|
|
|
|
 |
|
 |
Glad to hear you are doing well.
Did this solve your issue?
|
|
|
|
 |
|
 |
Thank You (and for a good source too)!
Sure
I am completely solve my issue)
|
|
|
|
 |
|
 |
Hi Jeff
I'm using vista 64bit eddition and I can't get the program working
it always says device stopped polling seems its unable to start it in vista
do u hav any idea what is the cause of this problem??
|
|
|
|
 |
|
 |
I got it to work by changing the debug platform from to x86.
|
|
|
|
 |
|
 |
olny runs on 32 or 86 beacause it uses windows dll that aren't found in 64 just set the Solution platform to 32 or 86 and it will work.
|
|
|
|
 |
|
 |
u should go propertıes of program and from debug tab make x86 cpu then ıt ll work ..
|
|
|
|
 |
|
 |
i got the same problem running it on Windows 7 Home Premium 64-bit...
how do i solve this? please help... thanks... :3
|
|
|
|
 |
|
 |
I have spectrum signal and i want to play it's sound,
how can i do it????
modified on Monday, August 3, 2009 3:33 AM
|
|
|
|
 |
|
 |
This is really greate code you did.
It seems however the program cannot find playback devices. Is it on purpose or is it my hardware/drivers?
I need to detect certain characteristics of sound made by another program. It would be great if I could capture straight from playback.
Thank you
|
|
|
|
 |
|
 |
I never added this functionality since I was primarily interested in microphone input.
Adding this to the existing code should be straightforward.
|
|
|
|
 |
|
 |
Hi, i've been testing your project and i've to say that is very nice, i've been looking for something like this sometimes.
I've been testing different "SamplesPerSecond" values, but when using values under 11025 ( minimum is 8000) it throws an exception.
The first thing i've seen is that the buffer size for AudioFrame.Process() methodmust be dividable by 4 (len % 4 = 0).
The second is that the FourierTransform.FFT() method throws an "Index out of range exception". I've been debubbing it and i found that in line 69
tr = xre[k + n2] * c + xim[k + n2] * s;
"k + n2" is absolutely out of range, about 100 positions over the limit.
Is there any bug or is not posible to plot frequencies under 11025Hz?
Note: i am plotting using:
public void init()
{
oAudioFrame = new AudioFrame(false);
oAudioFrame.IsDetectingEvents = true;
oAudioFrame.AmplitudeThreshold = 16384;
}
public void Plot()
{
oAudioFrame.Process(ref sound_data);
oAudioFrame.RenderTimeDomainRight(ref pb1);
}
|
|
|
|
 |
|
 |
I receive this in the status window when running the source code in Vista 64-bit:
4/22/2009 4:44:10 PM : Audio input device detected
4/22/2009 4:44:10 PM : Audio input device polling stopped
When I run the executable, I get an unhandled exception and it does the same as the source if I continue:
************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at SoundCatcher.FormMain.Start()
at SoundCatcher.FormMain.FormMain_Load(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
SoundCatcher
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Users/David/Documents/SoundCatcher/SoundCatcher.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3074 (QFE.050727-3000)
CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Any ideas?
|
|
|
|
 |
|
 |
This is a known issue with the wave library. Compile it using the x86 instruction set and it should work fine.
|
|
|
|
 |
|
 |
I'm not sure about this but I suspect there's a problem with your frequency spectrum. I've set your 'test' flag to true so that it works on a simple sine wave and the spectrum shows a dominant frequency with side content indicating the presence of other frequencies which simply aren't there. You should see a _single_ spike in the spectrum corresponding to the frequency of the sine wave being transformed. Otherwise, great job
|
|
|
|
 |
|
 |
What frequency? I think I may have corrected this in a later revision that I didn't post. It was a rounding error in drawing the wave if I remember correctly. I'll try to find the correction and post it here. Thanks for the constructive critcism.
|
|
|
|
 |
|
 |
I did have another thought I'll need to check...to get the single spike in the freq domain you'll need an integral number of sine wave cycles in your sample window otherwise you will see some other spurious frequency content (not sure if that is what we are seeing).
|
|
|
|
 |