comparison plugin/transform/FeatureExtractionModelTransformer.cpp @ 333:1afaf98dbf11

* Factor out uses of "Sonic Visualiser" in "common" code to applicationName() * Add ability to show work title + artist in top-left of pane (thinking of Vect but may be useful in SV in future) * A few other generalisations useful for Vect
author Chris Cannam
date Fri, 09 Nov 2007 17:46:58 +0000
parents f620ce48c950
children aa8dbac62024
comparison
equal deleted inserted replaced
332:13e5870040e6 333:1afaf98dbf11
214 model->setBinNames(names); 214 model->setBinNames(names);
215 } 215 }
216 216
217 m_output = model; 217 m_output = model;
218 } 218 }
219
220 if (m_output) m_output->setSourceModel(m_input);
219 } 221 }
220 222
221 FeatureExtractionModelTransformer::~FeatureExtractionModelTransformer() 223 FeatureExtractionModelTransformer::~FeatureExtractionModelTransformer()
222 { 224 {
223 std::cerr << "FeatureExtractionModelTransformer::~FeatureExtractionModelTransformer()" << std::endl; 225 std::cerr << "FeatureExtractionModelTransformer::~FeatureExtractionModelTransformer()" << std::endl;
525 527
526 if (binCount == 0) { 528 if (binCount == 0) {
527 529
528 SparseOneDimensionalModel *model = getOutput<SparseOneDimensionalModel>(); 530 SparseOneDimensionalModel *model = getOutput<SparseOneDimensionalModel>();
529 if (!model) return; 531 if (!model) return;
530 model->setCompletion(completion); 532 model->setCompletion(completion, m_context.updates);
531 533
532 } else if (binCount == 1) { 534 } else if (binCount == 1) {
533 535
534 SparseTimeValueModel *model = getOutput<SparseTimeValueModel>(); 536 SparseTimeValueModel *model = getOutput<SparseTimeValueModel>();
535 if (!model) return; 537 if (!model) return;
536 model->setCompletion(completion); 538 model->setCompletion(completion, m_context.updates);
537 539
538 } else if (m_descriptor->sampleType == 540 } else if (m_descriptor->sampleType ==
539 Vamp::Plugin::OutputDescriptor::VariableSampleRate) { 541 Vamp::Plugin::OutputDescriptor::VariableSampleRate) {
540 542
541 NoteModel *model = getOutput<NoteModel>(); 543 NoteModel *model = getOutput<NoteModel>();
542 if (!model) return; 544 if (!model) return;
543 model->setCompletion(completion); 545 model->setCompletion(completion, m_context.updates);
544 546
545 } else { 547 } else {
546 548
547 EditableDenseThreeDimensionalModel *model = 549 EditableDenseThreeDimensionalModel *model =
548 getOutput<EditableDenseThreeDimensionalModel>(); 550 getOutput<EditableDenseThreeDimensionalModel>();
549 if (!model) return; 551 if (!model) return;
550 model->setCompletion(completion); 552 model->setCompletion(completion, m_context.updates);
551 } 553 }
552 } 554 }
553 555