annotate FIRFilter.h @ 47:cb79f27f0748

Clamp cyclic tempogram min and max BPM to the BPM equivalents of the actual underlying min and max tempogram bins, rather than the "input" min and max BPM (fixed root cause of #1054)
author Chris Cannam
date Mon, 29 Sep 2014 16:20:16 +0100
parents 4cf2d163127b
children
rev   line source
Chris@43 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@43 2
Chris@43 3 /*
Chris@43 4 Vamp Tempogram Plugin
Chris@43 5 Carl Bussey, Centre for Digital Music, Queen Mary University of London
Chris@43 6 Copyright 2014 Queen Mary University of London.
Chris@43 7
Chris@43 8 This program is free software; you can redistribute it and/or
Chris@43 9 modify it under the terms of the GNU General Public License as
Chris@43 10 published by the Free Software Foundation; either version 2 of the
Chris@43 11 License, or (at your option) any later version. See the file
Chris@43 12 COPYING included with this distribution for more information.
Chris@43 13 */
c@0 14
c@0 15 #ifndef __Tempogram__FIRFilter__
c@0 16 #define __Tempogram__FIRFilter__
c@0 17
c@7 18 #include <cmath>
c@7 19 #include <vamp-sdk/FFT.h>
c@7 20 #include <assert.h>
c@15 21 #include <iostream>
c@7 22
c@0 23 class FIRFilter{
c@0 24 public:
c@15 25 enum OutputTypeArgument{
c@15 26 first = 0,
c@15 27 middle,
c@15 28 all
c@15 29 };
c@15 30
c@13 31 FIRFilter(const size_t &lengthInput, const size_t &numberOfCoefficients);
c@0 32 ~FIRFilter();
c@15 33 void process(const float *pInput, const float *pCoefficients, float * pOutput, OutputTypeArgument outputType = first);
c@0 34 private:
c@13 35 size_t m_lengthInput;
c@13 36 size_t m_numberOfCoefficients;
c@20 37 size_t m_lengthFIRFFT;
c@0 38
c@13 39 double *m_pFftInput;
c@13 40 double *m_pFftCoefficients;
c@13 41 double *m_pFftReal1;
c@13 42 double *m_pFftImag1;
c@13 43 double *m_pFftReal2;
c@13 44 double *m_pFftImag2;
c@13 45 double *m_pFftFilteredReal;
c@13 46 double *m_pFftFilteredImag;
c@13 47 double *m_pFftOutputReal;
c@13 48 double *m_pFftOutputImag;
c@0 49
c@0 50 void initialise();
c@0 51 void cleanup();
c@0 52 };
c@0 53
c@0 54 #endif /* defined(__Tempogram__FIRFilter__) */