Mercurial > hg > match-vamp
comparison src/Matcher.h @ 113:46a652da1415 refactors
Sample rate and fft size no longer needed in Matcher parameters
author | Chris Cannam |
---|---|
date | Thu, 04 Dec 2014 15:59:31 +0000 |
parents | 6636aca831c0 |
children | 42381e437fcd |
comparison
equal
deleted
inserted
replaced
112:5bfac082b0c8 | 113:46a652da1415 |
---|---|
52 return "(unknown)"; | 52 return "(unknown)"; |
53 } | 53 } |
54 | 54 |
55 struct Parameters { | 55 struct Parameters { |
56 | 56 |
57 Parameters(float rate_, double hopTime_, int fftSize_) : | 57 Parameters(double hopTime_) : |
58 sampleRate(rate_), | |
59 distanceNorm(DistanceMetric::NormaliseDistanceToLogSum), | 58 distanceNorm(DistanceMetric::NormaliseDistanceToLogSum), |
60 hopTime(hopTime_), | 59 hopTime(hopTime_), |
61 fftSize(fftSize_), | |
62 blockTime(10.0), | 60 blockTime(10.0), |
63 maxRunCount(3), | 61 maxRunCount(3), |
64 diagonalWeight(2.0) | 62 diagonalWeight(2.0) |
65 {} | 63 {} |
66 | |
67 /** Sample rate of audio */ | |
68 float sampleRate; | |
69 | 64 |
70 /** Type of distance metric normalisation */ | 65 /** Type of distance metric normalisation */ |
71 DistanceMetric::DistanceNormalisation distanceNorm; | 66 DistanceMetric::DistanceNormalisation distanceNorm; |
72 | 67 |
73 /** Spacing of audio frames (determines the amount of overlap or | 68 /** Spacing of audio frames (determines the amount of overlap or |
74 * skip between frames). This value is expressed in | 69 * skip between frames). This value is expressed in |
75 * seconds. | 70 * seconds. |
76 */ | 71 */ |
77 double hopTime; | 72 double hopTime; |
78 | |
79 /** Size of an FFT frame in samples. Note that the data passed | |
80 * in to Matcher is already in the frequency domain, so this | |
81 * expresses the size of the frame that the caller will be | |
82 * providing. | |
83 */ | |
84 int fftSize; | |
85 | 73 |
86 /** The width of the search band (error margin) around the current | 74 /** The width of the search band (error margin) around the current |
87 * match position, measured in seconds. Strictly speaking the | 75 * match position, measured in seconds. Strictly speaking the |
88 * width is measured backwards from the current point, since the | 76 * width is measured backwards from the current point, since the |
89 * algorithm has to work causally. | 77 * algorithm has to work causally. |