Mercurial > hg > svgui
comparison layer/SpectrumLayer.h @ 254:a2ae3d93c645
* bit of work on harmonic cursor in spectrum
author | Chris Cannam |
---|---|
date | Mon, 11 Jun 2007 12:14:52 +0000 |
parents | 28c8e8e3c537 |
children | 6d113226bb4c |
comparison
equal
deleted
inserted
replaced
253:1b1e6947c124 | 254:a2ae3d93c645 |
---|---|
35 SpectrumLayer(); | 35 SpectrumLayer(); |
36 ~SpectrumLayer(); | 36 ~SpectrumLayer(); |
37 | 37 |
38 void setModel(DenseTimeValueModel *model); | 38 void setModel(DenseTimeValueModel *model); |
39 virtual const Model *getModel() const { return m_originModel; } | 39 virtual const Model *getModel() const { return m_originModel; } |
40 | |
41 virtual bool getCrosshairExtents(View *, QPainter &, QPoint cursorPos, | |
42 std::vector<QRect> &extents) const; | |
43 virtual void paintCrosshairs(View *, QPainter &, QPoint) const; | |
40 | 44 |
41 virtual QString getFeatureDescription(View *v, QPoint &) const; | 45 virtual QString getFeatureDescription(View *v, QPoint &) const; |
42 | 46 |
43 virtual PropertyList getProperties() const; | 47 virtual PropertyList getProperties() const; |
44 virtual QString getPropertyLabel(const PropertyName &) const; | 48 virtual QString getPropertyLabel(const PropertyName &) const; |
88 WindowType m_windowType; | 92 WindowType m_windowType; |
89 size_t m_windowHopLevel; | 93 size_t m_windowHopLevel; |
90 | 94 |
91 void setupFFT(); | 95 void setupFFT(); |
92 | 96 |
97 virtual void getBiasCurve(BiasCurve &) const; | |
98 BiasCurve m_biasCurve; | |
99 | |
100 float getFrequencyForX(float x, float w) const; | |
101 float getXForFrequency(float freq, float w) const; | |
102 | |
93 size_t getWindowIncrement() const { | 103 size_t getWindowIncrement() const { |
94 if (m_windowHopLevel == 0) return m_windowSize; | 104 if (m_windowHopLevel == 0) return m_windowSize; |
95 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4; | 105 else if (m_windowHopLevel == 1) return (m_windowSize * 3) / 4; |
96 else return m_windowSize / (1 << (m_windowHopLevel - 1)); | 106 else return m_windowSize / (1 << (m_windowHopLevel - 1)); |
97 } | 107 } |