Chris@24: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@24: Chris@42: /* Chris@42: Tipic Chris@42: Chris@42: Centre for Digital Music, Queen Mary, University of London. Chris@42: Chris@42: This program is free software; you can redistribute it and/or Chris@42: modify it under the terms of the GNU General Public License as Chris@42: published by the Free Software Foundation; either version 2 of the Chris@42: License, or (at your option) any later version. See the file Chris@42: COPYING included with this distribution for more information. Chris@42: */ Chris@42: Chris@24: #ifndef OCTAVEFOLD_H Chris@24: #define OCTAVEFOLD_H Chris@24: Chris@24: #include Chris@24: Chris@24: class OctaveFold Chris@24: { Chris@24: public: Chris@24: static std::vector process(std::vector in) { Chris@24: std::vector out(12, 0.0); Chris@24: for (int i = 0; i < int(in.size()); ++i) { Chris@25: out[(i+1) % 12] += in[i]; Chris@24: } Chris@49: return out; Chris@24: } Chris@24: }; Chris@24: Chris@24: #endif Chris@24: