changeset 1124:b71a0491d287 spectrogram-minor-refactor

Some notes on gain
author Chris Cannam
date Mon, 01 Aug 2016 11:31:53 +0100
parents 343887ac6766
children 50324fca1328
files layer/Colour3DPlotRenderer.cpp
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/layer/Colour3DPlotRenderer.cpp	Fri Jul 22 14:42:36 2016 +0100
+++ b/layer/Colour3DPlotRenderer.cpp	Mon Aug 01 11:31:53 2016 +0100
@@ -351,9 +351,8 @@
 
             // order:
             // get column -> scale -> record extents ->
-            // normalise -> peak pick -> apply display gain ->
-            // distribute/interpolate
-
+            // normalise -> peak pick -> apply display gain
+            
             ColumnOp::Column fullColumn = model->getColumn(sx);
                 
             ColumnOp::Column column =
@@ -374,6 +373,9 @@
                 preparedColumn = ColumnOp::peakPick(preparedColumn);
             }
 
+            // Display gain belongs to the colour scale and is
+            // applied by the colour scale object when mapping it
+
             psx = sx;
         }
 
@@ -774,8 +776,8 @@
 
                 // order:
                 // get column -> scale -> record extents ->
-                // normalise -> peak pick -> apply display gain ->
-                // distribute/interpolate
+                // normalise -> peak pick -> distribute/interpolate ->
+                // apply display gain
 
                 ColumnOp::Column fullColumn = sourceModel->getColumn(sx);
 
@@ -801,11 +803,14 @@
                 }
 
                 preparedColumn =
-                    ColumnOp::distribute(column, //!!! gain? ColumnOp::applyGain(column, m_gain),
+                    ColumnOp::distribute(column,
                                          h,
                                          binfory,
                                          minbin,
                                          m_params.interpolate);
+
+                // Display gain belongs to the colour scale and is
+                // applied by the colour scale object when mapping it
                 
                 psx = sx;
             }
@@ -937,12 +942,10 @@
 //                }
 
 //!!!                if (m_colourScale != ColourScaleType::Phase) {
-                    column = ColumnOp::normalize(column, m_params.normalization);
+                preparedColumn = ColumnOp::normalize
+                    (column, m_params.normalization);
 //!!!                }
 
-                    preparedColumn = column;
-//!!! gain?                preparedColumn = ColumnOp::applyGain(column, m_params.gain);
-                
                 psx = sx;
             }