1 /*
2   ZynAddSubFX - a software synthesizer
3 
4   EQ.h - EQ Effect
5   Copyright (C) 2002-2005 Nasca Octavian Paul
6   Author: Nasca Octavian Paul
7 
8   Modified for rakarrack by Josep Andreu
9 
10   This program is free software; you can redistribute it and/or modify
11   it under the terms of version 2 of the GNU General Public License
12   as published by the Free Software Foundation.
13 
14   This program is distributed in the hope that it will be useful,
15   but WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17   GNU General Public License (version 2) for more details.
18 
19   You should have received a copy of the GNU General Public License (version 2)
20   along with this program; if not, write to the Free Software Foundation,
21   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22 
23 */
24 
25 #ifndef EQ_H
26 #define EQ_H
27 
28 #include "global.h"
29 #include "AnalogFilter.h"
30 
31 class EQ
32 {
33 public:
34     EQ (float * efxoutl_, float * efxoutr_, double samplerate, uint32_t intermediate_bufsize);
35     ~EQ ();
36     void out (float * smpsl, float * smpr, uint32_t period);
37     void setpreset (int npreset);
38     void changepar (int npar, int value);
39     int getpar (int npar);
40     void cleanup ();
41     float getfreqresponse (float freq);
42     void setvolume (int Pvolume);
43 
44     int Ppreset;
45     int Pvolume;	//Volumul
46 
47     float outvolume;		//this is the volume of effect and is public because need it in system effect. The out volume of
48 
49     float *efxoutl;
50     float *efxoutr;
51 
52     float * interpbuf;//buffer for filter
53 
54     struct {
55         //parameters
56         int Ptype, Pfreq, Pgain, Pq, Pstages;
57         //internal values
58         AnalogFilter *l, *r;
59     } filter[MAX_EQ_BANDS];
60 
61 };
62 
63 
64 #endif
65