diff rdf/RDFExporter.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 a1cd5abcb38b
children 513192aa9b03
line wrap: on
line diff
--- a/rdf/RDFExporter.cpp	Wed Mar 13 14:46:54 2019 +0000
+++ b/rdf/RDFExporter.cpp	Wed Mar 13 14:50:10 2019 +0000
@@ -103,15 +103,14 @@
         if (m) {
             f.hasTimestamp = true;
             f.hasDuration = true;
-            const NoteModel::PointList &pl(m->getPoints());
-            for (NoteModel::PointList::const_iterator i = pl.begin(); 
-                 i != pl.end(); ++i) {
-                f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime();
-                f.duration = RealTime::frame2RealTime(i->duration, sr).toVampRealTime();
+            EventVector ee(m->getPoints());
+            for (auto e: ee) {
+                f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime();
+                f.duration = RealTime::frame2RealTime(e.getDuration(), sr).toVampRealTime();
                 f.values.clear();
-                f.values.push_back(i->value);
-                f.values.push_back(i->level);
-                f.label = i->label.toStdString();
+                f.values.push_back(e.getValue());
+                f.values.push_back(e.getLevel());
+                f.label = e.getLabel().toStdString();
                 m_fw->write(trackId, transform, output, features, summaryType);
             }
             return;