Mercurial > hg > tuning-difference
comparison src/TuningDifference.cpp @ 25:85714824256a
Remove some (but not yet all) debug output
author | Chris Cannam |
---|---|
date | Fri, 06 Feb 2015 09:03:12 +0000 |
parents | 6a75d371938f |
children | c21ce05afbe4 |
comparison
equal
deleted
inserted
replaced
24:6a75d371938f | 25:85714824256a |
---|---|
291 | 291 |
292 for (int i = 0; i < m_bpo; ++i) { | 292 for (int i = 0; i < m_bpo; ++i) { |
293 feature[i] /= sum; | 293 feature[i] /= sum; |
294 } | 294 } |
295 | 295 |
296 cerr << "computeFeatureFromTotals: feature values:" << endl; | 296 // cerr << "computeFeatureFromTotals: feature values:" << endl; |
297 for (auto v: feature) cerr << v << " "; | 297 // for (auto v: feature) cerr << v << " "; |
298 cerr << endl; | 298 // cerr << endl; |
299 | 299 |
300 return feature; | 300 return feature; |
301 } | 301 } |
302 | 302 |
303 Chromagram::Parameters | 303 Chromagram::Parameters |
382 int maxRotation = (m_bpo * maxSemis) / 12; | 382 int maxRotation = (m_bpo * maxSemis) / 12; |
383 | 383 |
384 for (int r = -maxRotation; r <= maxRotation; ++r) { | 384 for (int r = -maxRotation; r <= maxRotation; ++r) { |
385 double dist = featureDistance(other, r); | 385 double dist = featureDistance(other, r); |
386 dists[dist] = r; | 386 dists[dist] = r; |
387 cerr << "rotation " << r << ": score " << dist << endl; | 387 // cerr << "rotation " << r << ": score " << dist << endl; |
388 } | 388 } |
389 | 389 |
390 int best = dists.begin()->second; | 390 int best = dists.begin()->second; |
391 | 391 |
392 cerr << "best is " << best << endl; | 392 // cerr << "best is " << best << endl; |
393 return best; | 393 return best; |
394 } | 394 } |
395 | 395 |
396 pair<int, double> | 396 pair<int, double> |
397 TuningDifference::findFineFrequency(int coarseCents, double coarseScore) | 397 TuningDifference::findFineFrequency(int coarseCents, double coarseScore) |