Mercurial > hg > constant-q-cpp
diff cq/CQParameters.h @ 176:5b1a1bbd6e7f
Make decimator quality selectable
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 28 Apr 2015 13:53:53 +0100 |
parents | 2705ca19245c |
children |
line wrap: on
line diff
--- a/cq/CQParameters.h Tue Apr 28 11:08:11 2015 +0100 +++ b/cq/CQParameters.h Tue Apr 28 13:53:53 2015 +0100 @@ -48,6 +48,11 @@ Hann, }; + enum DecimatorType { + BetterDecimator, + FasterDecimator + }; + /** * Construct a set of parameters with the given input signal * sample rate, frequency range, and number of bins per @@ -63,10 +68,11 @@ minFrequency(_minFrequency), maxFrequency(_maxFrequency), binsPerOctave(_binsPerOctave), - q(1.0), // Q scaling factor - atomHopFactor(0.25), // hop size of shortest temporal atom - threshold(0.0005), // sparsity threshold for resulting kernel - window(SqrtBlackmanHarris) // window shape + q(1.0), // Q scaling factor + atomHopFactor(0.25), // hop size of shortest temporal atom + threshold(0.0005), // sparsity threshold for resulting kernel + window(SqrtBlackmanHarris), // window shape + decimator(BetterDecimator) // decimator quality setting { } /** @@ -114,6 +120,11 @@ * Window shape to use for the Constant-Q kernel atoms. */ WindowType window; + + /** + * Quality setting for the sample rate decimator. + */ + DecimatorType decimator; }; #endif