Mercurial > hg > silvet
changeset 306:af19bee9e53b livemode
Merge from default branch
author | Chris Cannam |
---|---|
date | Fri, 05 Dec 2014 16:47:06 +0000 |
parents | f5f3b50b2b9f (current diff) 04a3c152e590 (diff) |
children | 5a181a427ac8 |
files | src/Silvet.cpp |
diffstat | 1 files changed, 3 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Silvet.cpp Fri Dec 05 16:40:51 2014 +0000 +++ b/src/Silvet.cpp Fri Dec 05 16:47:06 2014 +0000 @@ -613,8 +613,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) { @@ -622,9 +622,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_mode == HighQualityMode); @@ -659,18 +657,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);