views:

2170

answers:

5

Hello,

I'm trying to do real-time pitch detection using C++. I'm testing some code from performous (http://performous.org/), because everything else hasn't worked for me. I know for sure that this works, but i just cant get it to work. I've been trying this for a few weeks now, and i haven't been able to get any pitch detection code working.

Edit: Solved! Thanks loads to Ryan Emerle!!! Now using the FMOD library.

Thanks,

Niall.

+3  A: 

Take a look at the FMOD library. One of their samples does realtime pitch detection IIRC. The library is free for open source, and moderately priced for commercial applications.

Even if you don't want to use the library, perhaps it will provide some insight.

Ryan Emerle
+4  A: 

Instead of using input from the mic, you should create data of a known single frequency and run that through the program and see if it gets you the correct result. Then you can add harmonics to it and see if that works. Real world data is just too variable for initial testing.

Dan Hook
+1  A: 

Hi Nill, did you finally succeed in running performous' code? How did it behave?

Julien Maille
+1  A: 

Performous audio code has some optimizations, frequency limits and heuristics that make it only suitable for singing (and other similar tones). The optimal range is around 80-600 Hz.

Tronic
A: 

It looks like duplicate of the question is here Real time pitch detection with some additional answers.

mloskot