comparison 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
comparison
equal deleted inserted replaced
24:957b83524c06 25:fe23998968b4
1 //
2 // AutocorrelationProcessor.h
3 // Tempogram
4 //
5 // Created by Carl Bussey on 20/08/2014.
6 // Copyright (c) 2014 Carl Bussey. All rights reserved.
7 //
8
9 #ifndef __Tempogram__Autocorrelation__
10 #define __Tempogram__Autocorrelation__
11
12 #include <iostream>
13 #include <vector>
14
15 typedef std::vector< std::vector<float> > AutoCorrelation;
16
17 class AutocorrelationProcessor{
18 public:
19 AutocorrelationProcessor(const size_t &windowLength, const unsigned int &hopSize, const unsigned int &lagIncrement);
20 AutoCorrelation process(float * input, const size_t &inputLength) const;
21 std::vector<float> processBlock(float * input, const size_t &inputLength) const;
22 private:
23 size_t m_windowLength;
24 unsigned int m_hopSize;
25 unsigned int m_lagIncrement;
26
27 };
28
29 #endif /* defined(__Tempogram__Autocorrelation__) */