annotate FIRFilter.h @ 14:c11367df624d
* Renamed NoveltyCurve.* and Spectrogram.* to $(Name)Processor.*
* Aligned novelty curve with audio - when performing FIRFilter::process(params), take inputLength after group delay.
* Removed trail of Spectrogram.
* General tidying!
author |
Carl Bussey <c.bussey@se10.qmul.ac.uk> |
date |
Thu, 14 Aug 2014 10:31:49 +0100 |
parents |
7680cc4c0073 |
children |
203551cbad47 |
rev |
line source |
c@0
|
1 //
|
c@0
|
2 // FIRFilter.h
|
c@0
|
3 // Tempogram
|
c@0
|
4 //
|
c@0
|
5 // Created by Carl Bussey on 25/06/2014.
|
c@0
|
6 // Copyright (c) 2014 Carl Bussey. All rights reserved.
|
c@0
|
7 //
|
c@0
|
8
|
c@0
|
9 #ifndef __Tempogram__FIRFilter__
|
c@0
|
10 #define __Tempogram__FIRFilter__
|
c@0
|
11
|
c@7
|
12 #include <cmath>
|
c@7
|
13 #include <vamp-sdk/FFT.h>
|
c@7
|
14 #include <assert.h>
|
c@7
|
15
|
c@0
|
16 class FIRFilter{
|
c@0
|
17 public:
|
c@13
|
18 FIRFilter(const size_t &lengthInput, const size_t &numberOfCoefficients);
|
c@0
|
19 ~FIRFilter();
|
c@13
|
20 void process(const float *pInput, const float *pCoefficients, float * pOutput);
|
c@0
|
21 private:
|
c@13
|
22 size_t m_lengthInput;
|
c@13
|
23 size_t m_numberOfCoefficients;
|
c@13
|
24 int m_lengthFIRFFT;
|
c@0
|
25
|
c@13
|
26 double *m_pFftInput;
|
c@13
|
27 double *m_pFftCoefficients;
|
c@13
|
28 double *m_pFftReal1;
|
c@13
|
29 double *m_pFftImag1;
|
c@13
|
30 double *m_pFftReal2;
|
c@13
|
31 double *m_pFftImag2;
|
c@13
|
32 double *m_pFftFilteredReal;
|
c@13
|
33 double *m_pFftFilteredImag;
|
c@13
|
34 double *m_pFftOutputReal;
|
c@13
|
35 double *m_pFftOutputImag;
|
c@0
|
36
|
c@0
|
37 void initialise();
|
c@0
|
38 void cleanup();
|
c@0
|
39 };
|
c@0
|
40
|
c@0
|
41 #endif /* defined(__Tempogram__FIRFilter__) */
|