I am using the Average Magnitude Difference Function to estimate the fundamental frequency of a quasi-periodic audio signal. The AMDF is defined as
$$ D_n = \frac{1}{N-n}\sum_{k=n}^{N-1}|S_k - S_{k-n}| $$
where $N$ is the length of the signal. This function exhibits a minimum when the signal is shifted by an amount equal to its period.
This is the code I am using to extract the pitch (in Matlab):
a = amdf(f);
a = a/max(a);
[p l] = findpeaks(-a, 'minpeakprominence', 0.6);
pitch = round(sample_freq/l(1);
However, I am dealing with an audio signal where the fundamental frequency is very low:
As a consequence, a pitch doubling problem arises: the detected minimum corresponds to half the period of the signal (i.e. the second harmonic):
I tried to extract the largest peak and not just the first, but sometimes this problem remains. How can I improve my code and/or the AMDF function in order to deal with low fundamental?
No comments:
Post a Comment