annotate src/Modules/Profile/ModuleSlice.h @ 20:fff25824d1d1

-Added a module to scale output values by the channel centre frequency -Fixed file input to support loading and processing of multiple files -Updated the aimc main file to generate profiles like in the recognition experiments
author tomwalters
date Mon, 22 Feb 2010 17:51:27 +0000
parents d67a0a83d11b
children c5f5e9569863
rev   line source
tomwalters@12 1 // Copyright 2010, Thomas Walters
tomwalters@12 2 //
tomwalters@12 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@12 4 // http://www.acousticscale.org/AIMC
tomwalters@12 5 //
tomwalters@12 6 // This program is free software: you can redistribute it and/or modify
tomwalters@12 7 // it under the terms of the GNU General Public License as published by
tomwalters@12 8 // the Free Software Foundation, either version 3 of the License, or
tomwalters@12 9 // (at your option) any later version.
tomwalters@12 10 //
tomwalters@12 11 // This program is distributed in the hope that it will be useful,
tomwalters@12 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
tomwalters@12 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
tomwalters@12 14 // GNU General Public License for more details.
tomwalters@12 15 //
tomwalters@12 16 // You should have received a copy of the GNU General Public License
tomwalters@12 17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
tomwalters@12 18
tomwalters@12 19 /*!
tomwalters@12 20 * \author Thomas Walters <tom@acousticscale.org>
tomwalters@12 21 * \date created 2010/02/19
tomwalters@12 22 * \version \$Id$
tomwalters@12 23 */
tomwalters@12 24
tomwalters@20 25 #ifndef AIMC_MODULES_PROFILE_SCALER_H_
tomwalters@20 26 #define AIMC_MODULES_PROFILE_SCALER_H_
tomwalters@12 27
tomwalters@12 28 #include "Support/Module.h"
tomwalters@12 29
tomwalters@12 30 namespace aimc {
tomwalters@12 31 using std::vector;
tomwalters@12 32 class ModuleSlice : public Module {
tomwalters@12 33 public:
tomwalters@12 34 explicit ModuleSlice(Parameters *pParam);
tomwalters@12 35 virtual ~ModuleSlice();
tomwalters@12 36
tomwalters@12 37 /*! \brief Process a buffer
tomwalters@12 38 */
tomwalters@12 39 virtual void Process(const SignalBank &input);
tomwalters@12 40
tomwalters@12 41 private:
tomwalters@12 42 /*! \brief Reset the internal state of the module
tomwalters@12 43 */
tomwalters@12 44 virtual void ResetInternal();
tomwalters@12 45
tomwalters@12 46 /*! \brief Prepare the module
tomwalters@12 47 * \param input Input signal
tomwalters@12 48 * \param output true on success false on failure
tomwalters@12 49 */
tomwalters@12 50 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@12 51
tomwalters@12 52 float sample_rate_;
tomwalters@12 53 int buffer_length_;
tomwalters@12 54 int channel_count_;
tomwalters@12 55
tomwalters@12 56 bool temporal_profile_;
tomwalters@12 57 bool take_all_;
tomwalters@12 58 int lower_limit_;
tomwalters@12 59 int upper_limit_;
tomwalters@12 60 bool normalize_slice_;
tomwalters@12 61 int slice_length_;
tomwalters@12 62 };
tomwalters@12 63 } // namespace aimc
tomwalters@12 64
tomwalters@20 65 #endif // AIMC_MODULES_PROFILE_SCALER_H_