Mercurial > hg > nnls-chroma
comparison Chordino.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 | 7409ab74c63b |
children | d01f94d58ef0 |
comparison
equal
deleted
inserted
replaced
40:61d35e59ee2b | 41:d6bb9b43ac1c |
---|---|
202 runningstd = SpecialConvolution(runningstd,hw); // second step convolve | 202 runningstd = SpecialConvolution(runningstd,hw); // second step convolve |
203 for (int i = 0; i < 256; i++) { | 203 for (int i = 0; i < 256; i++) { |
204 runningstd[i] = sqrt(runningstd[i]); // square root to finally have running std | 204 runningstd[i] = sqrt(runningstd[i]); // square root to finally have running std |
205 if (runningstd[i] > 0) { | 205 if (runningstd[i] > 0) { |
206 // f2.values[i] = (f2.values[i] / runningmean[i]) > thresh ? | 206 // f2.values[i] = (f2.values[i] / runningmean[i]) > thresh ? |
207 // (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_paling) : 0; | 207 // (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_whitening) : 0; |
208 f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ? | 208 f2.values[i] = (f2.values[i] - runningmean[i]) > 0 ? |
209 (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_paling) : 0; | 209 (f2.values[i] - runningmean[i]) / pow(runningstd[i],m_whitening) : 0; |
210 } | 210 } |
211 if (f2.values[i] < 0) { | 211 if (f2.values[i] < 0) { |
212 cerr << "ERROR: negative value in logfreq spectrum" << endl; | 212 cerr << "ERROR: negative value in logfreq spectrum" << endl; |
213 } | 213 } |
214 } | 214 } |