 |
|
 |
Then it would be nice if you share it with us.
|
|
|
|
 |
|
 |
Hi all,
this is a question similar to the previous:
anybody knows how can we change the audioin device from microphone to an existing wav file so we can plot the spectrogram of this file and ignore any input from the microphone?
I've played around with the FormMain.cs line
"_recorder = new WaveInRecorder(Properties.Settings.Default.SettingAudioInputDevice, _waveFormat, Properties.Settings.Default.SettingBytesPerFrame * Properties.Settings.Default.SettingChannels, 3, new BufferDoneEventHandler(DataArrived));"
and tried to change the "Properties.Settings.Default.SettingAudioInputDevice" to an integer but didn't work. I guess is not that simple.
Thanks for a great code
plouvou
|
|
|
|
 |
|
 |
I am interested in processing wave file for spectrogram too. But I don't think it would be simple task to change input to wave file by changing a couple of code lines because (1) wave file can be different in sample rate, mono or stereo, and so on and (2) microphone input signal would be relatively very short but wave file can be huge. Nevertheless, I think it is still great reference for spectrogram in c#. Thanks the author for that.
I think it would be as simple as following.
1. read wave file - read header of the file in riff format and get info about samples. I believe there are several good articles showing a way to handle wave file.
2. pass samples from #1 into Process method in AudioFrame. I think it will additionally require more code changes according to the wave file header info, e.g., mono or stereo, sample rate, etc. Also you might have to change drawing routine as program might need to draw huge data.
|
|
|
|
 |
|
 |
I suggest checking here for posts - as there are few articles covering how does the wav file look like, from that you can easily build the thing you need
|
|
|
|
 |
|
 |
I am getting the spectrogram of wav files using the same classes. Only thing is that I am playing the wav file using DirectSound or SoundPlayer and then collect the audio from lineout using wavout class. It works, but there is a great amount of noise and the frequency domain display stops after about five minutes.
|
|
|
|
 |
|
 |
Hi,
I am doing project in C# . in which I have to draw waveform for existing .wav file and also explain if wave file have 2 channels
and also I have to edit that generated wave
how can i do this anybody can help plz
Thanks,
gauri
|
|
|
|
 |
|
 |
Jeff
Very great application. And thanks for sharing the code.
Here's my one point:
Try right click or left click on the window when it's running, you'll observe drawing delay.
That's because the events raised by the timers are in the same thread of UI.
You can use System.Timers.Timer to eliminate this delay, but graphic object need to be locked to avoid multithread issues.
|
|
|
|
 |
|
 |
Hi!
Lines 67 and 71 in the file AudioFrame.cs are both like this:
if (_waveLeft[h] > AmplitudeThreshold || _waveLeft[h] < -AmplitudeThreshold)
I assume that the line 71 should actually be like this:
if (_waveRight[h] > AmplitudeThreshold || _waveRight[h] < -AmplitudeThreshold)
Anyway, thanks for the useful article!
Atis
P.S. Below is the relevant fragment of the original code:
for (int i = 0; i < wave.Length; i += 4)
{
_waveLeft[h] = (double)BitConverter.ToInt16(wave, i);
if (IsDetectingEvents == true)
if (_waveLeft[h] > AmplitudeThreshold || _waveLeft[h] < -AmplitudeThreshold)
IsEventActive = true;
_waveRight[h] = (double)BitConverter.ToInt16(wave, i + 2);
if (IsDetectingEvents == true)
if (_waveLeft[h] > AmplitudeThreshold || _waveLeft[h] < -AmplitudeThreshold)
IsEventActive = true;
h++;
}
|
|
|
|
 |
|
|
 |
|
|
 |
|
 |
I'm an experienced and published telemarketing expert looking for a programmer as a partner. I'm interested in offering an anger detection service that would enable call centers to identify those calls involving angry customers.
Specifically, I need an application that can perform the following functions rapidly:
(1) automatically open one audio file after another
(2) analyze each file for mean pitch, maximum pitch variation, mean volume, maximum volume variation, and rate of speech
(3) Report the raw data in text format that can be downloaded into a Excel spreadsheet or other database
The programmer would receive 50% of gross revenue.
Are you interested in receiving a business proposal? Do you know someone else who might be?
Thanks you -
Stewart Rogers
Stewart@100000ColdCalls.com
|
|
|
|
 |
|
 |
Refer to www.100000coldcallsscam.com
to learn the facts about
Stewart L. Rogers of Olympia, Wa, formerly of
Raleigh, NC.....
more about this so-called telemarketing expert,
his criminal arrests and civil lawsuits related to
his past telemarketing businesses from unhappy and ripped off
businesses.
No wonder he wants to detect anger first on a cold call...
Stewart Rogers has a lot of people who don't like him or
his business practices!
is this legal? Or an invasion of the privacy of
the person receiving a call?
Beware! you were warned! better to get your money up front, he did not respect written contracts in his past business dealings and has declared bankruptcy numerous times, AND is currently in bankruptcy. Ask the business owners he made deals with in the past, they got paid nothing.
|
|
|
|
 |
|
 |
If i speak some thing the wave are moving but the recorded one is not storing how it will work
Can you please help me on this
Ashok Nalam
|
|
|
|
 |
|
 |
Jeff,
This is a great example program. I would like to incorporate the actual frequencies that are being read along with the graph along the X-Axis.
I see after the fourier transform, your member variables _fftLeft and _fftRight contain 2048 values containing the amplitudes. How can I translate this to the appropriate actual frequencies?
I’m actually interesting in displaying just a few of the frequencies – for instance 2500.
I’m a newbie to DSP side of things, so any help or insight would be appreciated.
Thank you!
|
|
|
|
 |
|
 |
For an FFT it's frequencies are displayed as follows:
For N samples the maximum freq is at N/2 ie if you sample at 44.1kHz the max freq is 22.025kHz at sample number N/2. Each sample has a freq (i/N)*fs where fs is the sampling freq and i is the frequency bin.
So if you have 2048 samples in your FFT then only 1024 can be used and the first frequency bin has a frequency (1/2048)*fs..as do all the rest ie the second one has freq (2/2048)*fs etc
|
|
|
|
 |
|
 |
actually it should read N/2-1 but it makes little difference
|
|
|
|
 |
|
 |
hello.. I'm a computer graphics student and i'm using your code to extract the main frequency of the microphone input.. but i need it to be really quick. another code of yours (Soundviewer) and it was giving 1 output per second.. this one is faster but still not fast enough (i'm not rendering anything right now so thats not the issue. I just can't find on both examples how to define the number of outputs per second
Thank you very much
Paulo Ricca
|
|
|
|
 |
|
 |
The speed is determined by the processor and efficiency of the code that's running on it. If speed is a requirement for your project than I would consider using a more efficient language like C++. Fourier Transform algorithms are CPU intensive and the version I've used is fairly robust, so I suspect the computer you're using may not even be capable of producing the performance you are looking for.
|
|
|
|
 |
|
 |
Oh, ok I thought you were limiting the performance, by code, since it seems that you were in the SoundViewer.I'll gie it a shot, I might be wrong and this may be fast enough.. thanx for the great projects your publishing!
|
|
|
|
 |
|
 |
Congratulations for this project...
I have two questions about this.
1) How can I create wav recording file with the same during ?
I try with the parameter "SettingSecondsToSave" but it don't work
2) It is possible to separate sound stream (two streams from jack in sound card)
Thanks for yours answers.
DR
|
|
|
|
 |
|
 |
Solid looking code... I've been looking for a while for something like this incorporating FFTs with some real world applications written in C# (for us NON computer engineers). Thanks a lot for the contribution.
|
|
|
|
 |
|
 |
How can i take input sound from directly the sound card ?
I want to use the graph part of your project for my player. If it is possible ?
|
|
|
|
 |
|
 |
Have you considered using WPF? I've done a little messing around and it appears to be much faster at drawing things on the screen (due to the fact that it utilises DirectX and therefore hardware acceleration). Mind you I only testing it with scrolling around a few hundred thousand images quickly.
Perhaps you could split the code nicely and have a library and then WPF provides a UI demo above it?
Just a thought...
|
|
|
|
 |
|
 |
Hi, just tried opening the solution file using VS2005 - it complained it was made by a newer version and could not be opened. Opening just the project file is fine. It's not a problem, just thought I'd say.
Cheers for the great project!.
|
|
|
|
 |
|
 |
Solution was created in VS2008. Sorry for the inconvenience.
Jeff Morton
|
|
|
|
 |