tomwalters@284: // Copyright 2010, Thomas Walters tomwalters@284: // tomwalters@284: // AIM-C: A C++ implementation of the Auditory Image Model tomwalters@284: // http://www.acousticscale.org/AIMC tomwalters@284: // tomwalters@284: // This program is free software: you can redistribute it and/or modify tomwalters@284: // it under the terms of the GNU General Public License as published by tomwalters@284: // the Free Software Foundation, either version 3 of the License, or tomwalters@284: // (at your option) any later version. tomwalters@284: // tomwalters@284: // This program is distributed in the hope that it will be useful, tomwalters@284: // but WITHOUT ANY WARRANTY; without even the implied warranty of tomwalters@284: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the tomwalters@284: // GNU General Public License for more details. tomwalters@284: // tomwalters@284: // You should have received a copy of the GNU General Public License tomwalters@284: // along with this program. If not, see . tomwalters@284: tomwalters@284: /*! tomwalters@284: * \author Thomas Walters tomwalters@284: * \date created 2010/02/19 tomwalters@284: * \version \$Id$ tomwalters@284: */ tomwalters@284: tomwalters@284: #ifndef AIMC_MODULES_SSI_SSI_H_ tomwalters@284: #define AIMC_MODULES_SSI_SSI_H_ tomwalters@284: tomwalters@284: #include "Support/Module.h" tomwalters@284: tomwalters@284: namespace aimc { tomwalters@284: using std::vector; tomwalters@284: class ModuleSSI : public Module { tomwalters@284: public: tomwalters@284: explicit ModuleSSI(Parameters *pParam); tomwalters@284: virtual ~ModuleSSI(); tomwalters@284: tomwalters@284: /*! \brief Process a buffer tomwalters@284: */ tomwalters@284: virtual void Process(const SignalBank &input); tomwalters@284: tomwalters@284: private: tomwalters@284: /*! \brief Reset the internal state of the module tomwalters@284: */ tomwalters@284: virtual void ResetInternal(); tomwalters@284: tomwalters@284: /*! \brief Prepare the module tomwalters@284: * \param input Input signal tomwalters@284: * \param output true on success false on failure tomwalters@284: */ tomwalters@284: virtual bool InitializeInternal(const SignalBank &input); tomwalters@284: tomwalters@305: int ExtractPitchIndex(const SignalBank &input) const; tomwalters@305: tomwalters@284: float sample_rate_; tomwalters@284: int buffer_length_; tomwalters@284: int channel_count_; tomwalters@287: int ssi_width_samples_; tomwalters@287: float ssi_width_cycles_; tomwalters@305: float pivot_cf_; tomwalters@284: tomwalters@284: bool do_pitch_cutoff_; tomwalters@305: bool weight_by_cutoff_; tomwalters@305: bool weight_by_scaling_; tomwalters@305: bool log_cycles_axis_; tomwalters@305: float pitch_search_start_ms_; tomwalters@284: }; tomwalters@284: } // namespace aimc tomwalters@284: tomwalters@284: #endif // AIMC_MODULES_SSI_SSI_H_