diff plugin/FeatureExtractionPluginFactory.cpp @ 47:bac8b14ab355

* Add menu for re-adding existing layers * Fix layer tree window so that it at least approximates correct * Add bundled operations in command history, for use with things like multiple consecutive changes to a parameter value * Disambiguate plugins that happen to have identical descriptions * Add spectral centroid plugin (could use some parameters!) * Some other fixes
author Chris Cannam
date Fri, 17 Mar 2006 17:38:28 +0000
parents 838652cc31e6
children 39ae3dee27b9
line wrap: on
line diff
--- a/plugin/FeatureExtractionPluginFactory.cpp	Thu Mar 16 18:46:00 2006 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Fri Mar 17 17:38:28 2006 +0000
@@ -13,7 +13,7 @@
 #include "plugins/BeatDetect.h" //!!!
 #include "plugins/ChromagramPlugin.h" //!!!
 #include "plugins/ZeroCrossing.h" //!!!
-// NOTE: added by Martin Gasser
+#include "plugins/SpectralCentroid.h" //!!!
 #include "plugins/TonalChangeDetect.h" //!!!
 
 #include <iostream>
@@ -69,8 +69,8 @@
     rv.push_back("sv:_builtin:beats"); //!!!
     rv.push_back("sv:_builtin:chromagram"); //!!!
     rv.push_back("sv:_builtin:zerocrossing"); //!!!
-	// NOTE: added by Martin Gasser
-	rv.push_back("sv:_builtin:tonalchange"); //!!!
+    rv.push_back("sv:_builtin:spectralcentroid"); //!!!
+    rv.push_back("sv:_builtin:tonalchange"); //!!!
     return rv;
 }
 
@@ -103,7 +103,10 @@
 	return new ZeroCrossing(inputSampleRate); //!!!
     }
 
-	// NOTE: added by Martin Gasser
+    if (label == "spectralcentroid") {
+	return new SpectralCentroid(inputSampleRate); //!!!
+    }
+
     if (label == "tonalchange") {
 	return new TonalChangeDetect(inputSampleRate); //!!!
     }