changeset 787:4faea021b5c1 tonioni

cleanup
author gyorgyf
date Sat, 13 Apr 2013 15:36:54 +0100
parents 5295bdb58840
children 2fa49f5caac5
files transform/FeatureExtractionModelTransformer.cpp transform/ModelTransformerFactory.cpp transform/ModelTransformerFactory.h
diffstat 3 files changed, 6 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/transform/FeatureExtractionModelTransformer.cpp	Sat Apr 13 13:39:17 2013 +0100
+++ b/transform/FeatureExtractionModelTransformer.cpp	Sat Apr 13 15:36:54 2013 +0100
@@ -292,28 +292,21 @@
 		if (isNoteModel && m_preferredOutputModel == NoteOutputModel) {
 
             NoteModel *model;
-            // FlexiNoteModel *model;
             if (haveExtents) {
-				// GF: hard coding FlexiNoteModel
 	            model = new NoteModel (modelRate, modelResolution, minValue, maxValue, false);
-                // model = new FlexiNoteModel (modelRate, modelResolution, minValue, maxValue, false);
             } else {
 	            model = new NoteModel (modelRate, modelResolution, false);
-                // model = new FlexiNoteModel (modelRate, modelResolution, false);
             }
             model->setScaleUnits(m_descriptor->unit.c_str());
             m_output = model;
 
+		// GF: FlexiNoteModel is selected if the m_preferredOutputModel is set
         } else if (isNoteModel && m_preferredOutputModel == FlexiNoteOutputModel) {
 
-            // NoteModel *model;
             FlexiNoteModel *model;
             if (haveExtents) {
-				// GF: hard coding FlexiNoteModel
-	            // model = new NoteModel (modelRate, modelResolution, minValue, maxValue, false);
                 model = new FlexiNoteModel (modelRate, modelResolution, minValue, maxValue, false);
             } else {
-	            // model = new NoteModel (modelRate, modelResolution, false);
                 model = new FlexiNoteModel (modelRate, modelResolution, false);
             }
             model->setScaleUnits(m_descriptor->unit.c_str());
--- a/transform/ModelTransformerFactory.cpp	Sat Apr 13 13:39:17 2013 +0100
+++ b/transform/ModelTransformerFactory.cpp	Sat Apr 13 15:36:54 2013 +0100
@@ -173,7 +173,6 @@
     if (FeatureExtractionPluginFactory::instanceFor(id)) {
 
         transformer =
-            // new FeatureExtractionModelTransformer(input, transform, FeatureExtractionModelTransformer::NoteOutputModel);
         	new FeatureExtractionModelTransformer(input, transform, m_preferredOutputModel);
 
     } else if (RealTimePluginFactory::instanceFor(id)) {
@@ -195,7 +194,7 @@
 ModelTransformerFactory::transform(const Transform &transform,
                                    const ModelTransformer::Input &input,
                                    QString &message,
-								   // outputmodel default value = FeatureExtractionModelTransformer::NoteOutputModel
+								   /* outputmodel default value = FeatureExtractionModelTransformer::NoteOutputModel */
 								   FeatureExtractionModelTransformer::PreferredOutputModel outputmodel) 
 {
     SVDEBUG << "ModelTransformerFactory::transform: Constructing transformer with input model " << input.getModel() << endl;
--- a/transform/ModelTransformerFactory.h	Sat Apr 13 13:39:17 2013 +0100
+++ b/transform/ModelTransformerFactory.h	Sat Apr 13 15:36:54 2013 +0100
@@ -105,6 +105,10 @@
     TransformerSet m_runningTransformers;
 
     static ModelTransformerFactory *m_instance;
+	/** 
+	* allows the  FeatureExtractionModelTransformer output model to be selected externally, 
+	* but only in case of the need for NoteModel or FlexiNoteModel 
+	*/
 	FeatureExtractionModelTransformer::PreferredOutputModel m_preferredOutputModel ;
 };