I’m looking for a straightforward pitch recognizer C++ API (like every real tuner do). Does anybody here know how to find this kind of API?
What I would like to do is basically extract the fundamental frequency from a given wave sample (in real-time), then convert it to the closest pitched note, and finally into a proper NoteOn MIDI signal.
I already tried to Google it, but I haven’t found anything so far.
Yes FFT / frequency-domain based pitch detection is generally much faster than time-domain, but tends to be less accurate. Peak picking FFT is the least accurate, and can completely miss the fundamental frequency.
In my tests, I found the the McLeod Pitch Method faster and more accurate than YIN.
How would you even do accurate FFT anyway? Even given a steady pitch, if the tone you’re dealing with is doesn’t fit nicely into a bin is there any way of working out what the pitch actually was?
Hi all,
I am looking into all this stuff.
A friend asked me to build a bass synth VST for him.
I made a simple application using PYO that used Yin and an envelope follower.
It worked pretty well. I had to mess around to get it to work.
A buffersize of 1024 with a window size of 3072 at 96k seemed to work best but it didn’t work at all below 50hz ( ie the bottom 4 notes on the low E string weren’t recognized. I wonder if the MPM method would work better that low. I guess the lower down you get the bigger the errors get. A couple of HZ is almost a semitone/half-step down there … I set the minimum freq yin was looking for to 10hz and applied a hi pass filter at 1000k … I managed to build a simple sampler in JUCE totally in C++ but getting on of these complicated algorythms to work seems a bit beyond my skills … I wish JUCE would compile PYO properly which was 7 lines of code … All the books I read seem to go from a description of DSP of a sine wave to rocket science. It would be nice if someone could suggest an easy way in. I also want to try and implement a PSOLA algorithm I made easily in JUCE. … Sean