1 /*
2   Arpie.h - Echo Effect w/ arpeggiated delay
3   Copyright (C) 2002-2005 Nasca Octavian Paul
4   Author: Nasca Octavian Paul
5 
6   Modified for rakarrack by Josep Andreu
7 
8   Arpeggiated Echo by Ryan Billing (a.k.a. Transmogrifox)
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 ARPIE_H
26 #define ARPIE_H
27 
28 #include "global.h"
29 
30 class Arpie
31 {
32 public:
33     Arpie (float * efxoutl_, float * efxoutr_, double sample_rate);
34     ~Arpie ();
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     int Ppreset;
42     float *efxoutl;
43     float *efxoutr;
44     float outvolume;
45 
46 private:
47     //Parametrii
48     int Pvolume;	//Volumul or E/R
49     int Ppanning;	//Panning
50     int Pdelay;
51     int Plrdelay;	// L/R delay difference
52     int Plrcross;	// L/R Mixing
53     int Pfb;		//Feed-back-ul
54     int Phidamp;
55     int Preverse;
56     int Ppattern;
57     int Pharms;
58     int Psubdiv;
59 
60 
61     void setvolume (int Pvolume);
62     void setpanning (int Ppanning);
63     void setdelay (int Pdelay);
64     void setlrdelay (int Plrdelay);
65     void setlrcross (int Plrcross);
66     void setfb (int Pfb);
67     void sethidamp (int Phidamp);
68     void setreverse (int Preverse);
69     void setpattern (int Ppattern);
70 
71 
72     //Parametrii reali
73     void initdelays ();
74 
75     int dl, dr, delay, lrdelay;
76     int kl, kr, rvkl, rvkr, rvfl, rvfr, maxx_delay, fade, harmonic, envcnt, invattack;
77     int subdiv;
78     int *pattern;
79 
80     float panning, lrcross, fb, hidamp, reverse;
81     float *ldelay, *rdelay;
82     float oldl, oldr;		//pt. lpf
83     float  Srate_Attack_Coeff, envattack, envswell;
84 
85     class FPreset *Fpre;
86 
87     float fSAMPLE_RATE;
88 };
89 
90 
91 #endif
92