annotate SpectrogramProcessor.h @ 31:f795b84c1ff2
This include change seems necessary for my compiler
author |
Chris Cannam |
date |
Thu, 04 Sep 2014 10:08:09 +0100 |
parents |
fe23998968b4 |
children |
4cf2d163127b |
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>
|
Chris@31
|
14 #include <cstddef>
|
c@7
|
15
|
c@13
|
16 typedef std::vector <std::vector<float> > Spectrogram;
|
c@13
|
17 typedef std::vector <std::vector<float> > SpectrogramTransposed;
|
c@13
|
18
|
c@11
|
19 class SpectrogramProcessor{
|
c@13
|
20 size_t m_windowLength;
|
c@13
|
21 size_t m_fftLength;
|
c@13
|
22 size_t m_hopSize;
|
c@13
|
23 size_t m_numberOfOutputBins;
|
c@13
|
24 double * m_pFftInput;
|
c@13
|
25 double * m_pFftOutputReal;
|
c@13
|
26 double * m_pFftOutputImag;
|
c@7
|
27
|
c@7
|
28 void initialise();
|
c@7
|
29 void cleanup();
|
c@7
|
30 public:
|
c@14
|
31 SpectrogramProcessor(const size_t &windowLength, const size_t &fftLength, const size_t &hopSize);
|
c@11
|
32 ~SpectrogramProcessor();
|
c@13
|
33
|
c@25
|
34 Spectrogram process(const float * const pInput, const size_t &inputLength, const float * pWindow) const;
|
c@14
|
35 static SpectrogramTransposed transpose(const Spectrogram &spectrogram);
|
c@25
|
36 static float calculateMax(const Spectrogram &spectrogram);
|
c@7
|
37 };
|
c@7
|
38
|
c@7
|
39 #endif /* defined(__Tempogram__Spectrogram__) */
|