00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef MARSYAS_LPC_H
00021 #define MARSYAS_LPC_H
00022
00023 #include "MarSystem.h"
00024
00025 namespace Marsyas
00026 {
00044 class LPC: public MarSystem
00045 {
00046 private:
00047 void addControls();
00048 void myUpdate(MarControlPtr sender);
00049
00050 MarControlPtr ctrl_coeffs_;
00051 MarControlPtr ctrl_power_;
00052 MarControlPtr ctrl_pitch_;
00053 mrs_natural order_;
00054 mrs_natural featureMode_;
00055
00056 realvec Zs_;
00057 realvec temp_;
00058
00067 void autocorrelationWarped(const realvec& in, realvec& r, mrs_real& pitch, mrs_real lambda);
00068
00076 void LevinsonDurbin(const realvec& r, realvec& a, realvec& k, mrs_real& e);
00077
00083 mrs_real predictionError(const realvec& data, const realvec& coeffs);
00084
00085
00086
00087
00088
00089
00090 mrs_real VRfDotProd (mrs_real * x1, mrs_real * x2, mrs_natural N);
00091
00092
00093
00094 void SPautoc (mrs_real * x, mrs_natural Nx, mrs_real * cor, mrs_natural Nt);
00095
00096
00097
00098
00099 mrs_real SPcorXpc (mrs_real * rxx, mrs_real * pc, mrs_natural Np);
00100
00101 public:
00102 LPC(std::string name);
00103 LPC(const LPC&);
00104 ~LPC();
00105
00106 MarSystem* clone() const;
00107
00108 void myProcess(realvec& in, realvec& out);
00109 };
00110
00111 }
00112
00113 #endif
00114
00115
00116