# Wavelet-based C/C++ Peak finding libraries

What wavelet-based peak finding functions are there for C++?

I'm looking for something similar to: http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.signal.find_peaks_cwt.html. Preferably something that produces the same exact results.

Have tried: https://github.com/xuphys/peakdetect, but this does not operate on floats (but shorts) and gives different results (either because of shorts or if it's not wavelet-based). The difference produced is around 20%.

My signals are audio signals and I'm doing $f_0$ estimation from an autocorrelation (ACF) signal (can be noisy, can be polyphonic).

Also, how does one in general interpret, whether the algorithm produces "the right peaks"? Just by plotting?

• peakdetect is a completely different approach than the one offered by Python so you will not get the same results. Depends on your application you might want to glue the Python code to our C++ code. Please note that find_peaks_cwt is veeery slooow...
– jojek
May 31, 2015 at 14:28
• What's the reason behind having these mixed results? A peak should be a peak right? If there are many ways to find peaks (and different types of peaks), at least it would make sense to specify them. May 31, 2015 at 14:40
• I guess that you understand that all methods will perform differently for various signals, unless you are detecting a single peak without any noise. Also various methods have different parameters which are not necessarily related. Would you say that all methods for the detection of fundamental frequency should produce same result, cause "$f_0$ should be $f_0$? I guess not.
– jojek
May 31, 2015 at 14:45
• If "f0" is known (e.g. can be pointed by listening to the signal in the case of audio signal), then of course all peak finders should attempt to find the same f0, if they're peak finders for f0. May 31, 2015 at 14:48
• But obviously won't, do you agree? Enough of meaningless chat. We have no idea what is the signal you are dealing with, therefore I cannot address that problem in the greater detail.
– jojek
May 31, 2015 at 14:49