Is it possible with FFT to find an occurrence of a small wav sample inside of a longer wav, if it is known that that exact sample exists somewhere in the wav (but may be mixed with other sounds)?
edit
(after receiving two responses): What if I have a library of all known sounds that can be in the larger WAV and wish to find occurrences of each of them within that WAV? In other words, I know every possible sound that can be mixed into the big wav, and wish to find occurrences of them?
I assume by exact you don’t mean sample value exact. If it were sample-value exact, then it would be a simple matter of searching for the sample values, which is fast and efficient.
If you are looking for bits of sound that contribute, the best approach is to use a mathematical process called “convolution”. Basically, take the sample that you are trying to find within the big sample, effectively place it next to the big sample, and correlate. Do this for every sample position. You will from this get a curve that will have distinct spikes in it where the sample is. Its quite computationally intensive, but computers have gotten quite fast, so its feasible.
But – this is assuming that the sample came from the same recording for both cases. Miking a drum sound, even the same drum sound, from two different locations, will not produce very good correlation.
Hope that helps.