00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_AIMSSI_H
00020 #define MARSYAS_AIMSSI_H
00021
00022 #include "MarSystem.h"
00023 #include "ERBTools.h"
00024
00025
00026
00027
00028 #include <vector>
00029
00030 namespace Marsyas
00031 {
00047 class marsyas_EXPORT AimSSI: public MarSystem
00048 {
00049 private:
00050 void myUpdate(MarControlPtr sender);
00051
00052
00053 void ResetInternal();
00054
00055
00056 bool InitializeInternal();
00057
00058
00059 bool is_initialized;
00060
00061
00062 mrs_real initialized_israte;
00063
00064
00065 bool is_reset;
00066
00067
00068 mrs_natural reset_inobservations;
00069
00070 int ExtractPitchIndex(realvec& in) const;
00071
00072
00073 MarControlPtr ctrl_do_pitch_cutoff_;
00074 MarControlPtr ctrl_weight_by_cutoff_;
00075 MarControlPtr ctrl_weight_by_scaling_;
00076 MarControlPtr ctrl_log_cycles_axis_;
00077 MarControlPtr ctrl_pitch_search_start_ms_;
00078 MarControlPtr ctrl_ssi_width_cycles_;
00079 MarControlPtr ctrl_pivot_cf_;
00080
00081
00082
00083 MarControlPtr ctrl_max_frequency_;
00084 MarControlPtr ctrl_min_frequency_;
00085 bool is_centre_frequencies_calculated;
00086 std::vector<double> centre_frequencies_;
00087 void CalculateCentreFrequencies();
00088
00089
00090
00091
00092 int ssi_width_samples_;
00093
00094 double Log2( double n );
00095
00096 public:
00097 AimSSI(std::string name);
00098
00099 ~AimSSI();
00100 MarSystem* clone() const;
00101 void addControls();
00102
00103 void myProcess(realvec& in, realvec& out);
00104 };
00105
00106 }
00107
00108 #endif