comparison transform/FeatureExtractionModelTransformer.cpp @ 802:98cf98a217d2 qt5

Merge
author Chris Cannam
date Thu, 09 May 2013 17:31:31 +0100
parents ed3779b2b4a8 ebe3ca2bb556
children 54829c1e155e e802e550a1f2
comparison
equal deleted inserted replaced
801:ed3779b2b4a8 802:98cf98a217d2
199 haveExtents = true; 199 haveExtents = true;
200 } 200 }
201 201
202 size_t modelRate = input->getSampleRate(); 202 size_t modelRate = input->getSampleRate();
203 size_t modelResolution = 1; 203 size_t modelResolution = 1;
204
205 if (m_descriptor->sampleType !=
206 Vamp::Plugin::OutputDescriptor::OneSamplePerStep) {
207 if (m_descriptor->sampleRate > input->getSampleRate()) {
208 std::cerr << "WARNING: plugin reports output sample rate as "
209 << m_descriptor->sampleRate << " (can't display features with finer resolution than the input rate of " << input->getSampleRate() << ")" << std::endl;
210 }
211 }
204 212
205 switch (m_descriptor->sampleType) { 213 switch (m_descriptor->sampleType) {
206 214
207 case Vamp::Plugin::OutputDescriptor::VariableSampleRate: 215 case Vamp::Plugin::OutputDescriptor::VariableSampleRate:
208 if (m_descriptor->sampleRate != 0.0) { 216 if (m_descriptor->sampleRate != 0.0) {
702 QString label = feature.label.c_str(); 710 QString label = feature.label.c_str();
703 if (feature.values.size() > 1) { 711 if (feature.values.size() > 1) {
704 label = QString("[%1] %2").arg(i+1).arg(label); 712 label = QString("[%1] %2").arg(i+1).arg(label);
705 } 713 }
706 714
707 std::cerr << "Adding point at " << frame << " with value " << value << " and label " << label << std::endl;
708
709 model->addPoint(SparseTimeValueModel::Point(frame, value, label)); 715 model->addPoint(SparseTimeValueModel::Point(frame, value, label));
710 } 716 }
711 717
712 } else if (isOutput<NoteModel>() || isOutput<RegionModel>()) { 718 } else if (isOutput<NoteModel>() || isOutput<RegionModel>()) {
713 719