changeset 59:1ccb883b585f matthiasm-plugin

more README and n3 updates; changed rollon parameter to percentage
author matthiasm
date Mon, 25 Oct 2010 23:47:06 +0900
parents 01bc078f5f61
children 9a1f83057e84
files Chordino.cpp NNLSBase.cpp README Tuning.cpp nnls-chroma.n3
diffstat 5 files changed, 39 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/Chordino.cpp	Mon Oct 25 22:57:47 2010 +0900
+++ b/Chordino.cpp	Mon Oct 25 23:47:06 2010 +0900
@@ -97,7 +97,7 @@
     d0.identifier = "rollon";
     d0.name = "spectral roll-on";
     d0.description = "Consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.";
-    d0.unit = "";
+    d0.unit = "%";
     d0.minValue = 0;
     d0.maxValue = 0.05;
     d0.defaultValue = 0;
--- a/NNLSBase.cpp	Mon Oct 25 22:57:47 2010 +0900
+++ b/NNLSBase.cpp	Mon Oct 25 23:47:06 2010 +0900
@@ -163,12 +163,12 @@
     d0.identifier = "rollon";
     d0.name = "spectral roll-on";
     d0.description = "Consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.";
-    d0.unit = "";
+    d0.unit = "%";
     d0.minValue = 0;
-    d0.maxValue = 0.05;
+    d0.maxValue = 5;
     d0.defaultValue = 0;
     d0.isQuantized = true;
-	d0.quantizeStep = 0.005;
+	d0.quantizeStep = 0.5;
     list.push_back(d0);
 
     ParameterDescriptor d1;
@@ -436,7 +436,7 @@
     if (m_rollon > 0) {
         for (size_t iBin = 2; iBin < m_blockSize/2; iBin++) {
             cumenergy +=  pow(magnitude[iBin],2);
-            if (cumenergy < energysum * m_rollon) magnitude[iBin-2] = 0;
+            if (cumenergy < energysum * m_rollon / 100) magnitude[iBin-2] = 0;
             else break;
         }
     }
--- a/README	Mon Oct 25 22:57:47 2010 +0900
+++ b/README	Mon Oct 25 23:47:06 2010 +0900
@@ -16,7 +16,7 @@
 The default settings (in brackets, below) are those used for Matthias Mauch's 2010 MIREX submissions.
 
 * use approximate transcription (NNLS) (on or off; default: on): toggle between NNLS approximate transcription and linear spectral mapping.
-* spectral roll on (0.00 -- 0.05; default: 0.0): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
+* spectral roll on spectral roll on (0 % -- 5 %; default: 0 %): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
 * tuning mode (global or local; default: global): local uses a local average for tuning, global uses all audio frames. Local tuning is only advisable when the tuning is likely to change over the audio, for example in podcasts, or in a cappella singing.
 * spectral whitening (0.0 -- 1.0; default: 1.0): determines how much the log-frequency spectrum is whitened. A value of 0.0 means no whitening. For values other than 0.0 the log-freq spectral bins are divided by  [standard deviation of their neighbours]^[spectral whitening], where "^" means "to the power of".
 * spectral shape (0.5 -- 0.9; default: 0.7): the shape of the notes in the NNLS dictionary. Their harmonic amplitude follows a geometrically decreasing pattern, in which the i-th harmonic has an amplitude of [spectral shape]^[i-1], where "^" means "to the power of".
@@ -46,7 +46,7 @@
 
 * use approximate transcription (NNLS) (on or off; default: on): toggle between NNLS approximate transcription and linear spectral mapping.
 * HMM (Viterbi decoding) (on or off; default: on): uses HMM/Viterbi smoothing. Otherwise: heuristic chord change smoothing.
-* * spectral roll on (0.00 -- 0.05; default: 0.0): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
+* spectral roll on (0 % -- 5 %; default: 0 %): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
 * tuning mode (global or local; default: global): local uses a local average for tuning. Local tuning is only advisable when the tuning is likely to change over the audio, for example in podcasts, or in a cappella singing.
 * spectral whitening (0.0 -- 1.0; default: 1.0): determines how much the log-frequency spectrum is whitened. A value of 0.0 means no whitening. For values other than 0.0 the log-freq spectral bins are divided by  [standard deviation of their neighbours]^[spectral whitening], where "^" means "to the power of".
 * spectral shape (0.5 -- 0.9; default: 0.7): the shape of the notes in the NNLS dictionary. Their harmonic amplitude follows a geometrically decreasing pattern, in which the i-th harmonic has an amplitude of [spectral shape]^[i-1], where "^" means "to the power of".
@@ -68,7 +68,7 @@
 
 ### Parameter ###
 
-* spectral roll on (0.00 -- 0.05; default: 0.0): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
+* spectral roll on spectral roll on (0 % -- 5 %; default: 0 %): consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.
 
 ### Outputs ###
 
--- a/Tuning.cpp	Mon Oct 25 22:57:47 2010 +0900
+++ b/Tuning.cpp	Mon Oct 25 23:47:06 2010 +0900
@@ -80,12 +80,12 @@
     d0.identifier = "rollon";
     d0.name = "spectral roll-on";
     d0.description = "Consider the cumulative energy spectrum (from low to high frequencies). All bins below the first bin whose cumulative energy exceeds the quantile [spectral roll on] x [total energy] will be set to 0. A value of 0 means that no bins will be changed.";
-    d0.unit = "";
+    d0.unit = "%";
     d0.minValue = 0;
-    d0.maxValue = 0.05;
+    d0.maxValue = 5;
     d0.defaultValue = 0;
     d0.isQuantized = true;
-	d0.quantizeStep = 0.005;
+	d0.quantizeStep = 0.5;
     list.push_back(d0);
 
 
@@ -195,12 +195,13 @@
 		    
     char buffer0 [50];
 		
-    sprintf(buffer0, "estimated tuning: %0.1f Hz", cumulativetuning);
+    sprintf(buffer0, "%0.1f Hz", cumulativetuning);
 		    
     // push tuning to FeatureSet fsOut
     Feature f0; // tuning
     f0.hasTimestamp = true;
-    f0.timestamp = Vamp::RealTime::frame2RealTime(0, lrintf(m_inputSampleRate));;
+    f0.timestamp = Vamp::RealTime::frame2RealTime(0, lrintf(m_inputSampleRate));
+    f0.values.push_back(cumulativetuning);
     f0.label = buffer0;
     fsOut[m_outputTuning].push_back(f0);  
 		    
--- a/nnls-chroma.n3	Mon Oct 25 22:57:47 2010 +0900
+++ b/nnls-chroma.n3	Mon Oct 25 23:47:06 2010 +0900
@@ -17,8 +17,10 @@
     vamp:identifier "nnls-chroma"  ; 
     vamp:available_plugin plugbase:chordino ; 
     vamp:available_plugin plugbase:nnls-chroma ; 
-    vamp:available_plugin plugbase:tuning ; 
-#   foaf:page <Place more-information HTML page URL here and uncomment> ;
+    vamp:available_plugin plugbase:tuning ;  
+    foaf:page <http://www.isophonics.net/> ;
+    foaf:page <http://www.omras2.org/> ;
+    foaf:page <http://www.matthiasmauch.net/> ; 
     .
 
 plugbase:chordino a   vamp:Plugin ;
@@ -71,9 +73,9 @@
     dc:title            "spectral roll-on" ;
     dc:format           "" ;
     vamp:min_value       0 ;
-    vamp:max_value       0.05 ;
-    vamp:unit           "" ;
-    vamp:quantize_step   0.005  ;
+    vamp:max_value       5 ;
+    vamp:unit           "%" ;
+    vamp:quantize_step   0.5  ;
     vamp:default_value   0 ;
     vamp:value_names     ();
     .
@@ -113,13 +115,13 @@
     dc:title              "Chord Estimate" ;
     dc:description        """Estimated chord times and labels. Two simple (non-state-of-the-art!) algorithms are available that smooth these to provide a chord transcription: a simple chord change method, and a standard HMM/Viterbi approach."""  ;
     vamp:fixed_bin_count  "true" ;
-    vamp:unit             "" ;
+    vamp:unit             "chord" ;
+    a                     vamp:QuantizedOutput ;
+    vamp:quantize_step    1  ;
     vamp:bin_count        0 ;
     vamp:sample_type      vamp:VariableSampleRate ;
     vamp:sample_rate      21.5332 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_event_type   af:ChordSegment ;
     .
 plugbase:chordino_output_ a  vamp:DenseOutput ;
     vamp:identifier       "" ;
@@ -131,9 +133,7 @@
     vamp:min_value    0  ;
     vamp:max_value    0.999  ;
     vamp:bin_count        1 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:TonalChangeDetectionFunction;
     .
 plugbase:nnls-chroma a   vamp:Plugin ;
     dc:title              "NNLS Chroma" ;
@@ -178,9 +178,9 @@
     dc:title            "spectral roll-on" ;
     dc:format           "" ;
     vamp:min_value       0 ;
-    vamp:max_value       0.05 ;
-    vamp:unit           "" ;
-    vamp:quantize_step   0.005  ;
+    vamp:max_value       5 ;
+    vamp:unit           "%" ;
+    vamp:quantize_step   0.5  ;
     vamp:default_value   0 ;
     vamp:value_names     ();
     .
@@ -233,9 +233,7 @@
     vamp:fixed_bin_count  "true" ;
     vamp:unit             "" ;
     vamp:bin_count        256 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Spectrogram ;    
     .
 plugbase:nnls-chroma_output_tunedlogfreqspec a  vamp:DenseOutput ;
     vamp:identifier       "tunedlogfreqspec" ;
@@ -244,9 +242,7 @@
     vamp:fixed_bin_count  "true" ;
     vamp:unit             "" ;
     vamp:bin_count        256 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Spectrogram ;
     .
 plugbase:nnls-chroma_output_semitonespectrum a  vamp:DenseOutput ;
     vamp:identifier       "semitonespectrum" ;
@@ -255,9 +251,7 @@
     vamp:fixed_bin_count  "true" ;
     vamp:unit             "" ;
     vamp:bin_count        84 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Spectrogram ;    
     .
 plugbase:nnls-chroma_output_chroma a  vamp:DenseOutput ;
     vamp:identifier       "chroma" ;
@@ -267,9 +261,7 @@
     vamp:unit             "" ;
     vamp:bin_count        12 ;
     vamp:bin_names        ( "A" "Bb" "B" "C" "C#" "D" "Eb" "E" "F" "F#" "G" "Ab");
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Chromagram ;
     .
 plugbase:nnls-chroma_output_basschroma a  vamp:DenseOutput ;
     vamp:identifier       "basschroma" ;
@@ -279,9 +271,7 @@
     vamp:unit             "" ;
     vamp:bin_count        12 ;
     vamp:bin_names        ( "A" "Bb" "B" "C" "C#" "D" "Eb" "E" "F" "F#" "G" "Ab");
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Chromagram ;
     .
 plugbase:nnls-chroma_output_bothchroma a  vamp:DenseOutput ;
     vamp:identifier       "bothchroma" ;
@@ -291,9 +281,7 @@
     vamp:unit             "" ;
     vamp:bin_count        24 ;
     vamp:bin_names        ( "A  (bass)" "Bb (bass)" "B  (bass)" "C  (bass)" "C# (bass)" "D  (bass)" "Eb (bass)" "E  (bass)" "F  (bass)" "F# (bass)" "G  (bass)" "Ab (bass)" "A" "Bb" "B" "C" "C#" "D" "Eb" "E" "F" "F#" "G" "Ab");
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_signal_type  af:Chromagram ;
     .
 plugbase:tuning a   vamp:Plugin ;
     dc:title              "Tuning" ;
@@ -318,9 +306,9 @@
     dc:title            "spectral roll-on" ;
     dc:format           "" ;
     vamp:min_value       0 ;
-    vamp:max_value       0.05 ;
-    vamp:unit           "" ;
-    vamp:quantize_step   0.005  ;
+    vamp:max_value       5 ;
+    vamp:unit           "%" ;
+    vamp:quantize_step   0.5  ;
     vamp:default_value   0 ;
     vamp:value_names     ();
     .
@@ -336,9 +324,7 @@
     vamp:bin_count        0 ;
     vamp:sample_type      vamp:VariableSampleRate ;
     vamp:sample_rate      2.38221e-44 ;
-#   vamp:computes_event_type   <Place event type URI here and uncomment> ;
-#   vamp:computes_feature      <Place feature attribute URI here and uncomment> ;
-#   vamp:computes_signal_type  <Place signal type URI here and uncomment> ;
+    vamp:computes_event_type   af:MusicSegment;
     .
 plugbase:tuning_output_localtuning a  vamp:DenseOutput ;
     vamp:identifier       "localtuning" ;