Mercurial > hg > match-vamp
comparison src/Matcher.h @ 43:6a5d165e5ea4 refactors
refactor: m_ prefix
author | Chris Cannam |
---|---|
date | Thu, 13 Nov 2014 13:53:52 +0000 |
parents | 8dd16749c3c3 |
children | c1112adfd270 |
comparison
equal
deleted
inserted
replaced
42:8dd16749c3c3 | 43:6a5d165e5ea4 |
---|---|
130 * which is going to be matched to this one. | 130 * which is going to be matched to this one. |
131 * | 131 * |
132 * @param p the Matcher representing the other performance | 132 * @param p the Matcher representing the other performance |
133 */ | 133 */ |
134 void setOtherMatcher(Matcher *p) { | 134 void setOtherMatcher(Matcher *p) { |
135 otherMatcher = p; | 135 m_otherMatcher = p; |
136 } // setOtherMatcher() | 136 } // setOtherMatcher() |
137 | 137 |
138 int getFrameCount() { | 138 int getFrameCount() { |
139 return frameCount; | 139 return m_frameCount; |
140 } | 140 } |
141 | 141 |
142 protected: | 142 protected: |
143 /** Create internal structures and reset. */ | 143 /** Create internal structures and reset. */ |
144 void init(); | 144 void init(); |
199 * compared. The data for the distance metric and the dynamic | 199 * compared. The data for the distance metric and the dynamic |
200 * time warping is shared between the two matchers. In the | 200 * time warping is shared between the two matchers. In the |
201 * original version, only one of the two performance matchers | 201 * original version, only one of the two performance matchers |
202 * contained the distance metric. (See <code>first</code>) | 202 * contained the distance metric. (See <code>first</code>) |
203 */ | 203 */ |
204 Matcher *otherMatcher; | 204 Matcher *m_otherMatcher; |
205 | 205 |
206 /** Indicates which performance is considered primary (the | 206 /** Indicates which performance is considered primary (the |
207 * score). This is the performance shown on the vertical axis, | 207 * score). This is the performance shown on the vertical axis, |
208 * and referred to as "this" in the codes for the direction of | 208 * and referred to as "this" in the codes for the direction of |
209 * DTW steps. */ | 209 * DTW steps. */ |
210 bool firstPM; | 210 bool m_firstPM; |
211 | 211 |
212 /** Configuration parameters */ | 212 /** Configuration parameters */ |
213 Parameters params; | 213 Parameters m_params; |
214 | 214 |
215 /** Width of the search band in FFT frames (see <code>blockTime</code>) */ | 215 /** Width of the search band in FFT frames (see <code>blockTime</code>) */ |
216 int blockSize; | 216 int m_blockSize; |
217 | 217 |
218 /** The number of frames of audio data which have been read. */ | 218 /** The number of frames of audio data which have been read. */ |
219 int frameCount; | 219 int m_frameCount; |
220 | 220 |
221 /** The number of frames sequentially processed by this matcher, | 221 /** The number of frames sequentially processed by this matcher, |
222 * without a frame of the other matcher being processed. | 222 * without a frame of the other matcher being processed. |
223 */ | 223 */ |
224 int runCount; | 224 int m_runCount; |
225 | 225 |
226 /** The number of values in a feature vector. */ | 226 /** The number of values in a feature vector. */ |
227 int featureSize; | 227 int m_featureSize; |
228 | 228 |
229 /** A block of previously seen frames are stored in this structure | 229 /** A block of previously seen frames are stored in this structure |
230 * for calculation of the distance matrix as the new frames are | 230 * for calculation of the distance matrix as the new frames are |
231 * read in. One can think of the structure of the array as a | 231 * read in. One can think of the structure of the array as a |
232 * circular buffer of vectors. These are the frames with all | 232 * circular buffer of vectors. These are the frames with all |
233 * applicable processing applied (e.g. spectral difference, | 233 * applicable processing applied (e.g. spectral difference, |
234 * normalisation), unlike prevFrame and newFrame. The total | 234 * normalisation), unlike prevFrame and newFrame. The total |
235 * energy of frames[i] is stored in totalEnergies[i]. */ | 235 * energy of frames[i] is stored in totalEnergies[i]. */ |
236 vector<vector<double> > frames; | 236 vector<vector<double> > m_frames; |
237 | 237 |
238 /** The best path cost matrix. */ | 238 /** The best path cost matrix. */ |
239 vector<vector<int> > bestPathCost; | 239 vector<vector<int> > m_bestPathCost; |
240 | 240 |
241 /** The distance matrix. */ | 241 /** The distance matrix. */ |
242 vector<vector<unsigned char> > distance; | 242 vector<vector<unsigned char> > m_distance; |
243 | 243 |
244 /** The bounds of each row of data in the distance and path cost matrices.*/ | 244 /** The bounds of each row of data in the distance and path cost matrices.*/ |
245 vector<int> first; | 245 vector<int> m_first; |
246 vector<int> last; | 246 vector<int> m_last; |
247 | 247 |
248 /** Height of each column in distance and bestPathCost matrices */ | 248 /** Height of each column in distance and bestPathCost matrices */ |
249 vector<int> distYSizes; | 249 vector<int> m_distYSizes; |
250 | 250 |
251 /** Width of distance and bestPathCost matrices and first and last vectors */ | 251 /** Width of distance and bestPathCost matrices and first and last vectors */ |
252 int distXSize; | 252 int m_distXSize; |
253 | 253 |
254 bool initialised; | 254 bool m_initialised; |
255 | 255 |
256 /** Disable or enable debugging output */ | 256 FeatureExtractor m_featureExtractor; |
257 static bool silent; | 257 DistanceMetric m_metric; |
258 | |
259 FeatureExtractor featureExtractor; | |
260 DistanceMetric metric; | |
261 | 258 |
262 friend class MatchFeeder; | 259 friend class MatchFeeder; |
263 friend class MatchFeatureFeeder; | 260 friend class MatchFeatureFeeder; |
264 friend class Finder; | 261 friend class Finder; |
265 | 262 |