Chris@26: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@26: 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@26: #ifndef RESIZE_H Chris@26: #define RESIZE_H Chris@26: Chris@26: #include Chris@26: Chris@26: class Resize Chris@26: { Chris@26: public: Chris@26: // The chroma processing chain requires a 120-bin pitch filterbank Chris@26: // output, even though ours only actually contains 88 bins. Zero Chris@26: // pad at both ends here. Chris@26: static std::vector process(std::vector in) { Chris@26: std::vector resized(20, 0.0); Chris@26: resized.insert(resized.end(), in.begin(), in.end()); Chris@26: resized.resize(120); Chris@26: return resized; Chris@26: } Chris@26: }; Chris@26: Chris@26: #endif