Mercurial > hg > svcore
comparison plugin/FeatureExtractionPluginFactory.cpp @ 19:a7ed14263fe4
* Add Chromagram plugin, and make a number of fixes to the dense 3d model
and colour 3d plot class to accommodate it
* Add pitch-conversion methods in base/Pitch
* Commit previously overlooked Command.cpp
author | Chris Cannam |
---|---|
date | Wed, 01 Feb 2006 14:49:49 +0000 |
parents | d86891498eef |
children | 838652cc31e6 |
comparison
equal
deleted
inserted
replaced
18:4563a72c1d8b | 19:a7ed14263fe4 |
---|---|
9 | 9 |
10 #include "FeatureExtractionPluginFactory.h" | 10 #include "FeatureExtractionPluginFactory.h" |
11 #include "PluginIdentifier.h" | 11 #include "PluginIdentifier.h" |
12 | 12 |
13 #include "plugins/BeatDetect.h" //!!! | 13 #include "plugins/BeatDetect.h" //!!! |
14 #include "plugins/ChromagramPlugin.h" //!!! | |
14 #include "plugins/ZeroCrossing.h" //!!! | 15 #include "plugins/ZeroCrossing.h" //!!! |
15 | 16 |
16 #include <iostream> | 17 #include <iostream> |
17 | 18 |
18 static FeatureExtractionPluginFactory *_nativeInstance = 0; | 19 static FeatureExtractionPluginFactory *_nativeInstance = 0; |
62 std::vector<QString> | 63 std::vector<QString> |
63 FeatureExtractionPluginFactory::getPluginIdentifiers() | 64 FeatureExtractionPluginFactory::getPluginIdentifiers() |
64 { | 65 { |
65 std::vector<QString> rv; | 66 std::vector<QString> rv; |
66 rv.push_back("sv:_builtin:beats"); //!!! | 67 rv.push_back("sv:_builtin:beats"); //!!! |
68 rv.push_back("sv:_builtin:chromagram"); //!!! | |
67 rv.push_back("sv:_builtin:zerocrossing"); //!!! | 69 rv.push_back("sv:_builtin:zerocrossing"); //!!! |
68 return rv; | 70 return rv; |
69 } | 71 } |
70 | 72 |
71 FeatureExtractionPlugin * | 73 FeatureExtractionPlugin * |
87 | 89 |
88 if (label == "beats") { | 90 if (label == "beats") { |
89 return new BeatDetector(inputSampleRate); //!!! | 91 return new BeatDetector(inputSampleRate); //!!! |
90 } | 92 } |
91 | 93 |
94 if (label == "chromagram") { | |
95 return new ChromagramPlugin(inputSampleRate); //!!! | |
96 } | |
97 | |
92 if (label == "zerocrossing") { | 98 if (label == "zerocrossing") { |
93 return new ZeroCrossing(inputSampleRate); //!!! | 99 return new ZeroCrossing(inputSampleRate); //!!! |
94 } | 100 } |
95 | 101 |
96 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Unknown plugin \"" << identifier.toStdString() << "\"" << std::endl; | 102 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Unknown plugin \"" << identifier.toStdString() << "\"" << std::endl; |