Mercurial > hg > silvet
diff src/Silvet.cpp @ 48:1a4cab304d68 preshift
Sum rather than max?
author | Chris Cannam |
---|---|
date | Mon, 07 Apr 2014 14:36:52 +0100 |
parents | ccb1a437a828 |
children | ce1d88759557 |
line wrap: on
line diff
--- a/src/Silvet.cpp Mon Apr 07 14:18:39 2014 +0100 +++ b/src/Silvet.cpp Mon Apr 07 14:36:52 2014 +0100 @@ -26,6 +26,7 @@ #include <cstdio> using std::vector; +using std::cout; using std::cerr; using std::endl; using Vamp::RealTime; @@ -461,12 +462,12 @@ vector<double> filtered; for (int j = 0; j < processingNotes; ++j) { - double noteMax = 0.0; + double noteSum = 0.0; for (int s = 0; s < processingShifts; ++s) { double val = pitches[j * processingShifts + s]; - if (val > noteMax) noteMax = val; + noteSum += val; } - m_postFilter[j]->push(noteMax); + m_postFilter[j]->push(noteSum); filtered.push_back(m_postFilter[j]->get()); }