Mercurial > hg > constant-q-cpp
comparison vamp/CQVamp.cpp @ 168:0f2edd13ea2d
Feature labels were upside down in the plugin! Oops. Fix it
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 02 Dec 2014 17:36:41 +0000 |
parents | 1081c73fbbe3 |
children | 8a1d240ac542 |
comparison
equal
deleted
inserted
replaced
167:83cd46303dee | 168:0f2edd13ea2d |
---|---|
349 d.binCount = (m_cq ? m_cq->getTotalBins() : (9 * 24)); | 349 d.binCount = (m_cq ? m_cq->getTotalBins() : (9 * 24)); |
350 | 350 |
351 if (m_cq) { | 351 if (m_cq) { |
352 char name[20]; | 352 char name[20]; |
353 for (int i = 0; i < (int)d.binCount; ++i) { | 353 for (int i = 0; i < (int)d.binCount; ++i) { |
354 float freq = m_cq->getBinFrequency(i); | 354 float freq = m_cq->getBinFrequency(d.binCount - i - 1); |
355 sprintf(name, "%.1f Hz", freq); | 355 sprintf(name, "%.1f Hz", freq); |
356 int note = Pitch::getPitchForFrequency(freq, 0, m_tuningFrequency); | 356 int note = Pitch::getPitchForFrequency(freq, 0, m_tuningFrequency); |
357 float nearestFreq = | 357 float nearestFreq = |
358 Pitch::getFrequencyForPitch(note, 0, m_tuningFrequency); | 358 Pitch::getFrequencyForPitch(note, 0, m_tuningFrequency); |
359 if (fabs(freq - nearestFreq) < 0.01) { | 359 if (fabs(freq - nearestFreq) < 0.01) { |