# HG changeset patch # User Chris Cannam # Date 1400590544 -3600 # Node ID 58547262e735a54a59258445ad2262a98f18e32b # Parent 9d44ed673b858a963956903b12e4ff56f8c55f8c Remove extra outputs diff -r 9d44ed673b85 -r 58547262e735 src/Silvet.cpp --- a/src/Silvet.cpp Tue May 20 13:53:17 2014 +0100 +++ b/src/Silvet.cpp Tue May 20 13:55:44 2014 +0100 @@ -204,72 +204,6 @@ m_notesOutputNo = list.size(); list.push_back(d); - d.identifier = "cq"; - d.name = "Raw constant-Q"; - d.description = "Unfiltered constant-Q time-frequency distribution"; - d.unit = ""; - d.hasFixedBinCount = true; - d.binCount = processingHeight + 55; - d.binNames.clear(); - if (m_cq) { - //!!! I think this output is not working correctly, and these values may be wrong - char name[20]; - for (int i = 0; i < processingHeight + 55; ++i) { - float freq = m_cq->getBinFrequency(processingHeight + 54 - i); - sprintf(name, "%.1f Hz", freq); - d.binNames.push_back(name); - } - } - d.hasKnownExtents = false; - d.isQuantized = false; - d.sampleType = OutputDescriptor::FixedSampleRate; - d.sampleRate = m_inputSampleRate / (m_cq ? m_cq->getColumnHop() : 62); - d.hasDuration = false; - m_cqOutputNo = list.size(); - list.push_back(d); - - d.identifier = "inputgrid"; - d.name = "Filtered constant-Q"; - d.description = "Filtered constant-Q time-frequency distribution used as input to the PLCA step"; - d.unit = ""; - d.hasFixedBinCount = true; - d.binCount = processingHeight; - d.binNames.clear(); - if (m_cq) { - //!!! I think this output is not working correctly, and these values may be wrong - char name[20]; - for (int i = 0; i < processingHeight; ++i) { - float freq = m_cq->getBinFrequency(processingHeight + 54 - i); - sprintf(name, "%.1f Hz", freq); - d.binNames.push_back(name); - } - } - d.hasKnownExtents = false; - d.isQuantized = false; - d.sampleType = OutputDescriptor::FixedSampleRate; - d.sampleRate = 25; - d.hasDuration = false; - m_fcqOutputNo = list.size(); - list.push_back(d); - - d.identifier = "pitches"; - d.name = "Pitch activation"; - d.description = "Estimated pitch activation matrix"; - d.unit = ""; - d.hasFixedBinCount = true; - d.binCount = processingNotes; - d.binNames.clear(); - for (int i = 0; i < processingNotes; ++i) { - d.binNames.push_back(noteName(i)); - } - d.hasKnownExtents = false; - d.isQuantized = false; - d.sampleType = OutputDescriptor::FixedSampleRate; - d.sampleRate = 25; - d.hasDuration = false; - m_pitchOutputNo = list.size(); - list.push_back(d); - return list; } @@ -374,15 +308,6 @@ Grid cqout = m_cq->process(data); FeatureSet fs = transcribe(cqout); - - for (int i = 0; i < (int)cqout.size(); ++i) { - Feature f; - for (int j = 0; j < (int)cqout[i].size(); ++j) { - f.values.push_back(float(cqout[i][j])); - } - fs[m_cqOutputNo].push_back(f); - } - return fs; } @@ -391,15 +316,6 @@ { Grid cqout = m_cq->getRemainingOutput(); FeatureSet fs = transcribe(cqout); - - for (int i = 0; i < (int)cqout.size(); ++i) { - Feature f; - for (int j = 0; j < (int)cqout[i].size(); ++j) { - f.values.push_back(float(cqout[i][j])); - } - fs[m_cqOutputNo].push_back(f); - } - return fs; } @@ -412,14 +328,6 @@ if (filtered.empty()) return fs; - for (int i = 0; i < (int)filtered.size(); ++i) { - Feature f; - for (int j = 0; j < processingHeight; ++j) { - f.values.push_back(float(filtered[i][j])); - } - fs[m_fcqOutputNo].push_back(f); - } - int width = filtered.size(); int iterations = 12; //!!! more might be good? @@ -455,12 +363,6 @@ for (int i = 0; i < width; ++i) { - Feature f; - for (int j = 0; j < processingNotes; ++j) { - f.values.push_back(float(pitchMatrix[i][j])); - } - fs[m_pitchOutputNo].push_back(f); - FeatureList noteFeatures = postProcess(pitchMatrix[i]); for (FeatureList::const_iterator fi = noteFeatures.begin(); diff -r 9d44ed673b85 -r 58547262e735 src/Silvet.h --- a/src/Silvet.h Tue May 20 13:53:17 2014 +0100 +++ b/src/Silvet.h Tue May 20 13:55:44 2014 +0100 @@ -93,9 +93,6 @@ Vamp::RealTime m_startTime; mutable int m_notesOutputNo; - mutable int m_cqOutputNo; - mutable int m_fcqOutputNo; - mutable int m_pitchOutputNo; }; #endif