Mercurial > hg > silvet
changeset 305:04a3c152e590
Now that we are returning the pitch activation matrix, we don't want to skip silent columns in the postprocess loop
author | Chris Cannam |
---|---|
date | Fri, 05 Dec 2014 16:46:57 +0000 |
parents | a3229b972463 |
children | af19bee9e53b 07ee4ebea57c |
files | src/Silvet.cpp |
diffstat | 1 files changed, 3 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Silvet.cpp Fri Oct 17 09:34:26 2014 +0100 +++ b/src/Silvet.cpp Fri Dec 05 16:46:57 2014 +0000 @@ -531,8 +531,8 @@ vector<vector<int> >(width, vector<int>(pack.templateNoteCount, 0)); } - vector<bool> present(width, false); - + double columnThreshold = 1e-5; + #pragma omp parallel for for (int i = 0; i < width; ++i) { @@ -540,9 +540,7 @@ for (int j = 0; j < pack.templateHeight; ++j) { sum += filtered.at(i).at(j); } - if (sum < 1e-5) continue; - - present[i] = true; + if (sum < columnThreshold) continue; EM em(&pack, m_hqMode); @@ -577,18 +575,6 @@ for (int i = 0; i < width; ++i) { - if (!present[i]) { - // silent column - for (int j = 0; j < pack.templateNoteCount; ++j) { - m_postFilter[j]->push(0.0); - } - m_pianoRoll.push_back(map<int, double>()); - if (wantShifts) { - m_pianoRollShifts.push_back(map<int, int>()); - } - continue; - } - vector<double> filtered = postProcess (localPitches[i], localBestShifts[i], wantShifts);