3 ms·
This is super cool! Using an FFT to detect pitch is a natural approach, but my understanding is that most pitch detectors work in the time domain using some for
by munificent 6y ago
This is super cool! Using an FFT to detect pitch is a natural approach, but my understanding is that most pitch detectors work in the time domain using some form of auto-correlation. See:
https://en.wikipedia.org/wiki/Pitch_detection_algorithm https://en.wikipedia.org/wiki/Pitch_detection_algorithm
- qrv3w 6y agoThanks for that link, wasn't aware. For this I used the simplest approach I could think of - using sox [1] with its builtin power spectrum analyzer. It works pretty well as the resulting tuning is fantastic. It would be nice to a faster pitch detector - could speed up tuning from ~15 seconds to maybe just a few seconds. [1] https://linux.die.net/man/1/sox https://linux.die.net/man/1/sox
- nomel 6y agoI used this to detect the switching frequency in DC-DC converters at my first job after a colleague gave up with trying to use FFT (way too noisy). The signal was barely visible with the oscilloscope I was using, but it worked great and caught many problems! I thought up the solution myself, but didn't realize it was widely used.
- qppo 6y agoThe wiki article kind of undersells how effective a zero crossing detector can be.
- jacquesm 6y agoAuto correlation is best used for those frequencies where the FFT does not work (for instance, due to a too low number of FFT buckets to reliably detect which frequency you are talking about because multiple notes map onto a single bucket).