1 /*
2   Rakarrack   Audio FX software
3   CoilCrafter.h - Pick Up Emulation
4   Using RBFilter
5   Using Steve Harris LADSPA Plugin harmonic_gen
6   Modified for rakarrack by Ryan Billing & Josep Andreu
7 
8   This program is free software; you can redistribute it and/or modify
9   it under the terms of version 2 of the GNU General Public License
10   as published by the Free Software Foundation.
11 
12   This program is distributed in the hope that it will be useful,
13   but WITHOUT ANY WARRANTY; without even the implied warranty of
14   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   GNU General Public License (version 2) for more details.
16 
17   You should have received a copy of the GNU General Public License (version 2)
18   along with this program; if not, write to the Free Software Foundation,
19   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
20 
21 */
22 
23 #ifndef COILCRAFTER_H
24 #define COILCRAFTER_H
25 
26 #include "global.h"
27 #include "HarmonicEnhancer.h"
28 #include "AnalogFilter.h"
29 
30 class CoilCrafter
31 {
32 public:
33     CoilCrafter (float * efxoutl_, float * efxoutr_, double sample_rate, uint32_t intermediate_bufsize);
34     ~CoilCrafter ();
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     float outvolume;
47 
48 private:
49 
50     void setvolume (int value);
51     void sethpf (int value);
52     void setfreq1();
53     void setfreq2();
54     void setq1();
55     void setq2();
56 
57     int Pvolume;
58     int Ppo;
59     int Ppd;
60     int Ptone;
61     int Pq1;
62     int Pfreq1;
63     int Pq2;
64     int Pfreq2;
65     int Pmode;
66 
67     float tfreqs[10];
68     float tqs[10];
69     float rm[10];
70     float freq1,q1,freq2,q2;
71     float att;
72 
73     class HarmEnhancer *harm;
74     class AnalogFilter *RB1l, *RB1r;
75     class AnalogFilter *RB2l,*RB2r;
76     float* interpbuf;
77 
78     class FPreset *Fpre;
79 
80 };
81 
82 
83 #endif
84