Clean up the normalized FFT vs time-domain FFT
Closed this issue · 2 comments
sevagh commented
It's a bit messy -
- The time-domain autocorrelation does the opinionated improvements of MPM
- The FFT autocorrelation doesn't have the same but it has some form of normalization via completely pointless division by
result[size/2]
Come up with:
enum NormalizationStrategy
Make sure they align for time domain and FFT.
sevagh commented
You can see autocorrelation gets 249Hz on the E2 with -DPORTABLE_XCORR
, which are the advantages from NSDF: https://github.com/sevagh/mcleod#83hz-open-e-string-on-guitar-1
With FFTS, autocorrelation gets 282Hz on the E2, proof of non-normalization: https://github.com/sevagh/mcleod#83hz-open-e-string-on-guitar
sevagh commented
This is done - there's basically no NSDF here, which doesn't matter for MPM or YIN - NSDF makes autocorrelation a little less bad, but still not good. So, I've removed all implicit normalization.