changeset 118:4663b1f184e8 monophonicness

rename variables for better readability
author Matthias Mauch <mail@matthiasmauch.net>
date Thu, 31 Mar 2011 14:55:28 +0100
parents 5f3d3ea6aab6
children c4d1208e5ea9
files Chordino.cpp
diffstat 1 files changed, 90 insertions(+), 90 deletions(-) [+]
line wrap: on
line diff
--- a/Chordino.cpp	Thu Mar 31 14:37:06 2011 +0100
+++ b/Chordino.cpp	Thu Mar 31 14:55:28 2011 +0100
@@ -70,103 +70,103 @@
     if (debug_on) cerr << "--> getParameterDescriptors" << endl;
     ParameterList list;
 
-    ParameterDescriptor d;
-    d.identifier = "useNNLS";
-    d.name = "use approximate transcription (NNLS)";
-    d.description = "Toggles approximate transcription (NNLS).";
-    d.unit = "";
-    d.minValue = 0.0;
-    d.maxValue = 1.0;
-    d.defaultValue = 1.0;
-    d.isQuantized = true;
-	d.quantizeStep = 1.0;
-    list.push_back(d);
+    ParameterDescriptor useNNLSParam;
+    useNNLSParam.identifier = "useNNLS";
+    useNNLSParam.name = "use approximate transcription (NNLS)";
+    useNNLSParam.description = "Toggles approximate transcription (NNLS).";
+    useNNLSParam.unit = "";
+    useNNLSParam.minValue = 0.0;
+    useNNLSParam.maxValue = 1.0;
+    useNNLSParam.defaultValue = 1.0;
+    useNNLSParam.isQuantized = true;
+	useNNLSParam.quantizeStep = 1.0;
+    list.push_back(useNNLSParam);
 
-    ParameterDescriptor d4;
-    d4.identifier = "useHMM";
-    d4.name = "HMM (Viterbi decoding)";
-    d4.description = "Turns on Viterbi decoding (when off, the simple chord estimator is used).";
-    d4.unit = "";
-    d4.minValue = 0.0;
-    d4.maxValue = 1.0;
-    d4.defaultValue = 1.0;
-    d4.isQuantized = true;
-	d4.quantizeStep = 1.0;
-    list.push_back(d4);
+    ParameterDescriptor useHMMParam;
+    useHMMParam.identifier = "useHMM";
+    useHMMParam.name = "HMM (Viterbi decoding)";
+    useHMMParam.description = "Turns on Viterbi decoding (when off, the simple chord estimator is used).";
+    useHMMParam.unit = "";
+    useHMMParam.minValue = 0.0;
+    useHMMParam.maxValue = 1.0;
+    useHMMParam.defaultValue = 1.0;
+    useHMMParam.isQuantized = true;
+	useHMMParam.quantizeStep = 1.0;
+    list.push_back(useHMMParam);
 
-    ParameterDescriptor d0;
-    d0.identifier = "rollon";
-    d0.name = "bass noise threshold";
-    d0.description = "Consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [bass noise threshold] x [total energy] will be set to 0. A threshold value of 0 means that no bins will be changed.";
-    d0.unit = "%";
-    d0.minValue = 0;
-    d0.maxValue = 5;
-    d0.defaultValue = 0.0;
-    d0.isQuantized = true;
-	d0.quantizeStep = 0.5;
-    list.push_back(d0);
+    ParameterDescriptor rollonParam;
+    rollonParam.identifier = "rollon";
+    rollonParam.name = "bass noise threshold";
+    rollonParam.description = "Consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [bass noise threshold] x [total energy] will be set to 0. A threshold value of 0 means that no bins will be changed.";
+    rollonParam.unit = "%";
+    rollonParam.minValue = 0;
+    rollonParam.maxValue = 5;
+    rollonParam.defaultValue = 0.0;
+    rollonParam.isQuantized = true;
+	rollonParam.quantizeStep = 0.5;
+    list.push_back(rollonParam);
 
-    ParameterDescriptor d1;
-    d1.identifier = "tuningmode";
-    d1.name = "tuning mode";
-    d1.description = "Tuning can be performed locally or on the whole extraction segment. Local tuning is only advisable when the tuning is likely to change over the audio, for example in podcasts, or in a cappella singing.";
-    d1.unit = "";
-    d1.minValue = 0;
-    d1.maxValue = 1;
-    d1.defaultValue = 0.0;
-    d1.isQuantized = true;
-    d1.valueNames.push_back("global tuning");
-    d1.valueNames.push_back("local tuning");
-    d1.quantizeStep = 1.0;
-    list.push_back(d1);
+    ParameterDescriptor tuningmodeParam;
+    tuningmodeParam.identifier = "tuningmode";
+    tuningmodeParam.name = "tuning mode";
+    tuningmodeParam.description = "Tuning can be performed locally or on the whole extraction segment. Local tuning is only advisable when the tuning is likely to change over the audio, for example in podcasts, or in a cappella singing.";
+    tuningmodeParam.unit = "";
+    tuningmodeParam.minValue = 0;
+    tuningmodeParam.maxValue = 1;
+    tuningmodeParam.defaultValue = 0.0;
+    tuningmodeParam.isQuantized = true;
+    tuningmodeParam.valueNames.push_back("global tuning");
+    tuningmodeParam.valueNames.push_back("local tuning");
+    tuningmodeParam.quantizeStep = 1.0;
+    list.push_back(tuningmodeParam);
 
-    ParameterDescriptor d2;
-    d2.identifier = "whitening";
-    d2.name = "spectral whitening";
-    d2.description = "Spectral whitening: no whitening - 0; whitening - 1.";
-    d2.unit = "";
-    d2.isQuantized = true;
-    d2.minValue = 0.0;
-    d2.maxValue = 1.0;
-    d2.defaultValue = 1.0;
-    d2.isQuantized = false;
-    list.push_back(d2);
+    ParameterDescriptor whiteningParam;
+    whiteningParam.identifier = "whitening";
+    whiteningParam.name = "spectral whitening";
+    whiteningParam.description = "Spectral whitening: no whitening - 0; whitening - 1.";
+    whiteningParam.unit = "";
+    whiteningParam.isQuantized = true;
+    whiteningParam.minValue = 0.0;
+    whiteningParam.maxValue = 1.0;
+    whiteningParam.defaultValue = 1.0;
+    whiteningParam.isQuantized = false;
+    list.push_back(whiteningParam);
 
-    ParameterDescriptor d3;
-    d3.identifier = "s";
-    d3.name = "spectral shape";
-    d3.description = "Determines how individual notes in the note dictionary look: higher values mean more dominant higher harmonics.";
-    d3.unit = "";
-    d3.minValue = 0.5;
-    d3.maxValue = 0.9;
-    d3.defaultValue = 0.7;
-    d3.isQuantized = false;
-    list.push_back(d3);
+    ParameterDescriptor spectralShapeParam;
+    spectralShapeParam.identifier = "spectralshape";
+    spectralShapeParam.name = "spectral shape";
+    spectralShapeParam.description = "Determines how individual notes in the note dictionary look: higher values mean more dominant higher harmonics.";
+    spectralShapeParam.unit = "";
+    spectralShapeParam.minValue = 0.5;
+    spectralShapeParam.maxValue = 0.9;
+    spectralShapeParam.defaultValue = 0.7;
+    spectralShapeParam.isQuantized = false;
+    list.push_back(spectralShapeParam);
 
-    ParameterDescriptor boostn;
-    boostn.identifier = "boostn";
-    boostn.name = "boost N";
-    boostn.description = "Boost likelihood of the N (no chord) label.";
-    boostn.unit = "";
-    boostn.minValue = 0.0;
-    boostn.maxValue = 1.0;
-    boostn.defaultValue = 0.1;
-    boostn.isQuantized = false;
-    list.push_back(boostn);
+    ParameterDescriptor boostnParam;
+    boostnParam.identifier = "boostn";
+    boostnParam.name = "boost N";
+    boostnParam.description = "Boost likelihood of the N (no chord) label.";
+    boostnParam.unit = "";
+    boostnParam.minValue = 0.0;
+    boostnParam.maxValue = 1.0;
+    boostnParam.defaultValue = 0.1;
+    boostnParam.isQuantized = false;
+    list.push_back(boostnParam);
 
-    ParameterDescriptor usehartesyntax;
-    usehartesyntax.identifier = "usehartesyntax";
-    usehartesyntax.name = "use Harte syntax";
-    usehartesyntax.description = "Use the chord syntax proposed by Harte";
-    usehartesyntax.unit = "";
-    usehartesyntax.minValue = 0.0;
-    usehartesyntax.maxValue = 1.0;
-    usehartesyntax.defaultValue = 0.0;
-    usehartesyntax.isQuantized = true;
-	usehartesyntax.quantizeStep = 1.0;
-	usehartesyntax.valueNames.push_back("no");
-    usehartesyntax.valueNames.push_back("yes");
-    list.push_back(usehartesyntax);
+    ParameterDescriptor usehartesyntaxParam;
+    usehartesyntaxParam.identifier = "usehartesyntax";
+    usehartesyntaxParam.name = "use Harte syntax";
+    usehartesyntaxParam.description = "Use the chord syntax proposed by Harte";
+    usehartesyntaxParam.unit = "";
+    usehartesyntaxParam.minValue = 0.0;
+    usehartesyntaxParam.maxValue = 1.0;
+    usehartesyntaxParam.defaultValue = 0.0;
+    usehartesyntaxParam.isQuantized = true;
+	usehartesyntaxParam.quantizeStep = 1.0;
+	usehartesyntaxParam.valueNames.push_back("no");
+    usehartesyntaxParam.valueNames.push_back("yes");
+    list.push_back(usehartesyntaxParam);
 
     return list;
 }