Mercurial > hg > nnls-chroma
comparison NNLSBase.cpp @ 89:7af5312e66f8 matthiasm-plugin
new boost N parameter in chordino, chord dictionary loaded on initialisation (not construction) of plugin
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Wed, 01 Dec 2010 23:08:55 +0900 |
parents | e5c16976513d |
children | b56dde3417d4 |
comparison
equal
deleted
inserted
replaced
88:fc28c50caace | 89:7af5312e66f8 |
---|---|
28 | 28 |
29 const bool debug_on = false; | 29 const bool debug_on = false; |
30 | 30 |
31 NNLSBase::NNLSBase(float inputSampleRate) : | 31 NNLSBase::NNLSBase(float inputSampleRate) : |
32 Plugin(inputSampleRate), | 32 Plugin(inputSampleRate), |
33 m_frameCount(0), | |
33 m_logSpectrum(0), | 34 m_logSpectrum(0), |
34 m_blockSize(0), | 35 m_blockSize(0), |
35 m_stepSize(0), | 36 m_stepSize(0), |
36 m_lengthOfNoteIndex(0), | 37 m_lengthOfNoteIndex(0), |
37 m_meanTunings(0), | 38 m_meanTunings(0), |
38 m_localTunings(0), | 39 m_localTunings(0), |
39 m_whitening(1.0), | 40 m_whitening(1.0), |
40 m_preset(0.0), | 41 m_preset(0.0), |
42 m_useNNLS(1), | |
43 m_useHMM(1), | |
41 m_localTuning(0), | 44 m_localTuning(0), |
42 m_kernelValue(0), | 45 m_kernelValue(0), |
43 m_kernelFftIndex(0), | 46 m_kernelFftIndex(0), |
44 m_kernelNoteIndex(0), | 47 m_kernelNoteIndex(0), |
45 m_dict(0), | 48 m_dict(0), |
46 m_tuneLocal(0), | 49 m_tuneLocal(0), |
47 m_doNormalizeChroma(0), | 50 m_doNormalizeChroma(0), |
48 m_rollon(0), | 51 m_rollon(0), |
52 m_boostN(1.1), | |
49 m_s(0.7), | 53 m_s(0.7), |
50 m_useNNLS(1), | |
51 m_useHMM(1), | |
52 sinvalues(0), | 54 sinvalues(0), |
53 cosvalues(0) | 55 cosvalues(0) |
54 { | 56 { |
55 if (debug_on) cerr << "--> NNLSBase" << endl; | 57 if (debug_on) cerr << "--> NNLSBase" << endl; |
56 | 58 |
236 | 238 |
237 if (identifier == "rollon") { | 239 if (identifier == "rollon") { |
238 return m_rollon; | 240 return m_rollon; |
239 } | 241 } |
240 | 242 |
243 if (identifier == "boostn") { | |
244 return m_boostN; | |
245 } | |
246 | |
241 if (identifier == "tuningmode") { | 247 if (identifier == "tuningmode") { |
242 if (m_tuneLocal) { | 248 if (m_tuneLocal) { |
243 return 1.0; | 249 return 1.0; |
244 } else { | 250 } else { |
245 return 0.0; | 251 return 0.0; |
276 m_s = value; | 282 m_s = value; |
277 } | 283 } |
278 | 284 |
279 if (identifier == "useHMM") { | 285 if (identifier == "useHMM") { |
280 m_useHMM = value; | 286 m_useHMM = value; |
287 } | |
288 | |
289 if (identifier == "boostn") { | |
290 m_boostN = value; | |
281 } | 291 } |
282 | 292 |
283 if (identifier == "tuningmode") { | 293 if (identifier == "tuningmode") { |
284 // m_tuneLocal = (value > 0) ? true : false; | 294 // m_tuneLocal = (value > 0) ? true : false; |
285 m_tuneLocal = value; | 295 m_tuneLocal = value; |