Mercurial > hg > nnls-chroma
comparison NNLSChroma.cpp @ 41:d6bb9b43ac1c matthiasm-plugin
README and new parameters, not tested yet
author | Matthias Mauch <mail@matthiasmauch.net> |
---|---|
date | Fri, 22 Oct 2010 21:43:57 +0900 |
parents | 3c261b864e49 |
children | d01f94d58ef0 |
comparison
equal
deleted
inserted
replaced
40:61d35e59ee2b | 41:d6bb9b43ac1c |
---|---|
274 runningstd = SpecialConvolution(runningstd,hw); // second step convolve | 274 runningstd = SpecialConvolution(runningstd,hw); // second step convolve |
275 for (int i = 0; i < 256; i++) { | 275 for (int i = 0; i < 256; i++) { |
276 runningstd[i] = sqrt(runningstd[i]); // square root to finally have running std | 276 runningstd[i] = sqrt(runningstd[i]); // square root to finally have running std |
277 if (runningstd[i] > 0) { | 277 if (runningstd[i] > 0) { |
278 // f2.values[i] = (f2.values[i] / runningmean[i]) > thresh ? | 278 // f2.values[i] = (f2.values[i] / runningmean[i]) > thresh ? |
279 // (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_paling) : 0; | 279 // (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_whitening) : 0; |
280 f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ? | 280 f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ? |
281 (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_paling) : 0; | 281 (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_whitening) : 0; |
282 } | 282 } |
283 if (f2.values[i] < 0) { | 283 if (f2.values[i] < 0) { |
284 cerr << "ERROR: negative value in logfreq spectrum" << endl; | 284 cerr << "ERROR: negative value in logfreq spectrum" << endl; |
285 } | 285 } |
286 } | 286 } |