comparison src/FeatureExtractor.h @ 159:cdbee79699b0 refactors

Introduce reference frequency param to feature extractor
author Chris Cannam
date Thu, 29 Jan 2015 17:02:48 +0000
parents 4ca5e4219684
children 001db4c32eb0 50bf5c5bca34
comparison
equal deleted inserted replaced
157:d6c1556fadd0 159:cdbee79699b0
46 struct Parameters { 46 struct Parameters {
47 47
48 Parameters(float rate_, int fftSize_) : 48 Parameters(float rate_, int fftSize_) :
49 sampleRate(rate_), 49 sampleRate(rate_),
50 useChromaFrequencyMap(false), 50 useChromaFrequencyMap(false),
51 fftSize(fftSize_) 51 fftSize(fftSize_),
52 referenceFrequency(440.0)
52 {} 53 {}
53 54
54 /** Sample rate of audio */ 55 /** Sample rate of audio */
55 float sampleRate; 56 float sampleRate;
56 57
60 61
61 /** Size of an FFT frame in samples. Note that the data passed 62 /** Size of an FFT frame in samples. Note that the data passed
62 * in is already in the frequency domain, so this expresses 63 * in is already in the frequency domain, so this expresses
63 * the size of the frame that the caller will be providing. */ 64 * the size of the frame that the caller will be providing. */
64 int fftSize; 65 int fftSize;
66
67 /** Frequency of concert A */
68 double referenceFrequency;
65 }; 69 };
66 70
67 /** 71 /**
68 * Construct a FeatureExtractor with the given parameters. 72 * Construct a FeatureExtractor with the given parameters.
69 * 73 *