Mercurial > hg > nnls-chroma
comparison Chordino.cpp @ 118:4663b1f184e8 monophonicness
rename variables for better readability
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Thu, 31 Mar 2011 14:55:28 +0100 |
parents | 526250b06fe0 |
children | 072327bbb1a2 |
comparison
equal
deleted
inserted
replaced
117:5f3d3ea6aab6 | 118:4663b1f184e8 |
---|---|
68 Chordino::getParameterDescriptors() const | 68 Chordino::getParameterDescriptors() const |
69 { | 69 { |
70 if (debug_on) cerr << "--> getParameterDescriptors" << endl; | 70 if (debug_on) cerr << "--> getParameterDescriptors" << endl; |
71 ParameterList list; | 71 ParameterList list; |
72 | 72 |
73 ParameterDescriptor d; | 73 ParameterDescriptor useNNLSParam; |
74 d.identifier = "useNNLS"; | 74 useNNLSParam.identifier = "useNNLS"; |
75 d.name = "use approximate transcription (NNLS)"; | 75 useNNLSParam.name = "use approximate transcription (NNLS)"; |
76 d.description = "Toggles approximate transcription (NNLS)."; | 76 useNNLSParam.description = "Toggles approximate transcription (NNLS)."; |
77 d.unit = ""; | 77 useNNLSParam.unit = ""; |
78 d.minValue = 0.0; | 78 useNNLSParam.minValue = 0.0; |
79 d.maxValue = 1.0; | 79 useNNLSParam.maxValue = 1.0; |
80 d.defaultValue = 1.0; | 80 useNNLSParam.defaultValue = 1.0; |
81 d.isQuantized = true; | 81 useNNLSParam.isQuantized = true; |
82 d.quantizeStep = 1.0; | 82 useNNLSParam.quantizeStep = 1.0; |
83 list.push_back(d); | 83 list.push_back(useNNLSParam); |
84 | 84 |
85 ParameterDescriptor d4; | 85 ParameterDescriptor useHMMParam; |
86 d4.identifier = "useHMM"; | 86 useHMMParam.identifier = "useHMM"; |
87 d4.name = "HMM (Viterbi decoding)"; | 87 useHMMParam.name = "HMM (Viterbi decoding)"; |
88 d4.description = "Turns on Viterbi decoding (when off, the simple chord estimator is used)."; | 88 useHMMParam.description = "Turns on Viterbi decoding (when off, the simple chord estimator is used)."; |
89 d4.unit = ""; | 89 useHMMParam.unit = ""; |
90 d4.minValue = 0.0; | 90 useHMMParam.minValue = 0.0; |
91 d4.maxValue = 1.0; | 91 useHMMParam.maxValue = 1.0; |
92 d4.defaultValue = 1.0; | 92 useHMMParam.defaultValue = 1.0; |
93 d4.isQuantized = true; | 93 useHMMParam.isQuantized = true; |
94 d4.quantizeStep = 1.0; | 94 useHMMParam.quantizeStep = 1.0; |
95 list.push_back(d4); | 95 list.push_back(useHMMParam); |
96 | 96 |
97 ParameterDescriptor d0; | 97 ParameterDescriptor rollonParam; |
98 d0.identifier = "rollon"; | 98 rollonParam.identifier = "rollon"; |
99 d0.name = "bass noise threshold"; | 99 rollonParam.name = "bass noise threshold"; |
100 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."; | 100 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."; |
101 d0.unit = "%"; | 101 rollonParam.unit = "%"; |
102 d0.minValue = 0; | 102 rollonParam.minValue = 0; |
103 d0.maxValue = 5; | 103 rollonParam.maxValue = 5; |
104 d0.defaultValue = 0.0; | 104 rollonParam.defaultValue = 0.0; |
105 d0.isQuantized = true; | 105 rollonParam.isQuantized = true; |
106 d0.quantizeStep = 0.5; | 106 rollonParam.quantizeStep = 0.5; |
107 list.push_back(d0); | 107 list.push_back(rollonParam); |
108 | 108 |
109 ParameterDescriptor d1; | 109 ParameterDescriptor tuningmodeParam; |
110 d1.identifier = "tuningmode"; | 110 tuningmodeParam.identifier = "tuningmode"; |
111 d1.name = "tuning mode"; | 111 tuningmodeParam.name = "tuning mode"; |
112 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."; | 112 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."; |
113 d1.unit = ""; | 113 tuningmodeParam.unit = ""; |
114 d1.minValue = 0; | 114 tuningmodeParam.minValue = 0; |
115 d1.maxValue = 1; | 115 tuningmodeParam.maxValue = 1; |
116 d1.defaultValue = 0.0; | 116 tuningmodeParam.defaultValue = 0.0; |
117 d1.isQuantized = true; | 117 tuningmodeParam.isQuantized = true; |
118 d1.valueNames.push_back("global tuning"); | 118 tuningmodeParam.valueNames.push_back("global tuning"); |
119 d1.valueNames.push_back("local tuning"); | 119 tuningmodeParam.valueNames.push_back("local tuning"); |
120 d1.quantizeStep = 1.0; | 120 tuningmodeParam.quantizeStep = 1.0; |
121 list.push_back(d1); | 121 list.push_back(tuningmodeParam); |
122 | 122 |
123 ParameterDescriptor d2; | 123 ParameterDescriptor whiteningParam; |
124 d2.identifier = "whitening"; | 124 whiteningParam.identifier = "whitening"; |
125 d2.name = "spectral whitening"; | 125 whiteningParam.name = "spectral whitening"; |
126 d2.description = "Spectral whitening: no whitening - 0; whitening - 1."; | 126 whiteningParam.description = "Spectral whitening: no whitening - 0; whitening - 1."; |
127 d2.unit = ""; | 127 whiteningParam.unit = ""; |
128 d2.isQuantized = true; | 128 whiteningParam.isQuantized = true; |
129 d2.minValue = 0.0; | 129 whiteningParam.minValue = 0.0; |
130 d2.maxValue = 1.0; | 130 whiteningParam.maxValue = 1.0; |
131 d2.defaultValue = 1.0; | 131 whiteningParam.defaultValue = 1.0; |
132 d2.isQuantized = false; | 132 whiteningParam.isQuantized = false; |
133 list.push_back(d2); | 133 list.push_back(whiteningParam); |
134 | 134 |
135 ParameterDescriptor d3; | 135 ParameterDescriptor spectralShapeParam; |
136 d3.identifier = "s"; | 136 spectralShapeParam.identifier = "spectralshape"; |
137 d3.name = "spectral shape"; | 137 spectralShapeParam.name = "spectral shape"; |
138 d3.description = "Determines how individual notes in the note dictionary look: higher values mean more dominant higher harmonics."; | 138 spectralShapeParam.description = "Determines how individual notes in the note dictionary look: higher values mean more dominant higher harmonics."; |
139 d3.unit = ""; | 139 spectralShapeParam.unit = ""; |
140 d3.minValue = 0.5; | 140 spectralShapeParam.minValue = 0.5; |
141 d3.maxValue = 0.9; | 141 spectralShapeParam.maxValue = 0.9; |
142 d3.defaultValue = 0.7; | 142 spectralShapeParam.defaultValue = 0.7; |
143 d3.isQuantized = false; | 143 spectralShapeParam.isQuantized = false; |
144 list.push_back(d3); | 144 list.push_back(spectralShapeParam); |
145 | 145 |
146 ParameterDescriptor boostn; | 146 ParameterDescriptor boostnParam; |
147 boostn.identifier = "boostn"; | 147 boostnParam.identifier = "boostn"; |
148 boostn.name = "boost N"; | 148 boostnParam.name = "boost N"; |
149 boostn.description = "Boost likelihood of the N (no chord) label."; | 149 boostnParam.description = "Boost likelihood of the N (no chord) label."; |
150 boostn.unit = ""; | 150 boostnParam.unit = ""; |
151 boostn.minValue = 0.0; | 151 boostnParam.minValue = 0.0; |
152 boostn.maxValue = 1.0; | 152 boostnParam.maxValue = 1.0; |
153 boostn.defaultValue = 0.1; | 153 boostnParam.defaultValue = 0.1; |
154 boostn.isQuantized = false; | 154 boostnParam.isQuantized = false; |
155 list.push_back(boostn); | 155 list.push_back(boostnParam); |
156 | 156 |
157 ParameterDescriptor usehartesyntax; | 157 ParameterDescriptor usehartesyntaxParam; |
158 usehartesyntax.identifier = "usehartesyntax"; | 158 usehartesyntaxParam.identifier = "usehartesyntax"; |
159 usehartesyntax.name = "use Harte syntax"; | 159 usehartesyntaxParam.name = "use Harte syntax"; |
160 usehartesyntax.description = "Use the chord syntax proposed by Harte"; | 160 usehartesyntaxParam.description = "Use the chord syntax proposed by Harte"; |
161 usehartesyntax.unit = ""; | 161 usehartesyntaxParam.unit = ""; |
162 usehartesyntax.minValue = 0.0; | 162 usehartesyntaxParam.minValue = 0.0; |
163 usehartesyntax.maxValue = 1.0; | 163 usehartesyntaxParam.maxValue = 1.0; |
164 usehartesyntax.defaultValue = 0.0; | 164 usehartesyntaxParam.defaultValue = 0.0; |
165 usehartesyntax.isQuantized = true; | 165 usehartesyntaxParam.isQuantized = true; |
166 usehartesyntax.quantizeStep = 1.0; | 166 usehartesyntaxParam.quantizeStep = 1.0; |
167 usehartesyntax.valueNames.push_back("no"); | 167 usehartesyntaxParam.valueNames.push_back("no"); |
168 usehartesyntax.valueNames.push_back("yes"); | 168 usehartesyntaxParam.valueNames.push_back("yes"); |
169 list.push_back(usehartesyntax); | 169 list.push_back(usehartesyntaxParam); |
170 | 170 |
171 return list; | 171 return list; |
172 } | 172 } |
173 | 173 |
174 Chordino::OutputList | 174 Chordino::OutputList |