tomwalters@12: // Copyright 2010, Thomas Walters tomwalters@12: // tomwalters@12: // AIM-C: A C++ implementation of the Auditory Image Model tomwalters@12: // http://www.acousticscale.org/AIMC tomwalters@12: // tomwalters@45: // Licensed under the Apache License, Version 2.0 (the "License"); tomwalters@45: // you may not use this file except in compliance with the License. tomwalters@45: // You may obtain a copy of the License at tomwalters@12: // tomwalters@45: // http://www.apache.org/licenses/LICENSE-2.0 tomwalters@12: // tomwalters@45: // Unless required by applicable law or agreed to in writing, software tomwalters@45: // distributed under the License is distributed on an "AS IS" BASIS, tomwalters@45: // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. tomwalters@45: // See the License for the specific language governing permissions and tomwalters@45: // limitations under the License. tomwalters@12: tomwalters@12: /*! tomwalters@12: * \author Thomas Walters tomwalters@12: * \date created 2010/02/19 tomwalters@12: * \version \$Id$ tomwalters@12: */ tomwalters@12: tomwalters@12: #ifndef AIMC_MODULES_SSI_SSI_H_ tomwalters@12: #define AIMC_MODULES_SSI_SSI_H_ tomwalters@12: tomwalters@12: #include "Support/Module.h" tomwalters@12: tomwalters@12: namespace aimc { tomwalters@12: using std::vector; tomwalters@12: class ModuleSSI : public Module { tomwalters@12: public: tomwalters@12: explicit ModuleSSI(Parameters *pParam); tomwalters@12: virtual ~ModuleSSI(); tomwalters@12: tomwalters@12: /*! \brief Process a buffer tomwalters@12: */ tomwalters@12: virtual void Process(const SignalBank &input); tomwalters@12: tomwalters@12: private: tomwalters@12: /*! \brief Reset the internal state of the module tomwalters@12: */ tomwalters@12: virtual void ResetInternal(); tomwalters@12: tomwalters@12: /*! \brief Prepare the module tomwalters@12: * \param input Input signal tomwalters@12: * \param output true on success false on failure tomwalters@12: */ tomwalters@12: virtual bool InitializeInternal(const SignalBank &input); tomwalters@12: tomwalters@32: int ExtractPitchIndex(const SignalBank &input) const; tomwalters@32: tomwalters@12: float sample_rate_; tomwalters@12: int buffer_length_; tomwalters@12: int channel_count_; tomwalters@15: int ssi_width_samples_; tomwalters@15: float ssi_width_cycles_; tomwalters@32: float pivot_cf_; tomwalters@12: tomwalters@12: bool do_pitch_cutoff_; tomwalters@32: bool weight_by_cutoff_; tomwalters@32: bool weight_by_scaling_; tomwalters@32: bool log_cycles_axis_; tomwalters@32: float pitch_search_start_ms_; tomwalters@12: }; tomwalters@12: } // namespace aimc tomwalters@12: tomwalters@12: #endif // AIMC_MODULES_SSI_SSI_H_