Mercurial > hg > nnls-chroma
comparison NNLSBase.cpp @ 100:d1398182a072 matthiasm-plugin
s parameter setting now has an effect
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Tue, 07 Dec 2010 10:56:55 +0900 |
parents | dab7e7bfeba1 |
children | 9d81703dcf6e |
comparison
equal
deleted
inserted
replaced
99:daee3c60c4f9 | 100:d1398182a072 |
---|---|
55 cosvalues(0) | 55 cosvalues(0) |
56 { | 56 { |
57 if (debug_on) cerr << "--> NNLSBase" << endl; | 57 if (debug_on) cerr << "--> NNLSBase" << endl; |
58 // make the *note* dictionary matrix | 58 // make the *note* dictionary matrix |
59 m_dict = new float[nNote * 84]; | 59 m_dict = new float[nNote * 84]; |
60 for (unsigned i = 0; i < nNote * 84; ++i) m_dict[i] = 0.0; | 60 for (unsigned i = 0; i < nNote * 84; ++i) m_dict[i] = 0.0; |
61 dictionaryMatrix(m_dict, 0.7); | |
62 } | 61 } |
63 | 62 |
64 | 63 |
65 NNLSBase::~NNLSBase() | 64 NNLSBase::~NNLSBase() |
66 { | 65 { |
352 { | 351 { |
353 if (debug_on) { | 352 if (debug_on) { |
354 cerr << "--> initialise"; | 353 cerr << "--> initialise"; |
355 } | 354 } |
356 | 355 |
356 dictionaryMatrix(m_dict, m_s); | |
357 | |
357 // make things for tuning estimation | 358 // make things for tuning estimation |
358 for (int iBPS = 0; iBPS < nBPS; ++iBPS) { | 359 for (int iBPS = 0; iBPS < nBPS; ++iBPS) { |
359 sinvalues.push_back(sin(2*M_PI*(iBPS*1.0/nBPS))); | 360 sinvalues.push_back(sin(2*M_PI*(iBPS*1.0/nBPS))); |
360 cosvalues.push_back(cos(2*M_PI*(iBPS*1.0/nBPS))); | 361 cosvalues.push_back(cos(2*M_PI*(iBPS*1.0/nBPS))); |
361 } | 362 } |