00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef FILTERUTILS_H
00020 #define FILTERUTILS_H
00021
00022 #include "Typedefs.h"
00023 #include "Debug.h"
00024
00025 #include "Utils.h"
00026
00030 void chebyshev1(int order, Real rippleDB, int channels, MatrixXC* zeros, MatrixXC* poles, Real* gain);
00031
00035 void chebyshev2(int order, Real rippleDB, int channels, MatrixXC* zeros, MatrixXC* poles, Real* gain);
00036
00040 void butterworth(int order, int channels, MatrixXC* zeros, MatrixXC* poles, Real* gain);
00041
00045 void bessel(int order, int channels, MatrixXC* zeros, MatrixXC* poles, Real* gain);
00046
00051 void coeffsToZpk(const MatrixXR& b, const MatrixXR& a, MatrixXC* zeros, MatrixXC* poles, Real* gain);
00052
00057 void zpkToCoeffs(const MatrixXC& zeros, const MatrixXC& poles, Real gain, MatrixXC* b, MatrixXC* a);
00058
00063 void lowPassToLowPass(const MatrixXC& b, const MatrixXC& a, Real freq, MatrixXC* bout, MatrixXC* aout);
00064
00069 void lowPassToHighPass(const MatrixXC& b, const MatrixXC& a, Real freq, MatrixXC* bout, MatrixXC* aout);
00070
00075 void lowPassToBandPass(const MatrixXC& b, const MatrixXC& a, Real freq, Real freqStop, MatrixXC* bout, MatrixXC* aout);
00076
00081 void lowPassToBandStop(const MatrixXC& b, const MatrixXC& a, Real freq, Real freqStop, MatrixXC* bout, MatrixXC* aout);
00082
00087 void normalize(MatrixXC& b, MatrixXC& a);
00088
00093 void bilinear(const MatrixXC& b, const MatrixXC& a, Real fs, MatrixXR* bout, MatrixXR* aout);
00094
00095 #endif