I have two audio tracks with a click sound (basically a short sine) approximately every second. The sample rate is 44.1kHz. One click takes about 1000 samples. There are about 20 - 30 clicks in each track. The corresponding clicks should have an error about a few samples (max. 48 samples).
I can detect the delay between the first clicks in the two tracks.
I know two different methods:
1.
[c, lags] = xcorr(Track1, Track2);
[max_c, I] = max(c);
delay = lags(I);
2.
delay = finddelay(Track1, Track2);
Both methods return the same value with inverted sign which is ok for now.
I want to detect the delays between all corresponding click sounds.
Here is another image with the start of the click from both tracks:
How can I achieve this?
PS: Sorry if the word corresponding
is used wrong. What I mean by that is the clicks for the respective seconds.