Mercurial > hg > pyin
changeset 47:42bafbc673b9 tony
some tidy up in YinUtil -- more boring method, but stable and reasonably good at finding pitches
author | matthiasm |
---|---|
date | Thu, 20 Feb 2014 08:57:16 +0000 |
parents | e17206dafa65 |
children | b8cdbefd2c58 |
files | YinUtil.cpp |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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;