00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_PEAKER_H
00020 #define MARSYAS_PEAKER_H
00021
00022 #include "MarSystem.h"
00023
00024 namespace Marsyas
00025 {
00047 class Peaker: public MarSystem
00048 {
00049 private:
00050 mrs_real rms_,
00051 max_,
00052 lpCoeff_,
00053 currThresh_;
00054
00055 mrs_realvec lpThresh_;
00056
00057 void addControls();
00058 void myUpdate(MarControlPtr sender);
00059
00060 mrs_bool doThresholding (mrs_real input, mrs_real peakStrengthRelRms, mrs_real peakStrengthRelMax, mrs_real peakStrengthRelThresh, mrs_real peakStrengthAbs);
00061 void compLpThresh (const mrs_realvec input, mrs_realvec &output);
00062
00063 mrs_natural twice_;
00064 mrs_natural half_;
00065 mrs_natural triple_;
00066 mrs_natural third_;
00067
00068 public:
00069 Peaker(std::string name);
00070 ~Peaker();
00071 MarSystem* clone() const;
00072
00073 void myProcess(realvec& in, realvec& out);
00074 };
00075
00076 }
00077
00078 #endif
00079
00080