1
$\begingroup$

I'm wondering if anyone could help me find my footing in an approach I am taking with a student in my audio programming class for creating more accurate pitch detection algorithms. But the approach is not limited to pitch detection and in fact seems seems similar to Newton's Method, Euler's Method, Horner's Method, and so on. It is a very simple and general idea, and must have some background in numerical methods. I am looking for pointers to the literature.

Here is the idea. We have a function f which takes a signal and returns the fundamental frequency (such algorithms are close cousins to the Discrete Fourier Transform). In order to test its accuracy, I created simple sine wave signals of precise frequencies and tested the algorithm, and graphed the errors over a particular range; basically a perfect f would be the identity function, so we just had to record the deviation from the identity. The errors are basically sinusoidal. So I stored the errors in an array, and use cubic interpolation to create a continuous error function, and built that into the last stage of the algorithm. Of course, there is a problem, because the errors showed the deviation from a perfect f, and the original f is not perfect, so there would be errors in the errors, so to speak. So I iterated the process, correcting successively for errors in the errors, and the algorithm gets better each time. I have not yet figured out whether it will converge to some minimal error. I also have not tested it in musical settings. But it is very promising, and seems like a generally useful technique.

Separate from a programming trick, I would like to understand some of its properties such as convergence and so on. Anyone have any pointer, keywords, etc. for me to pursue this? I'm guessing it is a standard technique in numerical methods.

$\endgroup$
2
  • $\begingroup$ It seems a bit similar to matching pursuit. There are some problems: frequency is something that is constant over sample period, infinite in fact. Also Fourier cousins are not prepared to deal with chirp signals (only FrFT can) and sudden changes - spectrum is disaster. Are you doing interpolation over frequency domain? The problem with this approach is in testing syntetic signal. When you try two-three waves with non-integer frequency, you can recover exact frequency, due to sparsity and known number of waves, thing that is impossible with more waves or data with noise. $\endgroup$
    – Evil
    Apr 26 '16 at 16:02
  • $\begingroup$ And every time you start iteration to backpropagate error correction you have implicit assumption that what you have already is pure noise, but it is a mixture of data and noise, so being extremely lucky you can decrease noise (I wouldn't count on that anywhere but on syntetic signal) but in normal case you get some result that might look more pleasing, unfortunately this is only one result from whole family of results that happens to minimize some objective given and there is no way to tell which one or how exact it was. $\endgroup$
    – Evil
    Apr 26 '16 at 16:12
1
$\begingroup$

There is a high risk that you are "overfitting": you are fitting to noise, not to signal. If that's indeed what is happening, your method won't actually be useful.

The way to find out whether your method is actually making any real improvements (or whether you're just fooling yourself) is to have a holdout set: a separate set of signals, that you haven't used during the error correction. In other words, you have a training set (one set of signals) and a test set (a separate list of signals, with no overlap with the training set). You do all of the correction, corrections to the corrections, etc., on the training set. Then, once you've done that, you measure how effective your resulting corrected algorithm is on the test set. This will give you a sense of how effective your approach is.

$\endgroup$
0
$\begingroup$

You may look for the technique called Linear Regression to fit your function onto the plotted values. The errors can be minimized in Linear Regression through the Gradient Descent algorithm. As far as the interpolations are concerned, you seem to pretty much aware of those techniques, such as Newton's forward/backward interpolation methods, Newton's divided difference method etc.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.