Mercurial > hg > sonic-visualiser
comparison transform/FeatureExtractionPluginTransform.cpp @ 33:544ab25d2372
* Add support for plugin classification using category files.
Add separate menus listing plugins by category, maker, and plugin name.
author | Chris Cannam |
---|---|
date | Thu, 21 Sep 2006 16:43:50 +0000 |
parents | 660a973c157a |
children | 209cf46e2413 |
comparison
equal
deleted
inserted
replaced
32:e3b32dc5180b | 33:544ab25d2372 |
---|---|
267 if (blockFrame - int(m_context.blockSize)/2 > endFrame) break; | 267 if (blockFrame - int(m_context.blockSize)/2 > endFrame) break; |
268 } else { | 268 } else { |
269 if (blockFrame >= endFrame) break; | 269 if (blockFrame >= endFrame) break; |
270 } | 270 } |
271 | 271 |
272 std::cerr << "FeatureExtractionPluginTransform::run: blockFrame " | 272 // std::cerr << "FeatureExtractionPluginTransform::run: blockFrame " |
273 << blockFrame << std::endl; | 273 // << blockFrame << std::endl; |
274 | 274 |
275 long completion = | 275 long completion = |
276 (((blockFrame - startFrame) / m_context.stepSize) * 99) / | 276 (((blockFrame - startFrame) / m_context.stepSize) * 99) / |
277 ( (endFrame - startFrame) / m_context.stepSize); | 277 ( (endFrame - startFrame) / m_context.stepSize); |
278 | 278 |
461 int binCount = 1; | 461 int binCount = 1; |
462 if (m_descriptor->hasFixedBinCount) { | 462 if (m_descriptor->hasFixedBinCount) { |
463 binCount = m_descriptor->binCount; | 463 binCount = m_descriptor->binCount; |
464 } | 464 } |
465 | 465 |
466 std::cerr << "FeatureExtractionPluginTransform::setCompletion(" | |
467 << completion << ")" << std::endl; | |
468 | |
466 if (binCount == 0) { | 469 if (binCount == 0) { |
467 | 470 |
468 SparseOneDimensionalModel *model = getOutput<SparseOneDimensionalModel>(); | 471 SparseOneDimensionalModel *model = getOutput<SparseOneDimensionalModel>(); |
469 if (!model) return; | 472 if (!model) return; |
473 std::cerr << "setting on SparseOneDimensionalModel" << std::endl; | |
470 model->setCompletion(completion); | 474 model->setCompletion(completion); |
471 | 475 |
472 } else if (binCount == 1) { | 476 } else if (binCount == 1) { |
473 | 477 |
474 SparseTimeValueModel *model = getOutput<SparseTimeValueModel>(); | 478 SparseTimeValueModel *model = getOutput<SparseTimeValueModel>(); |
475 if (!model) return; | 479 if (!model) return; |
480 std::cerr << "setting on SparseTimeValueModel" << std::endl; | |
476 model->setCompletion(completion); | 481 model->setCompletion(completion); |
477 | 482 |
478 } else if (m_descriptor->sampleType == | 483 } else if (m_descriptor->sampleType == |
479 Vamp::Plugin::OutputDescriptor::VariableSampleRate) { | 484 Vamp::Plugin::OutputDescriptor::VariableSampleRate) { |
480 | 485 |
481 NoteModel *model = getOutput<NoteModel>(); | 486 NoteModel *model = getOutput<NoteModel>(); |
482 if (!model) return; | 487 if (!model) return; |
488 std::cerr << "setting on NoteModel" << std::endl; | |
483 model->setCompletion(completion); | 489 model->setCompletion(completion); |
484 | 490 |
485 } else { | 491 } else { |
486 | 492 |
487 EditableDenseThreeDimensionalModel *model = | 493 EditableDenseThreeDimensionalModel *model = |
488 getOutput<EditableDenseThreeDimensionalModel>(); | 494 getOutput<EditableDenseThreeDimensionalModel>(); |
489 if (!model) return; | 495 if (!model) return; |
496 std::cerr << "setting on EditableDenseThreeDimensionalModel" << std::endl; | |
490 model->setCompletion(completion); | 497 model->setCompletion(completion); |
491 } | 498 } |
492 } | 499 } |
493 | 500 |