diff AutocorrelationProcessor.h @ 25:fe23998968b4

* Added tempogram via autocorrelation feature, using AutocorrelationProcessor * Moved calculateMax() from NoveltyCurveProcessor to SpectrogramProcessor
author Carl Bussey <c.bussey@se10.qmul.ac.uk>
date Wed, 20 Aug 2014 16:00:37 +0100
parents
children ff6110f1144b
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AutocorrelationProcessor.h	Wed Aug 20 16:00:37 2014 +0100
@@ -0,0 +1,29 @@
+//
+//  AutocorrelationProcessor.h
+//  Tempogram
+//
+//  Created by Carl Bussey on 20/08/2014.
+//  Copyright (c) 2014 Carl Bussey. All rights reserved.
+//
+
+#ifndef __Tempogram__Autocorrelation__
+#define __Tempogram__Autocorrelation__
+
+#include <iostream>
+#include <vector>
+
+typedef std::vector< std::vector<float> > AutoCorrelation;
+
+class AutocorrelationProcessor{
+public:
+    AutocorrelationProcessor(const size_t &windowLength, const unsigned int &hopSize, const unsigned int &lagIncrement);
+    AutoCorrelation process(float * input, const size_t &inputLength) const;
+    std::vector<float> processBlock(float * input, const size_t &inputLength) const;
+private:
+    size_t m_windowLength;
+    unsigned int m_hopSize;
+    unsigned int m_lagIncrement;
+    
+};
+
+#endif /* defined(__Tempogram__Autocorrelation__) */