Mercurial > hg > svcore
diff transform/FeatureExtractionPluginTransform.cpp @ 20:742e6882e187
* Refactor sparse models. Previously the 1D and time-value models duplicated
a lot of code; now there is a base class (SparseModel) templated on the
stored point type, and the subclasses define point types with the necessary
characteristics.
* Add NoteModel, a new SparseModel subclass.
* Reorganise local feature description display. Instead of asking the layer
to draw its own, just query it for a textual description and draw that in
Pane. Greatly simplifies this part of the layer code.
* Add local feature descriptions to colour 3D plot and waveform layers.
* Add pitch in MIDI-pitch-and-cents to spectrogram layer.
* Give AudioGenerator its own mutex to shorten lock times in CallbackPlaySource.
* Minor adjustments to layers menu &c
author | Chris Cannam |
---|---|
date | Thu, 02 Feb 2006 16:10:19 +0000 |
parents | a7ed14263fe4 |
children | 39ae3dee27b9 |
line wrap: on
line diff
--- a/transform/FeatureExtractionPluginTransform.cpp Wed Feb 01 14:49:49 2006 +0000 +++ b/transform/FeatureExtractionPluginTransform.cpp Thu Feb 02 16:10:19 2006 +0000 @@ -110,7 +110,8 @@ if (valueCount == 0) { - m_output = new SparseOneDimensionalModel(modelRate, modelResolution); + m_output = new SparseOneDimensionalModel(modelRate, modelResolution, + false); } else if (valueCount == 1 || @@ -125,6 +126,15 @@ m_output = new DenseThreeDimensionalModel(modelRate, modelResolution, valueCount, false); + + if (!m_descriptor->valueNames.empty()) { + std::vector<QString> names; + for (size_t i = 0; i < m_descriptor->valueNames.size(); ++i) { + names.push_back(m_descriptor->valueNames[i].c_str()); + } + (dynamic_cast<DenseThreeDimensionalModel *>(m_output)) + ->setBinNames(names); + } } }