Mercurial > hg > svcore
comparison rdf/RDFImporter.cpp @ 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 | 70e172e6cc59 |
children | 513192aa9b03 |
comparison
equal
deleted
inserted
replaced
1642:d591836e47ef | 1643:7a23dfe65d66 |
---|---|
743 value = values[0]; | 743 value = values[0]; |
744 if (values.size() > 1) { | 744 if (values.size() > 1) { |
745 level = values[1]; | 745 level = values[1]; |
746 } | 746 } |
747 } | 747 } |
748 NoteModel::Point point(ftime, value, fduration, level, label); | 748 Event point(ftime, value, fduration, level, label); |
749 nm->addPoint(point); | 749 nm->addPoint(point); |
750 } else { | 750 } else { |
751 float value = 0.f, duration = 1.f, level = 1.f; | 751 float value = 0.f, duration = 1.f, level = 1.f; |
752 if (!values.empty()) { | 752 if (!values.empty()) { |
753 value = values[0]; | 753 value = values[0]; |
756 if (values.size() > 2) { | 756 if (values.size() > 2) { |
757 level = values[2]; | 757 level = values[2]; |
758 } | 758 } |
759 } | 759 } |
760 } | 760 } |
761 NoteModel::Point point(ftime, value, sv_frame_t(lrintf(duration)), | 761 Event point(ftime, value, sv_frame_t(lrintf(duration)), |
762 level, label); | 762 level, label); |
763 nm->addPoint(point); | 763 nm->addPoint(point); |
764 } | 764 } |
765 return; | 765 return; |
766 } | 766 } |
767 | 767 |