Mercurial > hg > sonic-visualiser
comparison transform/TransformFactory.cpp @ 73:e200055fe80b
* Add vertical zooming and snap-to-selection for OSC control;
add a demo script
author | Chris Cannam |
---|---|
date | Wed, 15 Nov 2006 18:22:26 +0000 |
parents | f7cb156508cc |
children | bedc7517b6e8 |
comparison
equal
deleted
inserted
replaced
72:34dc23246f46 | 73:e200055fe80b |
---|---|
619 } | 619 } |
620 | 620 |
621 if (ok) m_lastConfigurations[name] = configurationXml; | 621 if (ok) m_lastConfigurations[name] = configurationXml; |
622 | 622 |
623 return ok ? inputModel : 0; | 623 return ok ? inputModel : 0; |
624 } | |
625 | |
626 PluginTransform::ExecutionContext | |
627 TransformFactory::getDefaultContextForTransform(TransformName name, | |
628 Model *inputModel) | |
629 { | |
630 PluginTransform::ExecutionContext context(-1); | |
631 | |
632 QString id = name.section(':', 0, 2); | |
633 | |
634 if (FeatureExtractionPluginFactory::instanceFor(id)) { | |
635 | |
636 Vamp::Plugin *vp = | |
637 FeatureExtractionPluginFactory::instanceFor(id)->instantiatePlugin | |
638 (id, inputModel ? inputModel->getSampleRate() : 48000); | |
639 | |
640 if (vp) context = PluginTransform::ExecutionContext(-1, vp); | |
641 | |
642 } | |
643 | |
644 return context; | |
624 } | 645 } |
625 | 646 |
626 Transform * | 647 Transform * |
627 TransformFactory::createTransform(TransformName name, Model *inputModel, | 648 TransformFactory::createTransform(TransformName name, Model *inputModel, |
628 const PluginTransform::ExecutionContext &context, | 649 const PluginTransform::ExecutionContext &context, |