Mercurial > hg > svgui
diff layer/FlexiNoteLayer.cpp @ 1429:8a7c82282fbc single-point
Update TimeValueLayer etc
author | Chris Cannam |
---|---|
date | Tue, 19 Mar 2019 13:06:35 +0000 |
parents | f792a5001d80 |
children | 11a150e65ee1 |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.cpp Fri Mar 15 14:24:22 2019 +0000 +++ b/layer/FlexiNoteLayer.cpp Tue Mar 19 13:06:35 2019 +0000 @@ -1451,8 +1451,8 @@ std::cerr << model->getTypeName() << std::endl; - SparseModel<TimeValuePoint>::PointList dataPoints = - model->getPoints(note.getFrame(), note.getFrame() + note.getDuration()); + EventVector dataPoints = + model->getEventsWithin(note.getFrame(), note.getDuration()); std::cerr << "frame " << note.getFrame() << ": " << dataPoints.size() << " candidate points" << std::endl; @@ -1460,12 +1460,9 @@ std::vector<double> pitchValues; - for (SparseModel<TimeValuePoint>::PointList::const_iterator i = + for (EventVector::const_iterator i = dataPoints.begin(); i != dataPoints.end(); ++i) { - if (i->frame >= note.getFrame() && - i->frame < note.getFrame() + note.getDuration()) { - pitchValues.push_back(i->value); - } + pitchValues.push_back(i->getValue()); } if (pitchValues.empty()) return false;