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@12
|
25 #ifndef AIMC_MODULES_SSI_SSI_H_
|
tomwalters@12
|
26 #define AIMC_MODULES_SSI_SSI_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 ModuleSSI : public Module {
|
tomwalters@12
|
33 public:
|
tomwalters@12
|
34 explicit ModuleSSI(Parameters *pParam);
|
tomwalters@12
|
35 virtual ~ModuleSSI();
|
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@32
|
52 int ExtractPitchIndex(const SignalBank &input) const;
|
tomwalters@32
|
53
|
tomwalters@12
|
54 float sample_rate_;
|
tomwalters@12
|
55 int buffer_length_;
|
tomwalters@12
|
56 int channel_count_;
|
tomwalters@15
|
57 int ssi_width_samples_;
|
tomwalters@15
|
58 float ssi_width_cycles_;
|
tomwalters@32
|
59 float pivot_cf_;
|
tomwalters@12
|
60
|
tomwalters@12
|
61 bool do_pitch_cutoff_;
|
tomwalters@32
|
62 bool weight_by_cutoff_;
|
tomwalters@32
|
63 bool weight_by_scaling_;
|
tomwalters@32
|
64 bool log_cycles_axis_;
|
tomwalters@32
|
65 float pitch_search_start_ms_;
|
tomwalters@12
|
66 };
|
tomwalters@12
|
67 } // namespace aimc
|
tomwalters@12
|
68
|
tomwalters@12
|
69 #endif // AIMC_MODULES_SSI_SSI_H_
|