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