diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/NoveltyCurve.h	Tue Aug 05 15:59:15 2014 +0100
@@ -0,0 +1,38 @@
+//
+//  NoveltyCurve.h
+//  Tempogram
+//
+//  Created by Carl Bussey on 10/07/2014.
+//  Copyright (c) 2014 Carl Bussey. All rights reserved.
+//
+
+#ifndef __Tempogram__NoveltyCurve__
+#define __Tempogram__NoveltyCurve__
+
+#include <iostream>
+
+class NoveltyCurve{
+    float m_samplingFrequency;
+    int m_blockSize;
+    int m_numberOfBlocks;
+    int m_compressionConstant;
+    int m_numberOfBands;
+    int * m_bandBoundaries;
+    int m_hannLength;
+    float * m_hannWindow;
+    float ** m_bandSum;
+    
+    void initialise();
+    void cleanup();
+    float calculateMax(float ** spectrogram);
+    void subtractLocalAverage(float * noveltyCurve);
+    
+public:
+    vector<float> data;
+    
+    NoveltyCurve(float samplingFrequency, int blockSize, int numberOfBlocks, int compressionConstant);
+    ~NoveltyCurve();
+    vector<float> spectrogramToNoveltyCurve(float ** spectrogram);
+};
+
+#endif /* defined(__Tempogram__NoveltyCurve__) */