Fast and Efficient Pitch Detection: Bitstream Autocorrelation

Status
Not open for further replies.

rheslip

Member
Very cool algorithm by Joel de Guzman: https://www.cycfi.com/2018/03/fast-and-efficient-pitch-detection-bitstream-autocorrelation/

He tuned the algorithm for guitar but no doubt it would work very well for other instruments. It detects pitch within 2 cycles (or less) with a very high degree of accuracy. Fast, accurate, low latency pitch detection is the holy grail for pitch to MIDI conversion or instrument to synth apps.

The code is in his Q DSP library: https://github.com/cycfi/Q

The hitch is he is pulling the code any day now (mid april 2021). I think he realized he has something special and does not want to keep it open source as he develops it further. He does however encourage you to fork it in its current state. I have done just that because I'd love to see this ported to the Teensy audio library: https://github.com/rheslip/q

I spent some time trying to port the Q library to Arduino to experiment with but I'm not much of a C++ programmer and I got bogged down pretty quickly. I would think somebody with some decent C++ skills could take the skeleton of audio_analysenotefreq and change the pitch detection algorithm to the one from the Q library. I think it would be a great addition - the Yin algorithm used in audio_analysenotefreq seems pretty accurate but the latency is poor.
 
I've been following Joel's excellent work for quite a while now.

I'm no expert, but am pretty sure this is state of the art for monophonic, time domain pitch detection.

The implemenation in the q library at the moment is MIT licenced, but his work on onset detection will not be. I'm also working on a port, but my first target will be to the DaisySP library. If I make any significant progress in the coming weeks, I'll post an update here.
 
I'm also working on a port, but my first target will be to the DaisySP library. If I make any significant progress in the coming weeks, I'll post an update here.

That would be great! As you may have noticed I did a port of DaisySP to the Teensy Audio library.

I'll keep flogging away at it.
 
Status
Not open for further replies.
Back
Top