# HG changeset patch # User Chris Cannam # Date 1244475601 0 # Node ID 3bbac921b70a9f4a2f80e5af2867f79bb8fcf3cd # Parent f3bb7a3ffd89b6c1069bc37b9f3a2ac9f8a49b39 * Use notes layer for things with MIDI units as well as Hz diff -r f3bb7a3ffd89 -r 3bbac921b70a transform/FeatureExtractionModelTransformer.cpp --- 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