Mercurial > hg > nnls-chroma
comparison NNLSBase.cpp @ 60:9a1f83057e84 matthiasm-plugin
harmonic change had no identifier, changed that in .cpp and .n3 files
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Tue, 26 Oct 2010 13:01:54 +0900 |
parents | 1ccb883b585f |
children | d398e73b46e0 |
comparison
equal
deleted
inserted
replaced
59:1ccb883b585f | 60:9a1f83057e84 |
---|---|
47 m_localTuning(0), | 47 m_localTuning(0), |
48 m_kernelValue(0), | 48 m_kernelValue(0), |
49 m_kernelFftIndex(0), | 49 m_kernelFftIndex(0), |
50 m_kernelNoteIndex(0), | 50 m_kernelNoteIndex(0), |
51 m_dict(0), | 51 m_dict(0), |
52 m_tuneLocal(false), | 52 m_tuneLocal(0), |
53 m_chorddict(0), | 53 m_chorddict(0), |
54 m_chordnames(0), | 54 m_chordnames(0), |
55 m_doNormalizeChroma(0), | 55 m_doNormalizeChroma(0), |
56 m_rollon(0.0), | 56 m_rollon(0), |
57 m_s(0.7), | 57 m_s(0.7), |
58 m_useNNLS(1), | 58 m_useNNLS(1), |
59 m_useHMM(1) | 59 m_useHMM(1) |
60 { | 60 { |
61 if (debug_on) cerr << "--> NNLSBase" << endl; | 61 if (debug_on) cerr << "--> NNLSBase" << endl; |
288 if (identifier == "useHMM") { | 288 if (identifier == "useHMM") { |
289 m_useHMM = value; | 289 m_useHMM = value; |
290 } | 290 } |
291 | 291 |
292 if (identifier == "tuningmode") { | 292 if (identifier == "tuningmode") { |
293 m_tuneLocal = (value > 0) ? true : false; | 293 // m_tuneLocal = (value > 0) ? true : false; |
294 m_tuneLocal = value; | |
294 // cerr << "m_tuneLocal :" << m_tuneLocal << endl; | 295 // cerr << "m_tuneLocal :" << m_tuneLocal << endl; |
295 } | 296 } |
296 // if (identifier == "preset") { | 297 // if (identifier == "preset") { |
297 // m_preset = value; | 298 // m_preset = value; |
298 // if (m_preset == 0.0) { | 299 // if (m_preset == 0.0) { |
553 Feature f2; // tuned log-frequency spectrum | 554 Feature f2; // tuned log-frequency spectrum |
554 f2.hasTimestamp = true; | 555 f2.hasTimestamp = true; |
555 f2.timestamp = f1.timestamp; | 556 f2.timestamp = f1.timestamp; |
556 f2.values.push_back(0.0); f2.values.push_back(0.0); // set lower edge to zero | 557 f2.values.push_back(0.0); f2.values.push_back(0.0); // set lower edge to zero |
557 | 558 |
558 if (m_tuneLocal) { | 559 if (m_tuneLocal == 1.0) { |
559 intShift = floor(m_localTuning[count] * 3); | 560 intShift = floor(m_localTuning[count] * 3); |
560 intFactor = m_localTuning[count] * 3 - intShift; // intFactor is a really bad name for this | 561 intFactor = m_localTuning[count] * 3 - intShift; // intFactor is a really bad name for this |
561 } | 562 } |
562 | 563 |
563 // cerr << intShift << " " << intFactor << endl; | 564 // cerr << intShift << " " << intFactor << endl; |