Mixxx

/home/maxime/Projets/Mixxx/1.10/mixxx/src/engine/enginefilteriir.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           enginefilteriir.h  -  description
00003                              -------------------
00004     copyright            : (C) 2002 by Tue and Ken Haste Andersen
00005     email                :
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 
00017 #ifndef ENGINEFILTERIIR_H
00018 #define ENGINEFILTERIIR_H
00019 
00020 #include "engine/engineobject.h"
00021 #include "defs.h"
00022 
00023 class EngineFilterIIR : public EngineObject
00024 {
00025 public:
00026     EngineFilterIIR(const double *pCoefs, int iOrder);
00027     ~EngineFilterIIR();
00028     void process(const CSAMPLE *pIn, const CSAMPLE *pOut, const int iBufferSize);
00029 protected:
00030     int order;
00031     const double *coefs;
00032     #define MAXNZEROS 8
00033     #define MAXNPOLES 8
00034     double xv1[MAXNZEROS+1], yv1[MAXNPOLES+1];
00035     double xv2[MAXNZEROS+1], yv2[MAXNPOLES+1];
00036 };
00037 
00038 //
00039 // Defines filter coefficients for IIR filters:
00040 //
00041 
00042 // 8th order lowpass, corner at 600 Hz
00043 static const double bessel_lowpass[13] = {  7.444032197e+08,
00044                                             8, 28, 56, 70,
00045                                             -0.3800297563, 3.4120798629,
00046                                             -13.4230504610, 30.2214248640,
00047                                             -42.5938048390, 38.4826057150,
00048                                             -21.7665031930, 7.0472774638};
00049 
00050 // 4th order highpass, corner at 4000 Hz:
00051 static const double bessel_highpass[13] = {2.465837728e+00, // gain
00052                                            - 8,+ 28, - 56, + 70,
00053                                            -0.1552424571, 1.5489970216,
00054                                            -6.7821376632,17.0223182510,
00055                                            -26.7923322400,27.0856195480,
00056                                            -17.1796384890, 6.2523870250};
00057 
00058 // 8th order bandpass at 600 - 4000Hz:
00059 static const double bessel_bandpass[13] = {1.455078491e+02,
00060                                            0,-4,0,6,
00061                                            -0.1002852333, 1.0213655417,
00062                                            -4.6272090652,  12.1726925480,
00063                                            -20.3120761830, 21.9557125490,
00064                                            -14.9560287020,  5.8458265249};
00065 
00066 
00067 // 2nd order lowpass, corner 600Hz
00068 static const double bessel_lowpass2[4] = {3.707141512e+02, 2, -0.8282366449, 1.8174466602};
00069 
00070 // 2nd order bandpass at 600 - 4000Hz:
00071 static const double bessel_bandpass2[7] = {1.596830813e+01, 0, -2, -0.3374389990, 1.7280392126, -3.4124608099, 3.0203698354};
00072 
00073 // 2nd order highpass, corner at 4000 Hz:
00074 static const double bessel_highpass2[4] = {1.451889828e+00, -2, -0.4505643044, 1.3044656722};
00075 
00076 // 4th order lowpass, corner 600Hz
00077 static const double bessel_lowpass4[7] = {6.943736360e+04, 4, 6, -0.6673458737, 2.9444565421, -4.8814113588, 3.6040702669};
00078 
00079 // 4th order highpass, corner 4000Hz
00080 static const double bessel_highpass4[7] = {1.807553687e+00, -4, 6, -0.2898387148, 1.5497144728, -3.1422295239, 2.8699599032};
00081 
00082 
00083 /* Mixer Based EQ curves by John */
00084 
00085 /* Pioneer DJM-800 */
00086 // 4th order highpass, 13000Hz
00087 static const double bessel_highpass4_DJM800[7] = { 7.008002645e+00, -4,6, -0.0055179324, 0.0231872663, -0.2820220774, 0.3036711584};
00088 
00089 //8th order bandpass, 70Hz - 1300Hz
00090 static const double bessel_bandpass8_DJM800[13] = {6.433626341e+00, 0,-4, 0, 6, -0.0268312520, -0.0457103934, -0.1683239580, 1.0127019818, -1.4501742764, 2.2058243400, -3.8082264201, 3.2807399531};
00091 
00092 // 4th order lowpass, 70Hz
00093 static const double bessel_lowpass4_DJM800[7] = {1.638353272e+09, 4, 6, -0.9742750319, 3.9224911601, -5.9221546753, 3.9739385374};
00094 
00095 
00096 /* Mackie D2 */
00097 // 4th order highpass, 4000Hz
00098 static const double bessel_highpass4D2[7] = {1.807553687e+00, -4, 6, -0.2898387148, 1.5497144728, -3.1422295239, 2.8699599032};
00099 
00100 
00101 
00102 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines