annotate SpectrogramProcessor.h @ 17:1e4c02ca8b81
* Updated filenames in comments
author |
Carl Bussey <c.bussey@se10.qmul.ac.uk> |
date |
Thu, 14 Aug 2014 11:36:09 +0100 |
parents |
3e4ddfbfeb81 |
children |
de7213b35755 |
rev |
line source |
c@7
|
1 //
|
c@17
|
2 // SpectrogramProcessor.h
|
c@7
|
3 // Tempogram
|
c@7
|
4 //
|
c@7
|
5 // Created by Carl Bussey on 07/08/2014.
|
c@7
|
6 // Copyright (c) 2014 Carl Bussey. All rights reserved.
|
c@7
|
7 //
|
c@7
|
8
|
c@7
|
9 #ifndef __Tempogram__Spectrogram__
|
c@7
|
10 #define __Tempogram__Spectrogram__
|
c@7
|
11 #include <vector>
|
c@7
|
12 #include <vamp-sdk/FFT.h>
|
c@7
|
13 #include <cmath>
|
c@7
|
14
|
c@13
|
15 typedef std::vector <std::vector<float> > Spectrogram;
|
c@13
|
16 typedef std::vector <std::vector<float> > SpectrogramTransposed;
|
c@13
|
17
|
c@11
|
18 class SpectrogramProcessor{
|
c@13
|
19 size_t m_windowLength;
|
c@13
|
20 size_t m_fftLength;
|
c@13
|
21 size_t m_hopSize;
|
c@13
|
22 size_t m_numberOfOutputBins;
|
c@13
|
23 double * m_pFftInput;
|
c@13
|
24 double * m_pFftOutputReal;
|
c@13
|
25 double * m_pFftOutputImag;
|
c@7
|
26
|
c@7
|
27 void initialise();
|
c@7
|
28 void cleanup();
|
c@7
|
29 public:
|
c@14
|
30 SpectrogramProcessor(const size_t &windowLength, const size_t &fftLength, const size_t &hopSize);
|
c@11
|
31 ~SpectrogramProcessor();
|
c@13
|
32
|
c@16
|
33 Spectrogram process(const float * const pInput, const size_t &inputLength, const float * pWindow, const bool &transposeOutput = false) const;
|
c@14
|
34 static SpectrogramTransposed transpose(const Spectrogram &spectrogram);
|
c@7
|
35 };
|
c@7
|
36
|
c@7
|
37 #endif /* defined(__Tempogram__Spectrogram__) */
|