00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_BEATHISTOFEATURES_H
00020 #define MARSYAS_BEATHISTOFEATURES_H
00021
00022 #include "MarSystem.h"
00023 #include "MaxArgMax.h"
00024 #include "Peaker.h"
00025
00026 namespace Marsyas
00027 {
00039 class BeatHistoFeatures: public MarSystem
00040 {
00041 private:
00042 MarSystem* mxr_;
00043 MarSystem* pkr_;
00044 MarSystem* pkr1_;
00045
00046 MarControlPtr ctrl_mode_;
00047
00048 realvec mxres_;
00049 realvec pkres_;
00050 realvec pkres1_;
00051
00052 realvec flag_;
00053
00054 void harm_prob(mrs_real& pmax, mrs_real factor,
00055 mrs_real& s1, mrs_natural& t1,
00056 mrs_real& s2, mrs_natural& t2,
00057 mrs_natural tmx,
00058 mrs_natural size,
00059 const realvec& in);
00060
00061
00062 mrs_real sum_nearby(mrs_natural index, mrs_natural radius,
00063 mrs_natural size, const realvec& in);
00064
00065 void myUpdate(MarControlPtr sender);
00066 void beatHistoFeatures(realvec& in, realvec& out);
00067
00068 mrs_real NumMax (mrs_realvec& in);
00069
00070 void addControls();
00071 public:
00072 BeatHistoFeatures(std::string name);
00073 BeatHistoFeatures(const BeatHistoFeatures& a);
00074
00075 ~BeatHistoFeatures();
00076 MarSystem* clone() const;
00077
00078 void myProcess(realvec& in, realvec& out);
00079 };
00080
00081 }
00082
00083 #endif
00084
00085