Mercurial > hg > tipic
view src/OctaveFold.h @ 25:2c913b88b808
Fix folding
author | Chris Cannam |
---|---|
date | Tue, 29 Sep 2015 16:51:49 +0100 |
parents | 353e88e4ebea |
children | 00b6ae41efbe |
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ #ifndef OCTAVEFOLD_H #define OCTAVEFOLD_H #include <vector> class OctaveFold { public: static std::vector<double> process(std::vector<double> in) { std::vector<double> out(12, 0.0); for (int i = 0; i < int(in.size()); ++i) { out[(i+1) % 12] += in[i]; } return std::move(out); } }; #endif