comparison layer/SpectrogramLayer.cpp @ 1131:ee98d587cd1a spectrogram-minor-refactor

Sensible vertical scale and hybrid normalisation range in colour 3d plot
author Chris Cannam
date Tue, 02 Aug 2016 09:58:41 +0100
parents 371320c9f8d9
children 199049012fc6
comparison
equal deleted inserted replaced
1130:dc4b8fd3fcb7 1131:ee98d587cd1a
2059 QString top, bottom; 2059 QString top, bottom;
2060 double min = m_viewMags[v->getId()].getMin(); 2060 double min = m_viewMags[v->getId()].getMin();
2061 double max = m_viewMags[v->getId()].getMax(); 2061 double max = m_viewMags[v->getId()].getMax();
2062 2062
2063 if (min < m_threshold) min = m_threshold; 2063 if (min < m_threshold) min = m_threshold;
2064 if (max < min) max = min; 2064 if (max <= min) max = min + 0.1;
2065 2065
2066 double dBmin = AudioLevel::multiplier_to_dB(min); 2066 double dBmin = AudioLevel::multiplier_to_dB(min);
2067 double dBmax = AudioLevel::multiplier_to_dB(max); 2067 double dBmax = AudioLevel::multiplier_to_dB(max);
2068 2068
2069 #ifdef DEBUG_SPECTROGRAM_REPAINT 2069 #ifdef DEBUG_SPECTROGRAM_REPAINT