annotate trunk/src/Modules/BMM/ModuleGammatone.h @ 277:6b4921704eb1

- Ported over HTK file output - Added some more meat to the Slaney IIR gammatone implementation - Ported over the AIM-MAT sf2003 parabola strobe algorithm - Finished making the SAI implementation compile - Ported over the strobe list class (now uses STL deques internally)
author tomwalters
date Thu, 18 Feb 2010 16:55:40 +0000
parents a57b29e373c7
children e55d0c225a57
rev   line source
tomwalters@276 1 // Copyright 2009-2010, Thomas Walters
tomwalters@276 2 //
tomwalters@276 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@276 4 // http://www.acousticscale.org/AIMC
tomwalters@276 5 //
tomwalters@276 6 // This program is free software: you can redistribute it and/or modify
tomwalters@276 7 // it under the terms of the GNU General Public License as published by
tomwalters@276 8 // the Free Software Foundation, either version 3 of the License, or
tomwalters@276 9 // (at your option) any later version.
tomwalters@276 10 //
tomwalters@276 11 // This program is distributed in the hope that it will be useful,
tomwalters@276 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@276 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@276 14 // GNU General Public License for more details.
tomwalters@276 15 //
tomwalters@276 16 // You should have received a copy of the GNU General Public License
tomwalters@276 17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
tomwalters@276 18
tomwalters@276 19 /*! \file
tomwalters@276 20 * \brief Slaney's gammatone filterbank
tomwalters@276 21 *
tomwalters@276 22 * \author Thomas Walters <tom@acousticscale.org>
tomwalters@276 23 * \date created 2009/11/13
tomwalters@276 24 * \version \$Id$
tomwalters@276 25 */
tomwalters@276 26
tomwalters@276 27 #include <vector>
tomwalters@276 28
tomwalters@277 29 #include "Support/Module.h"
tomwalters@277 30 #include "Support/Parameters.h"
tomwalters@277 31 #include "Support/SignalBank.h"
tomwalters@277 32
tomwalters@276 33 namespace aimc {
tomwalters@276 34 using std::vector;
tomwalters@276 35 class ModuleGammatone : public Module {
tomwalters@276 36 public:
tomwalters@276 37 ModuleGammatone(Parameters *params);
tomwalters@276 38 virtual ~ModuleGammatone();
tomwalters@276 39 //! \brief Process a buffer
tomwalters@276 40 virtual void Process(const SignalBank &input);
tomwalters@276 41
tomwalters@276 42 private:
tomwalters@276 43 virtual bool InitializeInternal(const SignalBank& input);
tomwalters@276 44 virtual void ResetInternal();
tomwalters@276 45 vector<vector<float> > forward_;
tomwalters@277 46 vector<vector<float> > back_;
tomwalters@277 47 vector<vector<float> > state_;
tomwalters@276 48 vector<float> centre_frequencies_;
tomwalters@276 49 int num_channels_;
tomwalters@276 50 float max_frequency_;
tomwalters@276 51 float min_frequency_;
tomwalters@276 52 };
tomwalters@276 53 } // namespace aimc