Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 1403:10e768adaee5
Retain consistent min freq (rather than min bin no) when changing fft parameters in spectrum; scale ffts by window size rather than fft size in case of oversampling, to avoid fading out because of scale factor including zero padding
author | Chris Cannam |
---|---|
date | Thu, 15 Nov 2018 15:08:08 +0000 |
parents | ba1f0234efa7 |
children | 4c359c2b220c |
comparison
equal
deleted
inserted
replaced
1402:b0eeec95ab5b | 1403:10e768adaee5 |
---|---|
1532 params.scaleFactor = 1.0; | 1532 params.scaleFactor = 1.0; |
1533 params.colourRotation = m_colourRotation; | 1533 params.colourRotation = m_colourRotation; |
1534 | 1534 |
1535 if (m_colourScale != ColourScaleType::Phase && | 1535 if (m_colourScale != ColourScaleType::Phase && |
1536 m_normalization != ColumnNormalization::Hybrid) { | 1536 m_normalization != ColumnNormalization::Hybrid) { |
1537 params.scaleFactor *= 2.f / float(getFFTSize()); | 1537 params.scaleFactor *= 2.f / float(getWindowSize()); |
1538 } | 1538 } |
1539 | 1539 |
1540 Preferences::SpectrogramSmoothing smoothing = | 1540 Preferences::SpectrogramSmoothing smoothing = |
1541 Preferences::getInstance()->getSpectrogramSmoothing(); | 1541 Preferences::getInstance()->getSpectrogramSmoothing(); |
1542 params.interpolate = | 1542 params.interpolate = |