1 /* 2 3 CompBand.h - 4 Bands Compressor 4 5 Using Compressor and AnalogFilters by other authors. 6 7 Based on artscompressor.cc by Matthias Kretz <kretz@kde.org> 8 Stefan Westerfeld <stefan@space.twc.de> 9 Modified by Ryan Billing & Josep Andreu 10 11 Copyright (C) 2002-2005 Nasca Octavian Paul 12 Author: Nasca Octavian Paul 13 ZynAddSubFX - a software synthesizer 14 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of version 2 of the GNU General Public License 17 as published by the Free Software Foundation. 18 19 This program is distributed in the hope that it will be useful, 20 but WITHOUT ANY WARRANTY; without even the implied warranty of 21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 GNU General Public License (version 2) for more details. 23 24 You should have received a copy of the GNU General Public License (version 2) 25 along with this program; if not, write to the Free Software Foundation, 26 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 27 28 */ 29 30 #ifndef COMPBANDL_H 31 #define COMPBANDL_H 32 33 #include "Compressor.h" 34 #include "AnalogFilter.h" 35 36 37 class CompBand 38 { 39 public: 40 CompBand (float * efxoutl_, float * efxoutr_, double sample_rate, uint32_t intermediate_bufsize); 41 ~CompBand (); 42 void out (float * smpsl, float * smpr, uint32_t period); 43 void setpreset (int npreset); 44 void changepar (int npar, int value); 45 int getpar (int npar); 46 void cleanup (); 47 48 int Ppreset; 49 float outvolume; 50 float level; 51 52 float *efxoutl; 53 float *efxoutr; 54 float *lowl; 55 float *lowr; 56 float *midll; 57 float *midlr; 58 float *midhl; 59 float *midhr; 60 float *highl; 61 float *highr; 62 63 64 private: 65 66 void setvolume (int Pvolume); 67 void setlevel(int value); 68 void setratio (int ch, int value); 69 void setthres (int ch, int value); 70 void setCross1 (int value); 71 void setCross2 (int value); 72 void setCross3 (int value); 73 74 75 //Parametrii 76 int Pvolume; //Volumul or E/R 77 int Plevel; 78 int PLratio; 79 int PMLratio; 80 int PMHratio; 81 int PHratio; 82 int PLthres; 83 int PMLthres; 84 int PMHthres; 85 int PHthres; 86 87 88 int Cross1; 89 int Cross2; 90 int Cross3; 91 92 //Parametrii reali 93 94 AnalogFilter *lpf1l, *lpf1r, *hpf1l, *hpf1r; 95 AnalogFilter *lpf2l, *lpf2r, *hpf2l, *hpf2r; 96 AnalogFilter *lpf3l, *lpf3r, *hpf3l, *hpf3r; 97 float * interpbuf;//buffer for filters 98 99 Compressor *CL,*CML,*CMH,*CH; 100 101 class FPreset *Fpre; 102 103 }; 104 105 #endif 106