comparison framework/MainWindowBase.cpp @ 649:284cb118368e single-point

Further updates for new API - but we still need some more support in the API itself
author Chris Cannam
date Tue, 19 Mar 2019 13:06:58 +0000
parents eec0c50bb44f
children b63dfd7e2780
comparison
equal deleted inserted replaced
648:eec0c50bb44f 649:284cb118368e
1160 } 1160 }
1161 } 1161 }
1162 1162
1163 m_labeller->setSampleRate(sodm->getSampleRate()); 1163 m_labeller->setSampleRate(sodm->getSampleRate());
1164 1164
1165 if (m_labeller->actingOnPrevPoint() && havePrevPoint) { 1165 if (m_labeller->actingOnPrevEvent() && havePrevPoint) {
1166 command->deletePoint(prevPoint); 1166 command->deletePoint(prevPoint);
1167 } 1167 }
1168 1168 /*!!! to be updated after we have switched SODM to new API
1169 m_labeller->label<SparseOneDimensionalModel::Point> 1169 m_labeller->label<SparseOneDimensionalModel::Point>
1170 (point, havePrevPoint ? &prevPoint : nullptr); 1170 (point, havePrevPoint ? &prevPoint : nullptr);
1171 1171 */
1172 if (m_labeller->actingOnPrevPoint() && havePrevPoint) { 1172 if (m_labeller->actingOnPrevEvent() && havePrevPoint) {
1173 command->addPoint(prevPoint); 1173 command->addPoint(prevPoint);
1174 } 1174 }
1175 } 1175 }
1176 1176
1177 command->addPoint(point); 1177 command->addPoint(point);
1280 1280
1281 if (!m_labeller) return; 1281 if (!m_labeller) return;
1282 1282
1283 Labeller labeller(*m_labeller); 1283 Labeller labeller(*m_labeller);
1284 labeller.setSampleRate(sodm->getSampleRate()); 1284 labeller.setSampleRate(sodm->getSampleRate());
1285 1285 /*!!! to be updated after SODM API update
1286 Command *c = labeller.labelAll<SparseOneDimensionalModel::Point>(*sodm, &ms); 1286 Command *c = labeller.labelAll<SparseOneDimensionalModel::Point>(*sodm, &ms);
1287 if (c) CommandHistory::getInstance()->addCommand(c, false); 1287 if (c) CommandHistory::getInstance()->addCommand(c, false);
1288 */
1288 } 1289 }
1289 1290
1290 void 1291 void
1291 MainWindowBase::subdivideInstantsBy(int n) 1292 MainWindowBase::subdivideInstantsBy(int n)
1292 { 1293 {
1306 if (!m_labeller) return; 1307 if (!m_labeller) return;
1307 1308
1308 Labeller labeller(*m_labeller); 1309 Labeller labeller(*m_labeller);
1309 labeller.setSampleRate(sodm->getSampleRate()); 1310 labeller.setSampleRate(sodm->getSampleRate());
1310 1311
1312 (void)n;
1313 /*!!! to be updated after SODM API update
1311 Command *c = labeller.subdivide<SparseOneDimensionalModel::Point> 1314 Command *c = labeller.subdivide<SparseOneDimensionalModel::Point>
1312 (*sodm, &ms, n); 1315 (*sodm, &ms, n);
1313 if (c) CommandHistory::getInstance()->addCommand(c, false); 1316 if (c) CommandHistory::getInstance()->addCommand(c, false);
1317 */
1314 } 1318 }
1315 1319
1316 void 1320 void
1317 MainWindowBase::winnowInstantsBy(int n) 1321 MainWindowBase::winnowInstantsBy(int n)
1318 { 1322 {
1332 if (!m_labeller) return; 1336 if (!m_labeller) return;
1333 1337
1334 Labeller labeller(*m_labeller); 1338 Labeller labeller(*m_labeller);
1335 labeller.setSampleRate(sodm->getSampleRate()); 1339 labeller.setSampleRate(sodm->getSampleRate());
1336 1340
1341 (void)n;
1342 /*!!! to be updated after SODM API update
1337 Command *c = labeller.winnow<SparseOneDimensionalModel::Point> 1343 Command *c = labeller.winnow<SparseOneDimensionalModel::Point>
1338 (*sodm, &ms, n); 1344 (*sodm, &ms, n);
1339 if (c) CommandHistory::getInstance()->addCommand(c, false); 1345 if (c) CommandHistory::getInstance()->addCommand(c, false);
1346 */
1340 } 1347 }
1341 1348
1342 MainWindowBase::FileOpenStatus 1349 MainWindowBase::FileOpenStatus
1343 MainWindowBase::openPath(QString fileOrUrl, AudioFileOpenMode mode) 1350 MainWindowBase::openPath(QString fileOrUrl, AudioFileOpenMode mode)
1344 { 1351 {