Chris@43: /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ Chris@43: Chris@43: /* Chris@43: Vamp Tempogram Plugin Chris@43: Carl Bussey, Centre for Digital Music, Queen Mary University of London Chris@43: Copyright 2014 Queen Mary University of London. Chris@43: Chris@43: This program is free software; you can redistribute it and/or Chris@43: modify it under the terms of the GNU General Public License as Chris@43: published by the Free Software Foundation; either version 2 of the Chris@43: License, or (at your option) any later version. See the file Chris@43: COPYING included with this distribution for more information. Chris@43: */ c@0: c@0: #ifndef __Tempogram__FIRFilter__ c@0: #define __Tempogram__FIRFilter__ c@0: c@7: #include c@7: #include c@7: #include c@15: #include c@7: c@0: class FIRFilter{ c@0: public: c@15: enum OutputTypeArgument{ c@15: first = 0, c@15: middle, c@15: all c@15: }; c@15: c@13: FIRFilter(const size_t &lengthInput, const size_t &numberOfCoefficients); c@0: ~FIRFilter(); c@15: void process(const float *pInput, const float *pCoefficients, float * pOutput, OutputTypeArgument outputType = first); c@0: private: c@13: size_t m_lengthInput; c@13: size_t m_numberOfCoefficients; c@20: size_t m_lengthFIRFFT; c@0: c@13: double *m_pFftInput; c@13: double *m_pFftCoefficients; c@13: double *m_pFftReal1; c@13: double *m_pFftImag1; c@13: double *m_pFftReal2; c@13: double *m_pFftImag2; c@13: double *m_pFftFilteredReal; c@13: double *m_pFftFilteredImag; c@13: double *m_pFftOutputReal; c@13: double *m_pFftOutputImag; c@0: c@0: void initialise(); c@0: void cleanup(); c@0: }; c@0: c@0: #endif /* defined(__Tempogram__FIRFilter__) */