Reintroduce the overtone debug messages (commented out, though).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Apr 2006 14:04:48 +0000 (14:04 +0000)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 2 Apr 2006 14:04:48 +0000 (14:04 +0000)
pitch.cpp

index 13efaf8..1c272f1 100644 (file)
--- a/pitch.cpp
+++ b/pitch.cpp
@@ -248,6 +248,8 @@ std::pair<double, double> find_peak(double *in, unsigned num_samples)
 std::pair<double, double> adjust_for_overtones(std::pair<double, double> base, double *in, unsigned num_samples)
 {
        double mu = base.first, var = 1.0 / (base.second * base.second);
 std::pair<double, double> adjust_for_overtones(std::pair<double, double> base, double *in, unsigned num_samples)
 {
        double mu = base.first, var = 1.0 / (base.second * base.second);
+               
+       //printf("Base at %.2f (amp=%5.2fdB)\n", base.first, base.second);
 
        for (unsigned i = 2; i < 10; ++i) {
                unsigned middle = unsigned(floor(freq_to_bin(base.first, num_samples) * i + 0.5));
 
        for (unsigned i = 2; i < 10; ++i) {
                unsigned middle = unsigned(floor(freq_to_bin(base.first, num_samples) * i + 0.5));