I would like to count the number of sound samples between the beginnings of two identical tones in time domain. The tones are generated at random points in time. To do so, I think that I need to do three main things for each audio-samples buffer:
- Recognize the desired tone from the buffer
- Find the position of the first audio sample of that tone
- count the audio samples between that sample and the first sample of the previously recognized tone
If that design makes sense, any suggestions on how to implement it? I currently use TarsosDSP Java library for sound processing.