comparison plugin/FeatureExtractionPluginFactory.cpp @ 37:838652cc31e6

MacOS fixes, TonalChangeDetector added
author Martin Gasser
date Fri, 03 Mar 2006 16:32:45 +0000
parents a7ed14263fe4
children bac8b14ab355
comparison
equal deleted inserted replaced
36:935a2419a77c 37:838652cc31e6
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/ChromagramPlugin.h" //!!!
15 #include "plugins/ZeroCrossing.h" //!!! 15 #include "plugins/ZeroCrossing.h" //!!!
16 // NOTE: added by Martin Gasser
17 #include "plugins/TonalChangeDetect.h" //!!!
16 18
17 #include <iostream> 19 #include <iostream>
18 20
19 static FeatureExtractionPluginFactory *_nativeInstance = 0; 21 static FeatureExtractionPluginFactory *_nativeInstance = 0;
20 22
65 { 67 {
66 std::vector<QString> rv; 68 std::vector<QString> rv;
67 rv.push_back("sv:_builtin:beats"); //!!! 69 rv.push_back("sv:_builtin:beats"); //!!!
68 rv.push_back("sv:_builtin:chromagram"); //!!! 70 rv.push_back("sv:_builtin:chromagram"); //!!!
69 rv.push_back("sv:_builtin:zerocrossing"); //!!! 71 rv.push_back("sv:_builtin:zerocrossing"); //!!!
72 // NOTE: added by Martin Gasser
73 rv.push_back("sv:_builtin:tonalchange"); //!!!
70 return rv; 74 return rv;
71 } 75 }
72 76
73 FeatureExtractionPlugin * 77 FeatureExtractionPlugin *
74 FeatureExtractionPluginFactory::instantiatePlugin(QString identifier, 78 FeatureExtractionPluginFactory::instantiatePlugin(QString identifier,
97 101
98 if (label == "zerocrossing") { 102 if (label == "zerocrossing") {
99 return new ZeroCrossing(inputSampleRate); //!!! 103 return new ZeroCrossing(inputSampleRate); //!!!
100 } 104 }
101 105
106 // NOTE: added by Martin Gasser
107 if (label == "tonalchange") {
108 return new TonalChangeDetect(inputSampleRate); //!!!
109 }
110
102 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Unknown plugin \"" << identifier.toStdString() << "\"" << std::endl; 111 std::cerr << "FeatureExtractionPluginFactory::instantiatePlugin: Unknown plugin \"" << identifier.toStdString() << "\"" << std::endl;
103 112
104 return 0; 113 return 0;
105 } 114 }
106 115