Mercurial > hg > qm-dsp
diff dsp/tonal/TonalEstimator.h @ 285:c88fb48790d9
* Add wavelet filters from Thomas Wilmering
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 02 Apr 2009 11:17:45 +0000 |
parents | 49844bc8a895 |
children | 769da847732b |
line wrap: on
line diff
--- a/dsp/tonal/TonalEstimator.h Mon Mar 23 18:50:38 2009 +0000 +++ b/dsp/tonal/TonalEstimator.h Thu Apr 02 11:17:45 2009 +0000 @@ -40,8 +40,8 @@ // normalize the chroma vector (L1 norm) double dSum = 0.0; - for (size_t i = 0; i < 12; (dSum += std::abs((*this)[i++]))); - for (size_t i = 0; i < 12; dSum > 0.0000001?((*this)[i] /= dSum):(*this)[i]=0.0, i++); + for (size_t i = 0; i < 12; (dSum += std::abs((*this)[i++]))) ; + for (size_t i = 0; i < 12; dSum > 0.0000001?((*this)[i] /= dSum):(*this)[i]=0.0, i++) ; }