changeset 595:3bbac921b70a

* Use notes layer for things with MIDI units as well as Hz
author Chris Cannam
date Mon, 08 Jun 2009 15:40:01 +0000
parents f3bb7a3ffd89
children c55795627490
files transform/FeatureExtractionModelTransformer.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp	Tue Jun 02 09:48:54 2009 +0000
+++ b/transform/FeatureExtractionModelTransformer.cpp	Mon Jun 08 15:40:01 2009 +0000
@@ -275,8 +275,13 @@
         // duration)
         if (binCount > 1) isNoteModel = true;
 
-        // Regions do not have units of Hz (a sweeping assumption!)
-        if (m_descriptor->unit == "Hz") isNoteModel = true;
+        // Regions do not have units of Hz or MIDI things (a sweeping
+        // assumption!)
+        if (m_descriptor->unit == "Hz" ||
+            m_descriptor->unit.find("MIDI") != std::string::npos ||
+            m_descriptor->unit.find("midi") != std::string::npos) {
+            isNoteModel = true;
+        }
 
         // If we had a "sparse 3D model", we would have the additional
         // problem of determining whether to use that here (if bin