Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
Dear Sir,

I desperately in need of help for a module of a sound application system. What this module basically does it to count the number of times a sample extracted from a main sound application occurs in the main.

I'll be grateful for any help offered and will also like to know the cost and duration.

Thanks
Posted
Updated 7-Dec-10 3:49am
v2
Comments
TheyCallMeMrJames 7-Dec-10 9:49am    
Removed email.

You're likely better off hitting a site like vworker.com.

This site and especially this part of the functionality are for software folks to help other software folks with detailed software-folks-like questions.

Cheers.
 
Share this answer
 
Hi ikebotch,

I'm not completely sure but I would say you need to look into Fourier Transform.

If you get the Fourier Spectrum of your sample you can then analyse that against the Fourier Spectrum of the larger sample, looking for any matches. Fourier Transforms can be used when quantising rhythm tracks or for auto-tuning.

There are some open source tools available for Fourier Transforms in C#, however I' not completely sure that my approach would be helpful.

Cheers

Laurence
 
Share this answer
 
v2
Comments
wizardzz 7-Dec-10 10:49am    
Good call.
Laurence1234 7-Dec-10 11:07am    
Thanks, it does rely on finding an open source implementation of the DCT algorithm that will compute the Fast Fourier Transform in feasible time, however this does of course depend on the size of both samples.

Similarly the comparison could potentially be very costly, as for each interval you would have to place your smaller sample as a template to find a match for that pattern, however I'm sure there are more efficient ways of doing that.
Hello!

1. You should take the samples you suppose "to see" inside the sound file.
2. Compare this samples to the first block of sound data (get Convolution coefficient or to get an Euclidean distance).
3. Slide "comparative samples" through the "target samples" (where you would like to find the comparatives) and perform the same (as in item 2) operation.

In the result you will have a set of coefficients.

For the case of Euclidean distance the minimum value will show you the place "comparative samples" are located. To have an satisfactory results you should play with threshold value.

For the convolution the max value will tell you the location of the sound you are looking for.

Good luck!

Viktor Signaievskyi
 
Share this answer
 

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