Mercurial > hg > svgui
diff layer/SpectrogramLayer.h @ 1086:163cb9b98104 spectrogram-minor-refactor
Simplify the oversampling/zero-padding logic. FFT model selection no longer depends on the view.
author | Chris Cannam |
---|---|
date | Fri, 01 Jul 2016 18:30:42 +0100 |
parents | 179ea8a2f650 |
children | 6d990a24ac1b |
line wrap: on
line diff
--- a/layer/SpectrogramLayer.h Fri Jul 01 17:54:31 2016 +0100 +++ b/layer/SpectrogramLayer.h Fri Jul 01 18:30:42 2016 +0100 @@ -115,9 +115,6 @@ void setWindowType(WindowType type); WindowType getWindowType() const; - void setZeroPadLevel(int level); - int getZeroPadLevel() const; - /** * Set the gain multiplier for sample values in this view. * The default is 1.0. @@ -255,8 +252,7 @@ int m_windowSize; WindowType m_windowType; int m_windowHopLevel; - int m_zeroPadLevel; - int m_fftSize; + int m_fftSize; // m_windowSize * oversampling level float m_gain; float m_initialGain; float m_threshold; @@ -325,15 +321,8 @@ double getEffectiveMinFrequency() const; double getEffectiveMaxFrequency() const; - // Note that the getYBin... methods return the nominal bin in the - // un-smoothed spectrogram. This is not necessarily the same bin - // as is pulled from the spectrogram and drawn at the given - // position, if the spectrogram has oversampling smoothing. Use - // getSmoothedYBinRange to obtain that. - bool getXBinRange(LayerGeometryProvider *v, int x, double &windowMin, double &windowMax) const; bool getYBinRange(LayerGeometryProvider *v, int y, double &freqBinMin, double &freqBinMax) const; - bool getSmoothedYBinRange(LayerGeometryProvider *v, int y, double &freqBinMin, double &freqBinMax) const; bool getYBinSourceRange(LayerGeometryProvider *v, int y, double &freqMin, double &freqMax) const; bool getAdjustedYBinSourceRange(LayerGeometryProvider *v, int x, int y, @@ -349,7 +338,7 @@ else return m_windowSize / (1 << (m_windowHopLevel - 1)); } - int getZeroPadLevel(const LayerGeometryProvider *v) const; + int getFFTOversampling() const; int getFFTSize(const LayerGeometryProvider *v) const; FFTModel *getFFTModel(const LayerGeometryProvider *v) const; Dense3DModelPeakCache *getPeakCache(const LayerGeometryProvider *v) const;