Mercurial > hg > svgui
comparison layer/SpectrumLayer.h @ 1386:fc3d89f88690 spectrogramparam
Use log-frequency rather than log-bin for calculating x coord in spectrum. This has the advantage that frequency positions don't move when we change the window size or oversampling ratio, but it does give us an unhelpfully large amount of space for very low frequencies - to be considered
author | Chris Cannam |
---|---|
date | Mon, 12 Nov 2018 11:34:34 +0000 |
parents | 86f319dd6ab9 |
children | 900bed394f5a |
comparison
equal
deleted
inserted
replaced
1385:37e9d6a1e00c | 1386:fc3d89f88690 |
---|---|
123 | 123 |
124 mutable QMutex m_fftMutex; | 124 mutable QMutex m_fftMutex; |
125 | 125 |
126 void setupFFT(); | 126 void setupFFT(); |
127 | 127 |
128 virtual double getBinForFrequency(double freq) const; | |
129 virtual double getFrequencyForBin(double bin) const; | |
130 | |
131 virtual double getXForBin(const LayerGeometryProvider *, double bin) | |
132 const override; | |
133 virtual double getBinForX(const LayerGeometryProvider *, double x) | |
134 const override; | |
135 | |
128 virtual void getBiasCurve(BiasCurve &) const override; | 136 virtual void getBiasCurve(BiasCurve &) const override; |
129 BiasCurve m_biasCurve; | 137 BiasCurve m_biasCurve; |
130 | 138 |
131 int getWindowIncrement() const { | 139 int getWindowIncrement() const { |
132 if (m_windowHopLevel == 0) return m_windowSize; | 140 if (m_windowHopLevel == 0) return m_windowSize; |