diff NNLSChroma.cpp @ 116:9f7ba52207dc monophonicness

rename variables for better readability
author Matthias Mauch <mail@matthiasmauch.net>
date Thu, 31 Mar 2011 14:31:04 +0100
parents 96cea9c05046
children 5f3d3ea6aab6
line wrap: on
line diff
--- a/NNLSChroma.cpp	Thu Mar 31 14:26:53 2011 +0100
+++ b/NNLSChroma.cpp	Thu Mar 31 14:31:04 2011 +0100
@@ -139,68 +139,68 @@
     list.push_back(d4);
     m_outputChroma = index++;
     
-    OutputDescriptor d5;
-    d5.identifier = "basschroma";
-    d5.name = "Bass Chromagram";
-    d5.description = "Tuning-adjusted bass chromagram from NNLS approximate transcription, with an emphasis on the bass note range.";
-    d5.unit = "";
-    d5.hasFixedBinCount = true;
-    d5.binCount = 12;
-    d5.binNames = chromanames;
-    d5.hasKnownExtents = false;
-    d5.isQuantized = false;
-    d5.sampleType = OutputDescriptor::FixedSampleRate;
-    d5.hasDuration = false;
-    d5.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
-    list.push_back(d5);
+    OutputDescriptor basschromaOutput;
+    basschromaOutput.identifier = "basschroma";
+    basschromaOutput.name = "Bass Chromagram";
+    basschromaOutput.description = "Tuning-adjusted bass chromagram from NNLS approximate transcription, with an emphasis on the bass note range.";
+    basschromaOutput.unit = "";
+    basschromaOutput.hasFixedBinCount = true;
+    basschromaOutput.binCount = 12;
+    basschromaOutput.binNames = chromanames;
+    basschromaOutput.hasKnownExtents = false;
+    basschromaOutput.isQuantized = false;
+    basschromaOutput.sampleType = OutputDescriptor::FixedSampleRate;
+    basschromaOutput.hasDuration = false;
+    basschromaOutput.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
+    list.push_back(basschromaOutput);
     m_outputBassChroma = index++;
     
-    OutputDescriptor d6;
-    d6.identifier = "bothchroma";
-    d6.name = "Chromagram and Bass Chromagram";
-    d6.description = "Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription.";
-    d6.unit = "";
-    d6.hasFixedBinCount = true;
-    d6.binCount = 24;
-    d6.binNames = bothchromanames;
-    d6.hasKnownExtents = false;
-    d6.isQuantized = false;
-    d6.sampleType = OutputDescriptor::FixedSampleRate;
-    d6.hasDuration = false;
-    d6.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
-    list.push_back(d6);
+    OutputDescriptor bothchromaOutput;
+    bothchromaOutput.identifier = "bothchroma";
+    bothchromaOutput.name = "Chromagram and Bass Chromagram";
+    bothchromaOutput.description = "Tuning-adjusted chromagram and bass chromagram (stacked on top of each other) from NNLS approximate transcription.";
+    bothchromaOutput.unit = "";
+    bothchromaOutput.hasFixedBinCount = true;
+    bothchromaOutput.binCount = 24;
+    bothchromaOutput.binNames = bothchromanames;
+    bothchromaOutput.hasKnownExtents = false;
+    bothchromaOutput.isQuantized = false;
+    bothchromaOutput.sampleType = OutputDescriptor::FixedSampleRate;
+    bothchromaOutput.hasDuration = false;
+    bothchromaOutput.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
+    list.push_back(bothchromaOutput);
     m_outputBothChroma = index++;
   
-    OutputDescriptor d7;
-    d7.identifier = "consonance";
-    d7.name = "Consonance estimate.";
-    d7.description = "A simple consonance value based on the convolution of a consonance profile with the semitone spectrum.";
-    d7.unit = "";
-    d7.hasFixedBinCount = true;
-    d7.binCount = 1;
-    d7.hasKnownExtents = false;
-    d7.isQuantized = false;
-    d7.sampleType = OutputDescriptor::FixedSampleRate;
-    d7.hasDuration = false;
-    d7.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
-    list.push_back(d7);
+    OutputDescriptor consonanceOutput;
+    consonanceOutput.identifier = "consonance";
+    consonanceOutput.name = "Consonance estimate.";
+    consonanceOutput.description = "A simple consonance value based on the convolution of a consonance profile with the semitone spectrum.";
+    consonanceOutput.unit = "";
+    consonanceOutput.hasFixedBinCount = true;
+    consonanceOutput.binCount = 1;
+    consonanceOutput.hasKnownExtents = false;
+    consonanceOutput.isQuantized = false;
+    consonanceOutput.sampleType = OutputDescriptor::FixedSampleRate;
+    consonanceOutput.hasDuration = false;
+    consonanceOutput.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
+    list.push_back(consonanceOutput);
     m_outputConsonance = index++;
   
-    OutputDescriptor monophonicness;
-    monophonicness.identifier = "monophonicness";
-    monophonicness.name = "Monophonicness estimate.";
-    monophonicness.description = ".";
-    monophonicness.unit = "";
-    monophonicness.hasFixedBinCount = true;
-    monophonicness.binCount = 1;
-    monophonicness.hasKnownExtents = true;
-    monophonicness.minValue = 0;
-    monophonicness.maxValue = 1;
-    monophonicness.isQuantized = false;
-    monophonicness.sampleType = OutputDescriptor::FixedSampleRate;
-    monophonicness.hasDuration = false;
-    monophonicness.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
-    list.push_back(monophonicness);
+    OutputDescriptor monophonicnessOutput;
+    monophonicnessOutput.identifier = "monophonicness";
+    monophonicnessOutput.name = "Monophonicness estimate.";
+    monophonicnessOutput.description = ".";
+    monophonicnessOutput.unit = "";
+    monophonicnessOutput.hasFixedBinCount = true;
+    monophonicnessOutput.binCount = 1;
+    monophonicnessOutput.hasKnownExtents = true;
+    monophonicnessOutput.minValue = 0;
+    monophonicnessOutput.maxValue = 1;
+    monophonicnessOutput.isQuantized = false;
+    monophonicnessOutput.sampleType = OutputDescriptor::FixedSampleRate;
+    monophonicnessOutput.hasDuration = false;
+    monophonicnessOutput.sampleRate = (m_stepSize == 0) ? m_inputSampleRate/2048 : m_inputSampleRate/m_stepSize;
+    list.push_back(monophonicnessOutput);
     m_outputMonophonicness = index++;
     
     return list;