Mercurial > hg > constant-q-cpp
diff vamp/CQVamp.cpp @ 90:bfc7cf71f2ef
Rearrange classes so the basic ConstantQ produces a complex output, and CQSpectrogram (formerly CQInterpolated) is required if you want a real output
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 09 May 2014 10:05:16 +0100 |
parents | f4fb0ac6120a |
children | fa1709ed4a3c |
line wrap: on
line diff
--- a/vamp/CQVamp.cpp Fri May 09 08:25:24 2014 +0100 +++ b/vamp/CQVamp.cpp Fri May 09 10:05:16 2014 +0100 @@ -47,7 +47,7 @@ m_maxMIDIPitch(84), m_tuningFrequency(440), m_bpo(24), - m_interpolation(CQInterpolated::Linear), + m_interpolation(CQSpectrogram::InterpolateLinear), m_cq(0), m_maxFrequency(inputSampleRate/2), m_minFrequency(46), @@ -155,7 +155,7 @@ desc.defaultValue = 2; desc.isQuantized = true; desc.quantizeStep = 1; - desc.valueNames.push_back("None, leave empty"); + desc.valueNames.push_back("None, leave as zero"); desc.valueNames.push_back("None, repeat prior value"); desc.valueNames.push_back("Linear interpolation"); list.push_back(desc); @@ -198,7 +198,7 @@ } else if (param == "bpo") { m_bpo = lrintf(value); } else if (param == "interpolation") { - m_interpolation = (CQInterpolated::Interpolation)lrintf(value); + m_interpolation = (CQSpectrogram::Interpolation)lrintf(value); } else { std::cerr << "WARNING: CQVamp::setParameter: unknown parameter \"" << param << "\"" << std::endl; @@ -224,7 +224,7 @@ m_maxFrequency = Pitch::getFrequencyForPitch (m_maxMIDIPitch, 0, m_tuningFrequency); - m_cq = new CQInterpolated + m_cq = new CQSpectrogram (m_inputSampleRate, m_minFrequency, m_maxFrequency, m_bpo, m_interpolation); @@ -236,7 +236,7 @@ { if (m_cq) { delete m_cq; - m_cq = new CQInterpolated + m_cq = new CQSpectrogram (m_inputSampleRate, m_minFrequency, m_maxFrequency, m_bpo, m_interpolation); } @@ -314,7 +314,7 @@ CQVamp::FeatureSet CQVamp::getRemainingFeatures() { - vector<vector<double> > cqout = m_cq->getRemainingBlocks(); + vector<vector<double> > cqout = m_cq->getRemainingOutput(); return convertToFeatures(cqout); }