changeset 1769:9a8327e7b2dc

Respect use-flexi-note-model setting
author Chris Cannam
date Thu, 18 Jul 2019 14:42:24 +0100
parents 4fec4527e50e
children dffc70996f54
files transform/FeatureExtractionModelTransformer.cpp
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp	Thu Jul 18 13:28:14 2019 +0100
+++ b/transform/FeatureExtractionModelTransformer.cpp	Thu Jul 18 14:42:24 2019 +0100
@@ -414,13 +414,22 @@
 
         if (isNoteModel) {
 
+            QSettings settings;
+            settings.beginGroup("Transformer");
+            bool flexi = settings.value("use-flexi-note-model", false).toBool();
+            settings.endGroup();
+
+            SVCERR << "flexi = " << flexi << endl;
+            
             NoteModel *model;
             if (haveExtents) {
                 model = new NoteModel
-                    (modelRate, modelResolution, minValue, maxValue, false);
+                    (modelRate, modelResolution, minValue, maxValue, false,
+                     flexi ? NoteModel::FLEXI_NOTE : NoteModel::NORMAL_NOTE);
             } else {
                 model = new NoteModel
-                    (modelRate, modelResolution, false);
+                    (modelRate, modelResolution, false,
+                     flexi ? NoteModel::FLEXI_NOTE : NoteModel::NORMAL_NOTE);
             }
             model->setScaleUnits(m_descriptors[n].unit.c_str());
             out.reset(model);