00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_AIMGAMMATONE_H
00020 #define MARSYAS_AIMGAMMATONE_H
00021
00022 #include "MarSystem.h"
00023 #include "ERBTools.h"
00024
00025
00026
00027
00028 #include <vector>
00029
00030 namespace Marsyas
00031 {
00055 class marsyas_EXPORT AimGammatone: public MarSystem
00056 {
00057 private:
00058 void myUpdate(MarControlPtr sender);
00059
00060
00061 MarControlPtr ctrl_num_channels_;
00062 MarControlPtr ctrl_max_frequency_;
00063 MarControlPtr ctrl_min_frequency_;
00064
00065
00066 std::vector<std::vector<double> > b1_;
00067 std::vector<std::vector<double> > b2_;
00068 std::vector<std::vector<double> > b3_;
00069 std::vector<std::vector<double> > b4_;
00070 std::vector<std::vector<double> > a_;
00071
00072 std::vector<std::vector<double> > state_1_;
00073 std::vector<std::vector<double> > state_2_;
00074 std::vector<std::vector<double> > state_3_;
00075 std::vector<std::vector<double> > state_4_;
00076
00077 std::vector<double> centre_frequencies_;
00078
00079
00080 void ResetInternal();
00081
00082
00083 bool InitializeInternal();
00084
00085
00086 bool is_initialized;
00087
00088
00089 mrs_natural initialized_num_channels;
00090 mrs_real initialized_min_frequency;
00091 mrs_real initialized_max_frequency;
00092 mrs_real initialized_israte;
00093
00094
00095 bool is_reset;
00096
00097
00098 mrs_natural reset_num_channels;
00099
00100 public:
00101 AimGammatone(std::string name);
00102 AimGammatone(const AimGammatone& a);
00103
00104 ~AimGammatone();
00105 MarSystem* clone() const;
00106 void addControls();
00107
00108 void myProcess(realvec& in, realvec& out);
00109 };
00110
00111 }
00112
00113 #endif