comparison dsp/tonal/ChangeDetectionFunction.h @ 225:49844bc8a895

* Queen Mary C++ DSP library
author Chris Cannam <c.cannam@qmul.ac.uk>
date Wed, 05 Apr 2006 17:35:59 +0000
parents
children 980b1a3b9cbe
comparison
equal deleted inserted replaced
-1:000000000000 225:49844bc8a895
1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3 /*
4 QM DSP Library
5
6 Centre for Digital Music, Queen Mary, University of London.
7 This file copyright 2006 Martin Gasser.
8 All rights reserved.
9 */
10
11 #ifndef _CHANGEDETECTIONFUNCTION_
12 #define _CHANGEDETECTIONFUNCTION_
13
14 #define DEBUG_CHANGE_DETECTION_FUNCTION 1
15
16 #include "TCSgram.h"
17
18 #include <valarray>
19 using std::valarray;
20
21 typedef valarray<double> ChangeDistance;
22
23 struct ChangeDFConfig
24 {
25 int smoothingWidth;
26 };
27
28 class ChangeDetectionFunction
29 {
30 public:
31 ChangeDetectionFunction(ChangeDFConfig);
32 ~ChangeDetectionFunction();
33 ChangeDistance process(const TCSGram& rTCSGram);
34 private:
35 void setFilterWidth(const int iWidth);
36
37 private:
38 valarray<double> m_vaGaussian;
39 double m_dFilterSigma;
40 int m_iFilterWidth;
41 };
42
43 #endif // _CHANGDETECTIONFUNCTION_