Mercurial > hg > tony
comparison src/Analyser.h @ 192:431a95c9d14d
Calculate frequency constraint for region outlining (does not actually do the analysis correctly yet)
author | Chris Cannam |
---|---|
date | Wed, 05 Mar 2014 09:36:13 +0000 |
parents | 800e65412473 |
children | 34797795a76c |
comparison
equal
deleted
inserted
replaced
191:800e65412473 | 192:431a95c9d14d |
---|---|
82 float getPan(Component c) const; | 82 float getPan(Component c) const; |
83 void setPan(Component c, float pan); | 83 void setPan(Component c, float pan); |
84 | 84 |
85 void getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1); | 85 void getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1); |
86 | 86 |
87 struct FrequencyRange { | |
88 FrequencyRange() : min(0), max(0) { } | |
89 FrequencyRange(float min_, float max_) : min(min_), max(max_) { } | |
90 bool isConstrained() const { return min != max; } | |
91 float min; | |
92 float max; | |
93 }; | |
94 | |
87 /** | 95 /** |
88 * Analyse the selection and schedule asynchronous adds of | 96 * Analyse the selection and schedule asynchronous adds of |
89 * candidate layers for the region it contains. Returns "" on | 97 * candidate layers for the region it contains. Returns "" on |
90 * success or a user-readable error string on failure. | 98 * success or a user-readable error string on failure. If the |
99 * frequency range isConstrained(), analysis will be constrained | |
100 * to that range. | |
91 */ | 101 */ |
92 QString reAnalyseSelection(Selection sel); | 102 QString reAnalyseSelection(Selection sel, FrequencyRange range); |
93 | 103 |
94 /** | 104 /** |
95 * Return true if the analysed pitch candidates are currently | 105 * Return true if the analysed pitch candidates are currently |
96 * visible (by default they are hidden after construction until | 106 * visible (by default they are hidden after construction until |
97 * the user requests them). Note that the shown/hidden state is | 107 * the user requests them). Note that the shown/hidden state is |
148 } | 158 } |
149 | 159 |
150 signals: | 160 signals: |
151 void layersChanged(); | 161 void layersChanged(); |
152 | 162 |
153 protected slots: | |
154 void regionOutlined(QRect); | |
155 | |
156 protected: | 163 protected: |
157 Document *m_document; | 164 Document *m_document; |
158 WaveFileModel *m_fileModel; | 165 WaveFileModel *m_fileModel; |
159 PaneStack *m_paneStack; | 166 PaneStack *m_paneStack; |
160 Pane *m_pane; | 167 Pane *m_pane; |