annotate trunk/src/Modules/SSI/ModuleSSI.h @ 382:068e33a65f8d

- Pretty-plotting - Test on everything - Generalised beyond standard AMI
author tomwalters
date Tue, 14 Sep 2010 00:18:47 +0000
parents 30dde71d0230
children 7a573750b186
rev   line source
tomwalters@284 1 // Copyright 2010, Thomas Walters
tomwalters@284 2 //
tomwalters@284 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@284 4 // http://www.acousticscale.org/AIMC
tomwalters@284 5 //
tomwalters@318 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@318 7 // you may not use this file except in compliance with the License.
tomwalters@318 8 // You may obtain a copy of the License at
tomwalters@284 9 //
tomwalters@318 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@284 11 //
tomwalters@318 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@318 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@318 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@318 15 // See the License for the specific language governing permissions and
tomwalters@318 16 // limitations under the License.
tomwalters@284 17
tomwalters@284 18 /*!
tomwalters@284 19 * \author Thomas Walters <tom@acousticscale.org>
tomwalters@284 20 * \date created 2010/02/19
tomwalters@284 21 * \version \$Id$
tomwalters@284 22 */
tomwalters@284 23
tomwalters@284 24 #ifndef AIMC_MODULES_SSI_SSI_H_
tomwalters@284 25 #define AIMC_MODULES_SSI_SSI_H_
tomwalters@284 26
tomwalters@284 27 #include "Support/Module.h"
tomwalters@284 28
tomwalters@284 29 namespace aimc {
tomwalters@284 30 using std::vector;
tomwalters@284 31 class ModuleSSI : public Module {
tomwalters@284 32 public:
tomwalters@284 33 explicit ModuleSSI(Parameters *pParam);
tomwalters@284 34 virtual ~ModuleSSI();
tomwalters@284 35
tomwalters@284 36 /*! \brief Process a buffer
tomwalters@284 37 */
tomwalters@284 38 virtual void Process(const SignalBank &input);
tomwalters@284 39
tomwalters@284 40 private:
tomwalters@284 41 /*! \brief Reset the internal state of the module
tomwalters@284 42 */
tomwalters@284 43 virtual void ResetInternal();
tomwalters@284 44
tomwalters@284 45 /*! \brief Prepare the module
tomwalters@284 46 * \param input Input signal
tomwalters@284 47 * \param output true on success false on failure
tomwalters@284 48 */
tomwalters@284 49 virtual bool InitializeInternal(const SignalBank &input);
tomwalters@284 50
tomwalters@305 51 int ExtractPitchIndex(const SignalBank &input) const;
tomwalters@305 52
tomwalters@284 53 float sample_rate_;
tomwalters@284 54 int buffer_length_;
tomwalters@284 55 int channel_count_;
tomwalters@287 56 int ssi_width_samples_;
tomwalters@287 57 float ssi_width_cycles_;
tomwalters@305 58 float pivot_cf_;
tomwalters@284 59
tomwalters@284 60 bool do_pitch_cutoff_;
tomwalters@305 61 bool weight_by_cutoff_;
tomwalters@305 62 bool weight_by_scaling_;
tomwalters@305 63 bool log_cycles_axis_;
tomwalters@305 64 float pitch_search_start_ms_;
tomwalters@284 65 };
tomwalters@284 66 } // namespace aimc
tomwalters@284 67
tomwalters@284 68 #endif // AIMC_MODULES_SSI_SSI_H_