comparison src/MatchVampPlugin.cpp @ 162:dda5410ac9f0 refactors

Tidy up parameter order &c
author Chris Cannam
date Thu, 29 Jan 2015 17:22:02 +0000
parents 123147f096d2
children cf1282d1f940
comparison
equal deleted inserted replaced
161:123147f096d2 162:dda5410ac9f0
145 { 145 {
146 ParameterList list; 146 ParameterList list;
147 147
148 ParameterDescriptor desc; 148 ParameterDescriptor desc;
149 149
150 desc.identifier = "serialise"; 150 desc.identifier = "freq1";
151 desc.name = "Serialise Plugin Invocations"; 151 desc.name = "Tuning frequency of first input";
152 desc.description = "Reduce potential memory load at the expense of multiprocessor performance by serialising multi-threaded plugin runs"; 152 desc.description = "Tuning frequency (concert A) for the reference audio.";
153 desc.minValue = 220.0;
154 desc.maxValue = 880.0;
155 desc.defaultValue = (float)m_defaultFeParams.referenceFrequency;
156 desc.isQuantized = false;
157 desc.unit = "Hz";
158 list.push_back(desc);
159
160 desc.identifier = "freq2";
161 desc.name = "Tuning frequency of second input";
162 desc.description = "Tuning frequency (concert A) for the other audio.";
163 desc.minValue = 220.0;
164 desc.maxValue = 880.0;
165 desc.defaultValue = (float)m_defaultFeParams.referenceFrequency;
166 desc.isQuantized = false;
167 desc.unit = "Hz";
168 list.push_back(desc);
169
170 desc.unit = "";
171
172 desc.identifier = "usechroma";
173 desc.name = "Feature type";
174 desc.description = "Whether to use warped spectrogram or chroma frequency map";
153 desc.minValue = 0; 175 desc.minValue = 0;
154 desc.maxValue = 1; 176 desc.maxValue = 1;
155 desc.defaultValue = 0; 177 desc.defaultValue = m_defaultFeParams.useChromaFrequencyMap ? 1 : 0;
178 desc.isQuantized = true;
179 desc.quantizeStep = 1;
180 desc.valueNames.clear();
181 desc.valueNames.push_back("Spectral");
182 desc.valueNames.push_back("Chroma");
183 list.push_back(desc);
184
185 desc.valueNames.clear();
186
187 desc.identifier = "usespecdiff";
188 desc.name = "Use feature difference";
189 desc.description = "Whether to use half-wave rectified feature-to-feature difference instead of straight spectral or chroma feature";
190 desc.minValue = 0;
191 desc.maxValue = 1;
192 desc.defaultValue = (int)m_defaultFcParams.order;
156 desc.isQuantized = true; 193 desc.isQuantized = true;
157 desc.quantizeStep = 1; 194 desc.quantizeStep = 1;
158 list.push_back(desc); 195 list.push_back(desc);
159 196
160 desc.identifier = "framenorm"; 197 desc.identifier = "framenorm";
161 desc.name = "Frame Normalisation"; 198 desc.name = "Frame normalisation";
162 desc.description = "Type of normalisation to use for frequency-domain audio features"; 199 desc.description = "Type of normalisation to use for features";
163 desc.minValue = 0; 200 desc.minValue = 0;
164 desc.maxValue = 2; 201 desc.maxValue = 2;
165 desc.defaultValue = (int)m_defaultFcParams.norm; 202 desc.defaultValue = (int)m_defaultFcParams.norm;
166 desc.isQuantized = true; 203 desc.isQuantized = true;
167 desc.quantizeStep = 1; 204 desc.quantizeStep = 1;
168 desc.valueNames.clear(); 205 desc.valueNames.clear();
169 desc.valueNames.push_back("None"); 206 desc.valueNames.push_back("None");
170 desc.valueNames.push_back("Sum To 1"); 207 desc.valueNames.push_back("Sum to 1");
171 desc.valueNames.push_back("Long-Term Average"); 208 desc.valueNames.push_back("Long-term average");
172 list.push_back(desc); 209 list.push_back(desc);
173 desc.valueNames.clear(); 210 desc.valueNames.clear();
174
175 desc.identifier = "distnorm";
176 desc.name = "Distance Normalisation";
177 desc.description = "Type of normalisation to use for distance metric";
178 desc.minValue = 0;
179 desc.maxValue = 2;
180 desc.defaultValue = (int)m_defaultDParams.norm;
181 desc.isQuantized = true;
182 desc.quantizeStep = 1;
183 desc.valueNames.clear();
184 desc.valueNames.push_back("None");
185 desc.valueNames.push_back("Sum of Frames");
186 desc.valueNames.push_back("Log Sum of Frames");
187 list.push_back(desc);
188 desc.valueNames.clear();
189
190 desc.identifier = "usespecdiff";
191 desc.name = "Use Spectral Difference";
192 desc.description = "Whether to use half-wave rectified spectral difference instead of straight spectrum";
193 desc.minValue = 0;
194 desc.maxValue = 1;
195 desc.defaultValue = (int)m_defaultFcParams.order;
196 desc.isQuantized = true;
197 desc.quantizeStep = 1;
198 list.push_back(desc);
199
200 desc.identifier = "usechroma";
201 desc.name = "Use Chroma Frequency Map";
202 desc.description = "Whether to use a chroma frequency map instead of the default warped spectrogram";
203 desc.minValue = 0;
204 desc.maxValue = 1;
205 desc.defaultValue = m_defaultFeParams.useChromaFrequencyMap ? 1 : 0;
206 desc.isQuantized = true;
207 desc.quantizeStep = 1;
208 list.push_back(desc);
209
210 desc.identifier = "silencethreshold";
211 desc.name = "Silence Threshold";
212 desc.description = "Total frame energy threshold below which a feature will be regarded as silent";
213 desc.minValue = 0;
214 desc.maxValue = 1;
215 desc.defaultValue = m_defaultFcParams.silenceThreshold;
216 desc.isQuantized = false;
217 list.push_back(desc);
218 211
219 desc.identifier = "metric"; 212 desc.identifier = "metric";
220 desc.name = "Distance metric"; 213 desc.name = "Distance metric";
221 desc.description = "Metric for distance calculations."; 214 desc.description = "Metric for distance calculations.";
222 desc.minValue = 0; 215 desc.minValue = 0;
229 desc.valueNames.push_back("Euclidean"); 222 desc.valueNames.push_back("Euclidean");
230 desc.valueNames.push_back("Cosine"); 223 desc.valueNames.push_back("Cosine");
231 list.push_back(desc); 224 list.push_back(desc);
232 desc.valueNames.clear(); 225 desc.valueNames.clear();
233 226
227 desc.identifier = "distnorm";
228 desc.name = "Distance normalisation";
229 desc.description = "Type of normalisation to use for distance metric";
230 desc.minValue = 0;
231 desc.maxValue = 2;
232 desc.defaultValue = (int)m_defaultDParams.norm;
233 desc.isQuantized = true;
234 desc.quantizeStep = 1;
235 desc.valueNames.clear();
236 desc.valueNames.push_back("None");
237 desc.valueNames.push_back("Sum of frames");
238 desc.valueNames.push_back("Log sum of frames");
239 list.push_back(desc);
240 desc.valueNames.clear();
241
242 desc.identifier = "silencethreshold";
243 desc.name = "Silence threshold";
244 desc.description = "Total frame energy threshold below which a feature will be regarded as silent";
245 desc.minValue = 0;
246 desc.maxValue = 0.1;
247 desc.defaultValue = m_defaultFcParams.silenceThreshold;
248 desc.isQuantized = false;
249 list.push_back(desc);
250
234 desc.identifier = "noise"; 251 desc.identifier = "noise";
235 desc.name = "Mix in Noise"; 252 desc.name = "Add noise";
236 desc.description = "Whether to mix in a small constant white noise term when calculating feature distance. This can improve alignment against sources containing cleanly synthesised audio."; 253 desc.description = "Whether to mix in a small constant white noise term when calculating feature distance. This can improve alignment against sources containing cleanly synthesised audio.";
237 desc.minValue = 0; 254 desc.minValue = 0;
238 desc.maxValue = 1; 255 desc.maxValue = 1;
239 desc.defaultValue = (int)m_defaultDParams.noise; 256 desc.defaultValue = (int)m_defaultDParams.noise;
240 desc.isQuantized = true; 257 desc.isQuantized = true;
241 desc.quantizeStep = 1; 258 desc.quantizeStep = 1;
242 list.push_back(desc); 259 list.push_back(desc);
243 260
244 desc.identifier = "gradientlimit"; 261 desc.identifier = "gradientlimit";
245 desc.name = "Gradient Limit"; 262 desc.name = "Gradient limit";
246 desc.description = "Limit of number of frames that will be accepted from one source without a frame from the other source being accepted"; 263 desc.description = "Limit of number of frames that will be accepted from one source without a frame from the other source being accepted";
247 desc.minValue = 1; 264 desc.minValue = 1;
248 desc.maxValue = 10; 265 desc.maxValue = 10;
249 desc.defaultValue = m_defaultParams.maxRunCount; 266 desc.defaultValue = m_defaultParams.maxRunCount;
250 desc.isQuantized = true; 267 desc.isQuantized = true;
251 desc.quantizeStep = 1; 268 desc.quantizeStep = 1;
252 list.push_back(desc); 269 list.push_back(desc);
253 270
254 desc.identifier = "zonewidth"; 271 desc.identifier = "zonewidth";
255 desc.name = "Search Zone Width"; 272 desc.name = "Search zone width";
256 desc.description = "Width of the search zone (error margin) either side of the ongoing match position, in seconds"; 273 desc.description = "Width of the search zone (error margin) either side of the ongoing match position, in seconds";
257 desc.minValue = 1; 274 desc.minValue = 1;
258 desc.maxValue = 60; 275 desc.maxValue = 60;
259 desc.defaultValue = (float)m_defaultParams.blockTime; 276 desc.defaultValue = (float)m_defaultParams.blockTime;
260 desc.isQuantized = true; 277 desc.isQuantized = true;
261 desc.quantizeStep = 1; 278 desc.quantizeStep = 1;
262 desc.unit = "s"; 279 desc.unit = "s";
263 list.push_back(desc); 280 list.push_back(desc);
264 281
265 desc.identifier = "diagonalweight"; 282 desc.identifier = "diagonalweight";
266 desc.name = "Diagonal Weight"; 283 desc.name = "Diagonal weight";
267 desc.description = "Weight applied to cost of diagonal step relative to horizontal or vertical step. The default of 2.0 is good for gross tracking of quite different performances; closer to 1.0 produces a smoother path for performances more similar in tempo"; 284 desc.description = "Weight applied to cost of diagonal step relative to horizontal or vertical step. The default of 2.0 is good for gross tracking of quite different performances; closer to 1.0 produces a smoother path for performances more similar in tempo";
268 desc.minValue = 1.0; 285 desc.minValue = 1.0;
269 desc.maxValue = 2.0; 286 desc.maxValue = 2.0;
270 desc.defaultValue = (float)m_defaultParams.diagonalWeight; 287 desc.defaultValue = (float)m_defaultParams.diagonalWeight;
271 desc.isQuantized = false; 288 desc.isQuantized = false;
272 desc.unit = ""; 289 desc.unit = "";
273 list.push_back(desc); 290 list.push_back(desc);
274 291
275 desc.identifier = "smooth"; 292 desc.identifier = "smooth";
276 desc.name = "Smooth Path"; 293 desc.name = "Use path smoothing";
277 desc.description = "Smooth the path by replacing steps with diagonals. (This was enabled by default in earlier versions of the MATCH plugin, but the default now is to produce an un-smoothed path.)"; 294 desc.description = "Smooth the path by replacing steps with diagonals. (This was enabled by default in earlier versions of the MATCH plugin, but the default now is to produce an un-smoothed path.)";
278 desc.minValue = 0; 295 desc.minValue = 0;
279 desc.maxValue = 1; 296 desc.maxValue = 1;
280 desc.defaultValue = 0; 297 desc.defaultValue = 0;
281 desc.isQuantized = true; 298 desc.isQuantized = true;
282 desc.quantizeStep = 1; 299 desc.quantizeStep = 1;
283 desc.unit = ""; 300 desc.unit = "";
284 list.push_back(desc); 301 list.push_back(desc);
285 302
286 desc.identifier = "freq1"; 303 desc.identifier = "serialise";
287 desc.name = "Tuning Frequency of First Input"; 304 desc.name = "Serialise plugin invocations";
288 desc.description = "Tuning frequency (concert A) for the reference audio."; 305 desc.description = "Reduce potential memory load at the expense of multiprocessor performance by serialising multi-threaded plugin runs";
289 desc.minValue = 220.0; 306 desc.minValue = 0;
290 desc.maxValue = 880.0; 307 desc.maxValue = 1;
291 desc.defaultValue = (float)m_defaultFeParams.referenceFrequency; 308 desc.defaultValue = 0;
292 desc.isQuantized = false; 309 desc.isQuantized = true;
293 desc.unit = "Hz"; 310 desc.quantizeStep = 1;
294 list.push_back(desc);
295
296 desc.identifier = "freq2";
297 desc.name = "Tuning Frequency of Second Input";
298 desc.description = "Tuning frequency (concert A) for the other audio.";
299 desc.minValue = 220.0;
300 desc.maxValue = 880.0;
301 desc.defaultValue = (float)m_defaultFeParams.referenceFrequency;
302 desc.isQuantized = false;
303 desc.unit = "Hz";
304 list.push_back(desc); 311 list.push_back(desc);
305 312
306 return list; 313 return list;
307 } 314 }
308 315