Sign in
Register
Home
Projects
Help
Search
:
Timbre-Invariant Pitch Chroma
Overview
Members
Activity
Publications
Wiki
Downloads
Repository
Code docs
Tipic
Main Page
Classes
Files
File List
src
FeatureDownsample.h
1
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2
3
/*
4
Tipic
5
6
Centre for Digital Music, Queen Mary, University of London.
7
8
This program is free software; you can redistribute it and/or
9
modify it under the terms of the GNU General Public License as
10
published by the Free Software Foundation; either version 2 of the
11
License, or (at your option) any later version. See the file
12
COPYING included with this distribution for more information.
13
*/
14
15
#ifndef FEATURE_DOWNSAMPLE_H
16
#define FEATURE_DOWNSAMPLE_H
17
18
#include <vector>
19
20
#include "Types.h"
21
28
class
Filter;
29
30
class
FeatureDownsample
31
{
32
public
:
33
struct
Parameters
{
34
int
featureSize;
35
int
downsampleFactor;
36
int
windowLength;
37
int
normP;
// 0 = no normalisation, 1 = L^1, 2 = L^2
38
double
normThresh;
39
Parameters
() :
40
featureSize(1),
41
downsampleFactor(10),
42
windowLength(41),
43
normP(2),
44
normThresh(1e-6)
45
{ }
46
};
47
48
FeatureDownsample
(
Parameters
params);
49
~
FeatureDownsample
();
50
51
void
reset();
52
RealBlock process(
const
RealBlock &in);
53
RealBlock getRemainingOutput();
54
55
private
:
56
Parameters
m_params;
57
std::vector<Filter *> m_filters;
58
int
m_toDrop;
59
int
m_toNext;
60
int
m_inCount;
61
int
m_outCount;
62
};
63
64
#endif
FeatureDownsample::Parameters
Definition:
FeatureDownsample.h:33
FeatureDownsample
Definition:
FeatureDownsample.h:30
Generated by
1.8.11
Loading...