comparison NoveltyCurve.h @ 5:8d7e336b41e9

Adding NoveltyCurve.*
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Tue, 05 Aug 2014 15:59:15 +0100
parents
children 21147df9cb2d
comparison
equal deleted inserted replaced
4:597f033fa7a2 5:8d7e336b41e9
1 //
2 // NoveltyCurve.h
3 // Tempogram
4 //
5 // Created by Carl Bussey on 10/07/2014.
6 // Copyright (c) 2014 Carl Bussey. All rights reserved.
7 //
8
9 #ifndef __Tempogram__NoveltyCurve__
10 #define __Tempogram__NoveltyCurve__
11
12 #include <iostream>
13
14 class NoveltyCurve{
15 float m_samplingFrequency;
16 int m_blockSize;
17 int m_numberOfBlocks;
18 int m_compressionConstant;
19 int m_numberOfBands;
20 int * m_bandBoundaries;
21 int m_hannLength;
22 float * m_hannWindow;
23 float ** m_bandSum;
24
25 void initialise();
26 void cleanup();
27 float calculateMax(float ** spectrogram);
28 void subtractLocalAverage(float * noveltyCurve);
29
30 public:
31 vector<float> data;
32
33 NoveltyCurve(float samplingFrequency, int blockSize, int numberOfBlocks, int compressionConstant);
34 ~NoveltyCurve();
35 vector<float> spectrogramToNoveltyCurve(float ** spectrogram);
36 };
37
38 #endif /* defined(__Tempogram__NoveltyCurve__) */