comparison 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
comparison
equal deleted inserted replaced
1642:d591836e47ef 1643:7a23dfe65d66
101 { 101 {
102 NoteModel *m = dynamic_cast<NoteModel *>(m_model); 102 NoteModel *m = dynamic_cast<NoteModel *>(m_model);
103 if (m) { 103 if (m) {
104 f.hasTimestamp = true; 104 f.hasTimestamp = true;
105 f.hasDuration = true; 105 f.hasDuration = true;
106 const NoteModel::PointList &pl(m->getPoints()); 106 EventVector ee(m->getPoints());
107 for (NoteModel::PointList::const_iterator i = pl.begin(); 107 for (auto e: ee) {
108 i != pl.end(); ++i) { 108 f.timestamp = RealTime::frame2RealTime(e.getFrame(), sr).toVampRealTime();
109 f.timestamp = RealTime::frame2RealTime(i->frame, sr).toVampRealTime(); 109 f.duration = RealTime::frame2RealTime(e.getDuration(), sr).toVampRealTime();
110 f.duration = RealTime::frame2RealTime(i->duration, sr).toVampRealTime();
111 f.values.clear(); 110 f.values.clear();
112 f.values.push_back(i->value); 111 f.values.push_back(e.getValue());
113 f.values.push_back(i->level); 112 f.values.push_back(e.getLevel());
114 f.label = i->label.toStdString(); 113 f.label = e.getLabel().toStdString();
115 m_fw->write(trackId, transform, output, features, summaryType); 114 m_fw->write(trackId, transform, output, features, summaryType);
116 } 115 }
117 return; 116 return;
118 } 117 }
119 } 118 }