comparison transform/FeatureExtractionModelTransformer.cpp @ 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 1d7ebc05157e
children 948271d124ac
comparison
equal deleted inserted replaced
594:f3bb7a3ffd89 595:3bbac921b70a
273 // Regions have only value (and duration -- we can't extract a 273 // Regions have only value (and duration -- we can't extract a
274 // region model from an old-style plugin that doesn't support 274 // region model from an old-style plugin that doesn't support
275 // duration) 275 // duration)
276 if (binCount > 1) isNoteModel = true; 276 if (binCount > 1) isNoteModel = true;
277 277
278 // Regions do not have units of Hz (a sweeping assumption!) 278 // Regions do not have units of Hz or MIDI things (a sweeping
279 if (m_descriptor->unit == "Hz") isNoteModel = true; 279 // assumption!)
280 if (m_descriptor->unit == "Hz" ||
281 m_descriptor->unit.find("MIDI") != std::string::npos ||
282 m_descriptor->unit.find("midi") != std::string::npos) {
283 isNoteModel = true;
284 }
280 285
281 // If we had a "sparse 3D model", we would have the additional 286 // If we had a "sparse 3D model", we would have the additional
282 // problem of determining whether to use that here (if bin 287 // problem of determining whether to use that here (if bin
283 // count > 1). But we don't. 288 // count > 1). But we don't.
284 289