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
OctaveFold.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 OCTAVEFOLD_H
16
#define OCTAVEFOLD_H
17
18
#include <vector>
19
20
class
OctaveFold
21
{
22
public
:
23
static
std::vector<double> process(std::vector<double> in) {
24
std::vector<double> out(12, 0.0);
25
for
(
int
i = 0; i < int(in.size()); ++i) {
26
out[(i+1) % 12] += in[i];
27
}
28
return
out;
29
}
30
};
31
32
#endif
33
OctaveFold
Definition:
OctaveFold.h:20
Generated by
1.8.11
Loading...