1 /*
2   Rakarrack   Audio FX software
3   Stompbox.h - stompbox modeler
4   Using Steve Harris LADSPA Plugin harmonic_gen
5   Modified for rakarrack by Ryan Billing & Josep Andreu
6 
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of version 2 of the GNU General Public License
9   as published by the Free Software Foundation.
10 
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License (version 2) for more details.
15 
16   You should have received a copy of the GNU General Public License (version 2)
17   along with this program; if not, write to the Free Software Foundation,
18   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 
20 */
21 
22 #ifndef STOMPBOX_H
23 #define STOMPBOX_H
24 
25 #include "global.h"
26 #include "AnalogFilter.h"
27 #include "Waveshaper.h"
28 
29 class StompBox
30 {
31 public:
32     StompBox (float * efxoutl_, float * efxoutr_, double sample_rate, uint32_t intermediate_bufsize,
33     		int wave_res, int wave_upq, int wave_dnq);
34     ~StompBox ();
35     void out (float * smpsl, float * smpr, uint32_t period);
36     void setpreset (int npreset);
37     void changepar (int npar, int value);
38     int getpar (int npar);
39     void cleanup ();
40 
41 
42     int Ppreset;
43 
44     float *efxoutl;
45     float *efxoutr;
46 
47 private:
48 
49     void setvolume (int value);
50     void init_mode (int value);
51     void init_tone ();
52 
53     int Pvolume;
54     int Pgain;
55     int Phigh;
56     int Pmid;
57     int Plow;
58     int Pmode;
59 
60     float gain, pre1gain, pre2gain, lowb, midb, highb, volume;
61     float LG, MG, HG, RGP2, RGPST, pgain;
62 
63     float* interpbuf; //buffer for filters
64     AnalogFilter *linput, *lpre1, *lpre2, *lpost, *ltonehg, *ltonemd, *ltonelw;
65     AnalogFilter *rinput, *rpre1, *rpre2, *rpost, *rtonehg, *rtonemd, *rtonelw;
66     AnalogFilter *ranti, *lanti;
67     class Waveshaper *lwshape, *rwshape, *lwshape2, *rwshape2;
68 
69     class FPreset *Fpre;
70 
71 };
72 
73 
74 #endif
75