# HG changeset patch # User matthiasm # Date 1392886636 0 # Node ID 42bafbc673b9307a75b6a0ffc3b454cf4acc8db7 # Parent e17206dafa6540cc853893af9dcbf93608decb01 some tidy up in YinUtil -- more boring method, but stable and reasonably good at finding pitches diff -r e17206dafa65 -r 42bafbc673b9 YinUtil.cpp --- a/YinUtil.cpp Wed Feb 19 22:48:08 2014 +0000 +++ b/YinUtil.cpp Thu Feb 20 08:57:16 2014 +0000 @@ -276,12 +276,12 @@ minInd = tau; } currThreshInd = nThresholdInt-1; - while (thresholds[currThreshInd] > yinBuffer[tau] && currThreshInd > -1) { - // std::cerr << distribution[currThreshInd] << std::endl; - peakProb[tau] += distribution[currThreshInd]; - currThreshInd--; - } - // peakProb[tau] = 1 - yinBuffer[tau]; + // while (thresholds[currThreshInd] > yinBuffer[tau] && currThreshInd > -1) { + // // std::cerr << distribution[currThreshInd] << std::endl; + // peakProb[tau] += distribution[currThreshInd]; + // currThreshInd--; + // } + peakProb[tau] = 1 - yinBuffer[tau]; sumProb += peakProb[tau]; tau++; } else { @@ -297,7 +297,7 @@ nonPeakProb -= peakProb[i]; } } - std::cerr << nonPeakProb << std::endl; + // std::cerr << nonPeakProb << std::endl; if (minInd > 0) { // std::cerr << "min set " << minVal << " " << minInd << " " << nonPeakProb << std::endl;