annotate FIRFilter.h @ 7:21147df9cb2d
* Error when deleting Spectrogram object in Tempogram::getRemainingFeatures().
* Moved Spectrogram computation into own class.
author |
Carl Bussey <c.bussey@se10.qmul.ac.uk> |
date |
Thu, 07 Aug 2014 16:21:21 +0100 |
parents |
31d2a7e07786 |
children |
4e429b9f2b4d |
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 #include <iostream>
|
c@7
|
16
|
c@0
|
17 class FIRFilter{
|
c@0
|
18 public:
|
c@0
|
19 FIRFilter(const unsigned int lengthInput, const unsigned int numberOfCoefficients);
|
c@0
|
20 ~FIRFilter();
|
c@0
|
21 void process(const float *input, const float *coefficients, float *output);
|
c@0
|
22 private:
|
c@0
|
23 unsigned int _lengthInput;
|
c@0
|
24 unsigned int _numberOfCoefficients;
|
c@0
|
25 unsigned int _lengthFIRFFT;
|
c@0
|
26
|
c@0
|
27 double *fftInput;
|
c@0
|
28 double *fftCoefficients;
|
c@0
|
29 double *fftReal1;
|
c@0
|
30 double *fftImag1;
|
c@0
|
31 double *fftReal2;
|
c@0
|
32 double *fftImag2;
|
c@0
|
33 double *fftFilteredReal;
|
c@0
|
34 double *fftFilteredImag;
|
c@0
|
35 double *fftOutputReal;
|
c@0
|
36 double *fftOutputImag;
|
c@0
|
37
|
c@0
|
38 void initialise();
|
c@0
|
39 void cleanup();
|
c@0
|
40 };
|
c@0
|
41
|
c@0
|
42 #endif /* defined(__Tempogram__FIRFilter__) */
|