CQParameters.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 /*
3  Constant-Q library
4  Copyright (c) 2013-2014 Queen Mary, University of London
5 
6  Permission is hereby granted, free of charge, to any person
7  obtaining a copy of this software and associated documentation
8  files (the "Software"), to deal in the Software without
9  restriction, including without limitation the rights to use, copy,
10  modify, merge, publish, distribute, sublicense, and/or sell copies
11  of the Software, and to permit persons to whom the Software is
12  furnished to do so, subject to the following conditions:
13 
14  The above copyright notice and this permission notice shall be
15  included in all copies or substantial portions of the Software.
16 
17  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
18  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
20  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
21  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
22  CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 
25  Except as contained in this notice, the names of the Centre for
26  Digital Music; Queen Mary, University of London; and Chris Cannam
27  shall not be used in advertising or otherwise to promote the sale,
28  use or other dealings in this Software without prior written
29  authorization.
30 */
31 
32 #ifndef CQ_PARAMETERS_H
33 #define CQ_PARAMETERS_H
34 
40 {
41 public:
42  enum WindowType {
49  };
50 
54  };
55 
63  CQParameters(double _sampleRate,
64  double _minFrequency,
65  double _maxFrequency,
66  int _binsPerOctave) :
67  sampleRate(_sampleRate),
68  minFrequency(_minFrequency),
69  maxFrequency(_maxFrequency),
70  binsPerOctave(_binsPerOctave),
71  q(1.0), // Q scaling factor
72  atomHopFactor(0.25), // hop size of shortest temporal atom
73  threshold(0.0005), // sparsity threshold for resulting kernel
74  window(SqrtBlackmanHarris), // window shape
75  decimator(BetterDecimator) // decimator quality setting
76  { }
77 
81  double sampleRate;
82 
88  double minFrequency;
89 
93  double maxFrequency;
94 
99 
105  double q;
106 
112 
117  double threshold;
118 
123 
128 };
129 
130 #endif
131 
DecimatorType decimator
Definition: CQParameters.h:127
Definition: CQParameters.h:44
double sampleRate
Definition: CQParameters.h:81
Definition: CQParameters.h:47
Definition: CQParameters.h:48
int binsPerOctave
Definition: CQParameters.h:98
DecimatorType
Definition: CQParameters.h:51
double q
Definition: CQParameters.h:105
Definition: CQParameters.h:52
Definition: CQParameters.h:43
WindowType window
Definition: CQParameters.h:122
Definition: CQParameters.h:45
double threshold
Definition: CQParameters.h:117
Definition: CQParameters.h:39
double maxFrequency
Definition: CQParameters.h:93
double minFrequency
Definition: CQParameters.h:88
double atomHopFactor
Definition: CQParameters.h:111
Definition: CQParameters.h:46
Definition: CQParameters.h:53
WindowType
Definition: CQParameters.h:42
CQParameters(double _sampleRate, double _minFrequency, double _maxFrequency, int _binsPerOctave)
Definition: CQParameters.h:63