changeset 52:0bf1486dc674 matthiasm-plugin

reduced parameters for tuning plugin
author matthiasm
date Mon, 25 Oct 2010 18:48:39 +0900
parents 9ea1b92082fc
children bc161fd73858
files README Tuning.cpp Tuning.h
diffstat 3 files changed, 34 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/README	Mon Oct 25 18:36:30 2010 +0900
+++ b/README	Mon Oct 25 18:48:39 2010 +0900
@@ -59,3 +59,5 @@
 
 ## References and Credits ##
 
+
+
--- a/Tuning.cpp	Mon Oct 25 18:36:30 2010 +0900
+++ b/Tuning.cpp	Mon Oct 25 18:48:39 2010 +0900
@@ -41,6 +41,13 @@
     if (debug_on) cerr << "--> ~Tuning" << endl;
 }
 
+size_t 
+Tuning::getPreferredStepSize() const
+{
+    if (debug_on) cerr << "--> getPreferredStepSize" << endl;
+    return 2048*4; 
+}
+
 string
 Tuning::getIdentifier() const
 {
@@ -63,6 +70,28 @@
     return "This plugin provides a number of features derived from a log-frequency amplitude spectrum of the DFT: some variants of the log-frequency spectrum, including a semitone spectrum derived from approximate transcription using the NNLS algorithm; based on this semitone spectrum, chroma features and a simple chord estimate.";
 }
 
+Tuning::ParameterList
+Tuning::getParameterDescriptors() const
+{
+    if (debug_on) cerr << "--> getParameterDescriptors" << endl;
+    ParameterList list;
+
+    ParameterDescriptor d0;
+    d0.identifier = "rollon";
+    d0.name = "spectral roll-on";
+    d0.description = "The bins below the spectral roll-on quantile will be set to 0.";
+    d0.unit = "";
+    d0.minValue = 0;
+    d0.maxValue = 0.05;
+    d0.defaultValue = 0;
+    d0.isQuantized = true;
+	d0.quantizeStep = 0.005;
+    list.push_back(d0);
+
+
+    return list;
+}
+
 Tuning::OutputList
 Tuning::getOutputDescriptors() const
 {
--- a/Tuning.h	Mon Oct 25 18:36:30 2010 +0900
+++ b/Tuning.h	Mon Oct 25 18:48:39 2010 +0900
@@ -33,7 +33,9 @@
     string getIdentifier() const;
     string getName() const;
     string getDescription() const;
-
+    size_t getPreferredStepSize() const;
+    
+    ParameterList getParameterDescriptors() const;
     OutputList getOutputDescriptors() const;
 
     FeatureSet process(const float *const *inputBuffers,