Click here to Skip to main content
15,887,347 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
how to find difference between two Fast Fourier transform (fft) as presantage(%)

in c# or in vb.net

What I have tried:

find difference between two Fast Fourier transform (fft)

it is an array of single so i want compare two result of two .wav sound and know the different between it in %
Posted
Updated 11-Jun-20 22:09pm
v2
Comments
Patrice T 10-Jun-17 19:41pm    
find the maths
Ralf Meier 11-Jun-17 14:47pm    
And ... what have you tried ...?
What is the result of your FFT ? An Array of Single ? A Curve (which is represented by an Array of Single) ?
If you want to get help you should be much more specific ... !!!
giant18 11-Jun-17 21:48pm    
an array of single so i want compare two result of two .wav sound and know the different between it in %
Ralf Meier 12-Jun-17 3:15am    
Have you tried to subtract the Contents from both Array-Elemets and build a new Array which only contains the difference ?
This could be the first step to get an Algorhytm ...
giant18 12-Jun-17 17:06pm    
yes i try it but i did not find good result

1 solution

Hii giant18,

I wanted to do the same and for that I used following method.
First array of data is X and second array of data is Y. I performed mean square error method on it, as I am working in C++.

C++
double meanSquareError(double *X,double *Y,uint16_t sizeOfArray)
{
	double sumOfSquare=0;

	for(uint16_t i=0;i<(Tempsamples/2);i++)
	{
		sumOfSquare = sumOfSquare + pow((X[i]-Y[i]),2);
	}

	return sqrt(sumOfSquare);
}


I am getting a big number for small difference, I applied this on FFT results.
If you have any solution better than me then please share it with me.

You can visit this link for more http://biomedicalsignalandimage.blogspot.com/2016/03/the-method-of-comparing-two-audio-files.html

Thank you
 
Share this answer
 
v3

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