Mercurial > hg > svcore
diff data/model/SparseOneDimensionalModel.h @ 1643:7a23dfe65d66 single-point
Update NoteModel to use EventSeries. This is incomplete and won't provide enough to update svgui for it yet; must also refactor to avoid duplication of nasty APIs when updating the rest of the models
author | Chris Cannam |
---|---|
date | Wed, 13 Mar 2019 14:50:10 +0000 |
parents | 24dc8cb42755 |
children | 5b7b01da430a |
line wrap: on
line diff
--- a/data/model/SparseOneDimensionalModel.h Wed Mar 13 14:46:54 2019 +0000 +++ b/data/model/SparseOneDimensionalModel.h Wed Mar 13 14:50:10 2019 +0000 @@ -18,6 +18,7 @@ #include "SparseModel.h" #include "base/NoteData.h" +#include "base/NoteExportable.h" #include "base/PlayParameterRepository.h" #include "base/RealTime.h" @@ -188,12 +189,18 @@ */ NoteList getNotes() const override { - return getNotesWithin(getStartFrame(), getEndFrame()); + return getNotesStartingWithin(getStartFrame(), + getEndFrame() - getStartFrame()); } - NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const override { + NoteList getNotesActiveAt(sv_frame_t frame) const override { + return getNotesStartingWithin(frame, 1); + } + + NoteList getNotesStartingWithin(sv_frame_t startFrame, + sv_frame_t duration) const override { - PointList points = getPoints(startFrame, endFrame); + PointList points = getPoints(startFrame, startFrame + duration); NoteList notes; for (PointList::iterator pli =