You said 'what's up' and didn't give me time to answer, which is very rude. I wasn't too offended, but others might be. Love the project, plan on attempting a simpler one myself. Cheers
Hm, the link seems to work for me..? Youtube does appear to split it and insert a space on a line break, however, so it doesn't work if you just copy/paste it into your browser's URL bar. (I had to remove a space after the "c" in "cheveign" for it to work over here.)
At worst, just google "YIN, a fundamental frequency estimator for speech and music" or "2002_JASA_YIN.pdf", it's in the first page in both cases.
The pitch detection algorithm works by successive refinement; MIDI is the same as the regular tuner, but with fewer iterations. I tried to tweak the code to achieve the best compromise between latency and precision, but there wasn't much more I could do on the software front (without significant effort) to make the thing run faster. Hotspots are written in assembler and the rest of the compiler-generated code is pretty good. The next easiest gain would probably be on the hardware front.
Wonderful, this has inspired me to add this functionality into (hopefully) a custom homemade guitar body. But I do have a question: could you use a Fast Fourier Transform (which I do not fully understand yet) or something of the sort to make it polyphonic?
The Yin paper touches on polyphony - a challenge in its own right..! An FFT would be a great starting point, but the Arduino's atmega168 doesn't really have the horsepower required to crunch the numbers (though I'd be happy to be proven wrong ;-) ).
One reason I chose Yin is because, unlike FFT, it is a time-domain approach; at the required precision, the implementation only requires about 350 bytes of RAM. On the other hand, it's not amenable to polyphonic pitch detection.
Ducky, a FFT would work. People have done it on the Arduino (there's assembly libraries out there), but you want a fast one - or perhaps two, maybe use one like a dedicated DSP and have it spit a list of significant frequencies over serial.
I have an ATmega 328, which has twice the RAM (2kb).
I'm actually working on a similar project, but for a two-tone radio dispatch system. The average of peak approach seems like it may be more suited for my purposes.
Hello, this is amazing. Do you have the source code anywhere? I looked at Yin's document, but it is too mathematical for me to understand. I am looking for a way to detect pitch with the Arduino. Thank you!
You said 'what's up' and didn't give me time to answer, which is very rude. I wasn't too offended, but others might be. Love the project, plan on attempting a simpler one myself. Cheers
gaijintendo 11 months ago
congrats on getting the job.
dodgedart74 1 year ago
Can you check the link on the Yin paper or put up a cite? Thanks.
MilwaukeeGuitar 2 years ago
Hm, the link seems to work for me..? Youtube does appear to split it and insert a space on a line break, however, so it doesn't work if you just copy/paste it into your browser's URL bar. (I had to remove a space after the "c" in "cheveign" for it to work over here.)
At worst, just google "YIN, a fundamental frequency estimator for speech and music" or "2002_JASA_YIN.pdf", it's in the first page in both cases.
Let me know if that still doesn't work for you!
raptorofaxys 2 years ago
would there be any way to reduce the latency between picking a note and the midi output?
blueduck577 2 years ago
The pitch detection algorithm works by successive refinement; MIDI is the same as the regular tuner, but with fewer iterations. I tried to tweak the code to achieve the best compromise between latency and precision, but there wasn't much more I could do on the software front (without significant effort) to make the thing run faster. Hotspots are written in assembler and the rest of the compiler-generated code is pretty good. The next easiest gain would probably be on the hardware front.
raptorofaxys 2 years ago
Wonderful, this has inspired me to add this functionality into (hopefully) a custom homemade guitar body. But I do have a question: could you use a Fast Fourier Transform (which I do not fully understand yet) or something of the sort to make it polyphonic?
duckythescientist 2 years ago
The Yin paper touches on polyphony - a challenge in its own right..! An FFT would be a great starting point, but the Arduino's atmega168 doesn't really have the horsepower required to crunch the numbers (though I'd be happy to be proven wrong ;-) ).
One reason I chose Yin is because, unlike FFT, it is a time-domain approach; at the required precision, the implementation only requires about 350 bytes of RAM. On the other hand, it's not amenable to polyphonic pitch detection.
raptorofaxys 2 years ago
Ducky, a FFT would work. People have done it on the Arduino (there's assembly libraries out there), but you want a fast one - or perhaps two, maybe use one like a dedicated DSP and have it spit a list of significant frequencies over serial.
I have an ATmega 328, which has twice the RAM (2kb).
I'm actually working on a similar project, but for a two-tone radio dispatch system. The average of peak approach seems like it may be more suited for my purposes.
slimjim8094 2 years ago
Hello, this is amazing. Do you have the source code anywhere? I looked at Yin's document, but it is too mathematical for me to understand. I am looking for a way to detect pitch with the Arduino. Thank you!
mrshiz111 2 years ago
Another one who wants a tutorial of how to make YIN pitch detection using Arduino!
Disenyador 2 years ago
That's awesome! the MIDI mode is really cool, there is so much to do with this little thing of Arduino..
FrankyFuzzFire 3 years ago