comparison data/model/FFTModel.h @ 1206:659372323b45 tony-2.0-integration

Merge latest SV 3.0 branch code
author Chris Cannam
date Fri, 19 Aug 2016 15:58:57 +0100
parents 825d0d7641ba
children bac86d3fc6c9
comparison
equal deleted inserted replaced
1136:e94719f941ba 1206:659372323b45
74 virtual int getResolution() const { return m_windowIncrement; } 74 virtual int getResolution() const { return m_windowIncrement; }
75 virtual int getYBinCount() const { return getHeight(); } 75 virtual int getYBinCount() const { return getHeight(); }
76 virtual float getMinimumLevel() const { return 0.f; } // Can't provide 76 virtual float getMinimumLevel() const { return 0.f; } // Can't provide
77 virtual float getMaximumLevel() const { return 1.f; } // Can't provide 77 virtual float getMaximumLevel() const { return 1.f; } // Can't provide
78 virtual Column getColumn(int x) const; // magnitudes 78 virtual Column getColumn(int x) const; // magnitudes
79 virtual Column getPhases(int x) const;
79 virtual QString getBinName(int n) const; 80 virtual QString getBinName(int n) const;
80 virtual bool shouldUseLogValueScale() const { return true; } 81 virtual bool shouldUseLogValueScale() const { return true; }
81 virtual int getCompletion() const { 82 virtual int getCompletion() const {
82 int c = 100; 83 int c = 100;
83 if (m_model) { 84 if (m_model) {
93 int getChannel() const { return m_channel; } 94 int getChannel() const { return m_channel; }
94 WindowType getWindowType() const { return m_windowType; } 95 WindowType getWindowType() const { return m_windowType; }
95 int getWindowSize() const { return m_windowSize; } 96 int getWindowSize() const { return m_windowSize; }
96 int getWindowIncrement() const { return m_windowIncrement; } 97 int getWindowIncrement() const { return m_windowIncrement; }
97 int getFFTSize() const { return m_fftSize; } 98 int getFFTSize() const { return m_fftSize; }
99
100 //!!! review which of these are ever actually called
98 101
99 float getMagnitudeAt(int x, int y) const; 102 float getMagnitudeAt(int x, int y) const;
100 float getMaximumMagnitudeAt(int x) const; 103 float getMaximumMagnitudeAt(int x) const;
101 float getPhaseAt(int x, int y) const; 104 float getPhaseAt(int x, int y) const;
102 void getValuesAt(int x, int y, float &real, float &imaginary) const; 105 void getValuesAt(int x, int y, float &real, float &imaginary) const;
103 bool isColumnAvailable(int x) const;
104 bool getMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const; 106 bool getMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const;
105 float getNormalizedMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const; // returns maximum of unnormalized magnitudes
106 bool getPhasesAt(int x, float *values, int minbin = 0, int count = 0) const; 107 bool getPhasesAt(int x, float *values, int minbin = 0, int count = 0) const;
107 bool getValuesAt(int x, float *reals, float *imaginaries, int minbin = 0, int count = 0) const; 108 bool getValuesAt(int x, float *reals, float *imaginaries, int minbin = 0, int count = 0) const;
108 109
109 /** 110 /**
110 * Calculate an estimated frequency for a stable signal in this 111 * Calculate an estimated frequency for a stable signal in this
126 /** 127 /**
127 * Return locations of peak bins in the range [ymin,ymax]. If 128 * Return locations of peak bins in the range [ymin,ymax]. If
128 * ymax is zero, getHeight()-1 will be used. 129 * ymax is zero, getHeight()-1 will be used.
129 */ 130 */
130 virtual PeakLocationSet getPeaks(PeakPickType type, int x, 131 virtual PeakLocationSet getPeaks(PeakPickType type, int x,
131 int ymin = 0, int ymax = 0); 132 int ymin = 0, int ymax = 0) const;
132 133
133 /** 134 /**
134 * Return locations and estimated stable frequencies of peak bins. 135 * Return locations and estimated stable frequencies of peak bins.
135 */ 136 */
136 virtual PeakSet getPeakFrequencies(PeakPickType type, int x, 137 virtual PeakSet getPeakFrequencies(PeakPickType type, int x,
137 int ymin = 0, int ymax = 0); 138 int ymin = 0, int ymax = 0) const;
138 139
139 QString getTypeName() const { return tr("FFT"); } 140 QString getTypeName() const { return tr("FFT"); }
140 141
141 public slots: 142 public slots:
142 void sourceModelAboutToBeDeleted(); 143 void sourceModelAboutToBeDeleted();