Skip to content

Commit

Permalink
OnsetDetectionGlobal: fix vector copy.
Browse files Browse the repository at this point in the history
  • Loading branch information
wo80 committed Jan 1, 2024
1 parent a4b1244 commit 57c2e6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/algorithms/rhythm/onsetdetectionglobal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ void OnsetDetectionGlobal::computeBeatEmphasis() {
// Matlab M.Davies: take top 40% of weights, zero the rest (not in the paper!)
vector<Real> sorted;
sorted.reserve(_numberERBBands);
copy(weightsERB.begin(), weightsERB.end(), sorted.begin());
copy(weightsERB.begin(), weightsERB.end(), std::back_inserter(sorted));
sort(sorted.begin(), sorted.end());
Real threshold = sorted[int(floor(_numberERBBands * 0.6))];

Expand Down

0 comments on commit 57c2e6f

Please sign in to comment.