1 /*
2   ZynAddSubFX - a software synthesizer
3 
4   EffectLFO.h - Stereo LFO used by some effects
5   Copyright (C) 2002-2005 Nasca Octavian Paul
6   Author: Nasca Octavian Paul
7 
8   Modified for rakarrack by Josep Andreu & Ryan Billing
9 
10 
11   This program is free software; you can redistribute it and/or modify
12   it under the terms of version 2 of the GNU General Public License
13   as published by the Free Software Foundation.
14 
15   This program is distributed in the hope that it will be useful,
16   but WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18   GNU General Public License (version 2) for more details.
19 
20   You should have received a copy of the GNU General Public License (version 2)
21   along with this program; if not, write to the Free Software Foundation,
22   Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
23 
24 */
25 
26 #ifndef EFFECT_LFO_H
27 #define EFFECT_LFO_H
28 
29 #include "global.h"
30 
31 
32 class EffectLFO
33 {
34 public:
35     EffectLFO (double sample_rate);
36     ~EffectLFO ();
37     void effectlfoout (float * outl, float * outr);
38     void updateparams (uint32_t period);
39     int Pfreq;
40     int Prandomness;
41     int PLFOtype;
42     int Pstereo;	//"64"=0
43 private:
44     float getlfoshape (float x);
45 
46     float xl, xr;
47     float incx;
48     float ampl1, ampl2, ampr1, ampr2;	//necesar pentru "randomness"
49     float lfointensity;
50     float lfornd;
51     int lfotype;
52 
53     //Lorenz Fractal parameters
54     float x0,y0,z0,x1,y1,z1,radius;
55     float h;
56     float a;
57     float b;
58     float c;
59     float scale;
60     float iperiod;
61     float ratediv;
62 
63     //Sample/Hold
64     int holdflag;  //toggle left/right channel changes
65     float tca, tcb, maxrate;
66     float rreg, lreg, xlreg,xrreg, oldrreg, oldlreg;
67 
68     float fSAMPLE_RATE;
69 };
70 
71 
72 #endif
73