00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_MFCC_H
00020 #define MARSYAS_MFCC_H
00021
00022 #include "MarSystem.h"
00023
00024
00025 namespace Marsyas
00026 {
00046 class MFCC: public MarSystem
00047 {
00048 private:
00049
00051 void addControls();
00052
00053 void myUpdate(MarControlPtr sender);
00054
00055 mrs_real lowestFrequency_;
00056 mrs_natural linearFilters_;
00057 mrs_real linearSpacing_;
00058 mrs_natural logFilters_;
00059 mrs_real logSpacing_;
00060 mrs_natural totalFilters_;
00061
00062 mrs_natural fftSize_, pfftSize_;
00063 mrs_natural samplingRate_, psamplingRate_;
00064
00065
00067 mrs_natural cepstralCoefs_;
00069 mrs_natural pcepstralCoefs_;
00071 static const int cepstralCoefs_default = 13;
00072
00074 MarControlPtr ctrl_cepstralCoefs_;
00075
00076 realvec freqs_;
00077 realvec lower_;
00078 realvec center_;
00079 realvec upper_;
00080 realvec triangle_heights_;
00081
00082 realvec fftFreqs_;
00083 realvec mfccFilterWeights_;
00084 realvec mfccDCT_;
00085 realvec earMagnitude_;
00086 realvec fmagnitude_;
00087
00088
00089 int* mfcc_offsets_;
00090
00091 bool init_;
00092
00093 public:
00094
00095 MFCC(std::string name);
00096 MFCC(const MFCC& a);
00097 ~MFCC();
00098 MarSystem* clone() const;
00099
00100 void myProcess(realvec& in, realvec& out);
00101 };
00102
00103 }
00104
00105 #endif
00106
00107
00108