1 /* 2 3 MBDist.h - Distorsion Effect 4 5 Copyright (C) 2002-2005 Nasca Octavian Paul 6 Author: Nasca Octavian Paul 7 ZynAddSubFX - a software synthesizer 8 9 Modified for rakarrack by Josep Andreu 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 MBVVOL_H 27 #define MBVVOL_H 28 29 #include "global.h" 30 #include "EffectLFO.h" 31 #include "AnalogFilter.h" 32 33 34 class MBVvol 35 { 36 public: 37 MBVvol (float * efxoutl_, float * efxoutr_, double sample_rate, uint32_t intermediate_bufsize); 38 ~MBVvol (); 39 void out (float * smpsl, float * smpr, uint32_t period); 40 void setpreset (int npreset); 41 void changepar (int npar, int value); 42 int getpar (int npar); 43 void cleanup (); 44 45 int Ppreset; 46 float outvolume; 47 48 float *efxoutl; 49 float *efxoutr; 50 float *lowl; 51 float *lowr; 52 float *midll; 53 float *midlr; 54 float *midhl; 55 float *midhr; 56 float *highl; 57 float *highr; 58 59 uint32_t PERIOD; 60 61 private: 62 63 void setvolume (int Pvolume); 64 void setpanning (int Ppanning); 65 void setCross1 (int value); 66 void setCross2 (int value); 67 void setCross3 (int value); 68 void setCombi (int value); 69 void updateVols(void); 70 void setSource(float* ptr, float* ptrr, int val); 71 72 73 //Parametrii 74 int Pvolume; //Volumul or E/R 75 int Pcombi; 76 int Cross1; 77 int Cross2; 78 int Cross3; 79 int PsL, PsML, PsMH, PsH;//volume source per band 80 81 //Parametrii reali 82 83 float coeff; 84 float lfo1l,lfo1r,lfo2l,lfo2r; 85 float v1l,v1r,v2l,v2r; 86 float d1,d2,d3,d4; 87 float volL,volML,volMH,volH; 88 float volLr,volMLr,volMHr,volHr; 89 float *sourceL,*sourceML,*sourceMH,*sourceH; 90 float *sourceLr,*sourceMLr,*sourceMHr,*sourceHr; 91 float one, zero; 92 AnalogFilter *lpf1l, *lpf1r, *hpf1l, *hpf1r; 93 AnalogFilter *lpf2l, *lpf2r, *hpf2l, *hpf2r; 94 AnalogFilter *lpf3l, *lpf3r, *hpf3l, *hpf3r; 95 float* interpbuf; //buffer for filters 96 97 EffectLFO* lfo1,*lfo2; 98 99 class FPreset *Fpre; 100 101 }; 102 103 104 #endif 105