From f7fa720d0bacc81aeb6ebbbae79493f2fdbddb75 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 31 Mar 2009 10:17:35 +0200 Subject: [PATCH] ZynAddSubFX: follow recent changes in CVS repository Follow recent changes in ZynAddSubFX CVS repository - ChangeLog says: 29 Mar 2009 (Mark McCurry) - Started to use Doxygen within the Effects - Started to use const within Effects - Changing tabs->four spaces in hopes of generating a bit more consitancy - Began to use Initialization Lists - Almost all changes contained in Effects until further discussion on the style, so consistancy can be reached --- plugins/zynaddsubfx/src/ChangeLog | 12 +- plugins/zynaddsubfx/src/Effects/Alienwah.C | 35 ++- plugins/zynaddsubfx/src/Effects/Alienwah.h | 72 +++--- plugins/zynaddsubfx/src/Effects/Chorus.C | 36 ++- plugins/zynaddsubfx/src/Effects/Chorus.h | 24 +- plugins/zynaddsubfx/src/Effects/Distorsion.C | 46 ++-- plugins/zynaddsubfx/src/Effects/Distorsion.h | 19 +- .../zynaddsubfx/src/Effects/DynamicFilter.C | 36 ++- .../zynaddsubfx/src/Effects/DynamicFilter.h | 21 +- plugins/zynaddsubfx/src/Effects/EQ.C | 25 +- plugins/zynaddsubfx/src/Effects/EQ.h | 13 +- plugins/zynaddsubfx/src/Effects/Echo.C | 219 ++++++++---------- plugins/zynaddsubfx/src/Effects/Echo.h | 129 ++++++++--- plugins/zynaddsubfx/src/Effects/Effect.C | 6 + plugins/zynaddsubfx/src/Effects/Effect.h | 50 +++- plugins/zynaddsubfx/src/Effects/EffectMgr.C | 36 +-- plugins/zynaddsubfx/src/Effects/EffectMgr.h | 9 +- plugins/zynaddsubfx/src/Effects/Phaser.C | 42 ++-- plugins/zynaddsubfx/src/Effects/Phaser.h | 34 +-- plugins/zynaddsubfx/src/Effects/Reverb.C | 37 ++- plugins/zynaddsubfx/src/Effects/Reverb.h | 63 +++-- 21 files changed, 508 insertions(+), 456 deletions(-) diff --git a/plugins/zynaddsubfx/src/ChangeLog b/plugins/zynaddsubfx/src/ChangeLog index 9b2665390..3416596ab 100644 --- a/plugins/zynaddsubfx/src/ChangeLog +++ b/plugins/zynaddsubfx/src/ChangeLog @@ -840,7 +840,7 @@ hovers over them - Created tooltips for the effects knobs - Standardized the code, so it could compile with pedantic without - errors + errors [it looks like some errors may have ben missed] 22 Feb 2009 (Mark McCurry) - Fix improper deallocation in PresetsStore @@ -851,3 +851,13 @@ - Added start of DocBook documentation - Incorperated JACK output patch by Emmanuel Saracco - Incorperated QUERTZ layout by Achim Settelmeier + +29 Mar 2009 (Mark McCurry) + - Started to use Doxygen within the Effects + - Started to use const within Effects + - Changing tabs->four spaces in hopes of generating a bit more + consitancy + - Began to use Initialization Lists + - Almost all changes contained in Effects until further + discussion on the style, so consistancy can be reached + diff --git a/plugins/zynaddsubfx/src/Effects/Alienwah.C b/plugins/zynaddsubfx/src/Effects/Alienwah.C index ceca8a38d..29a7afbc6 100644 --- a/plugins/zynaddsubfx/src/Effects/Alienwah.C +++ b/plugins/zynaddsubfx/src/Effects/Alienwah.C @@ -24,16 +24,9 @@ #include "Alienwah.h" #include -Alienwah::Alienwah(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; - - oldl=NULL; - oldr=NULL; - filterpars=NULL; - insertion=insertion_; - - Ppreset=0; +Alienwah::Alienwah(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0),oldl(NULL),oldr(NULL) +{ setpreset(Ppreset); cleanup(); oldclfol.a=fb;oldclfol.b=0.0; @@ -114,12 +107,12 @@ void Alienwah::cleanup(){ * Parameter control */ -void Alienwah::setdepth(unsigned char Pdepth){ +void Alienwah::setdepth(const unsigned char &Pdepth){ this->Pdepth=Pdepth; depth=(Pdepth/127.0); }; -void Alienwah::setfb(unsigned char Pfb){ +void Alienwah::setfb(const unsigned char &Pfb){ this->Pfb=Pfb; fb=fabs((Pfb-64.0)/64.1); fb=sqrt(fb); @@ -127,33 +120,33 @@ void Alienwah::setfb(unsigned char Pfb){ if (Pfb<64) fb=-fb; }; -void Alienwah::setvolume(unsigned char Pvolume){ +void Alienwah::setvolume(const unsigned char &Pvolume){ this->Pvolume=Pvolume; outvolume=Pvolume/127.0; if (insertion==0) volume=1.0; else volume=outvolume; }; -void Alienwah::setpanning(unsigned char Ppanning){ +void Alienwah::setpanning(const unsigned char &Ppanning){ this->Ppanning=Ppanning; panning=Ppanning/127.0; }; -void Alienwah::setlrcross(unsigned char Plrcross){ +void Alienwah::setlrcross(const unsigned char &Plrcross){ this->Plrcross=Plrcross; lrcross=Plrcross/127.0; }; -void Alienwah::setphase(unsigned char Pphase){ +void Alienwah::setphase(const unsigned char &Pphase){ this->Pphase=Pphase; phase=(Pphase-64.0)/64.0*PI; }; -void Alienwah::setdelay(unsigned char Pdelay){ +void Alienwah::setdelay(const unsigned char &Pdelay){ if (oldl!=NULL) delete [] oldl; if (oldr!=NULL) delete [] oldr; - if (Pdelay>=MAX_ALIENWAH_DELAY) Pdelay=MAX_ALIENWAH_DELAY; - this->Pdelay=Pdelay; + if (Pdelay>=MAX_ALIENWAH_DELAY) this->Pdelay=MAX_ALIENWAH_DELAY; + else this->Pdelay=Pdelay; oldl=new COMPLEXTYPE[Pdelay]; oldr=new COMPLEXTYPE[Pdelay]; cleanup(); @@ -179,7 +172,7 @@ void Alienwah::setpreset(unsigned char npreset){ }; -void Alienwah::changepar(int npar,unsigned char value){ +void Alienwah::changepar(const int &npar,const unsigned char &value){ switch(npar){ case 0: setvolume(value); break; @@ -210,7 +203,7 @@ void Alienwah::changepar(int npar,unsigned char value){ }; }; -unsigned char Alienwah::getpar(int npar){ +unsigned char Alienwah::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; diff --git a/plugins/zynaddsubfx/src/Effects/Alienwah.h b/plugins/zynaddsubfx/src/Effects/Alienwah.h index 8d247813a..4c4f23bbe 100644 --- a/plugins/zynaddsubfx/src/Effects/Alienwah.h +++ b/plugins/zynaddsubfx/src/Effects/Alienwah.h @@ -33,44 +33,52 @@ struct COMPLEXTYPE { REALTYPE a,b; }; +/**"AlienWah" Effect*/ class Alienwah:public Effect { public: - Alienwah(int insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); - ~Alienwah(); - void out(REALTYPE *smpsl,REALTYPE *smpsr); + /** + * Constructor + * @param insetion_ 1 for insertion Effect, 0 for others + * @param efxoutl_ Pointer to Alienwah's left channel output buffer + * @param efxoutr_ Pointer to Alienwah's left channel output buffer + * @return Initialized Alienwah + */ + Alienwah(int insetion_,REALTYPE *const efxoutl_,REALTYPE *const efxoutr_); + ~Alienwah(); + void out(REALTYPE *const smpsl,REALTYPE *const smpsr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); - void cleanup(); - + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; + void cleanup(); + private: - //Parametrii Alienwah - EffectLFO lfo;//lfo-ul Alienwah - unsigned char Pvolume; - unsigned char Ppanning; - unsigned char Pdepth;//the depth of the Alienwah - unsigned char Pfb;//feedback - unsigned char Plrcross;//feedback - unsigned char Pdelay; - unsigned char Pphase; + //Alienwah Parameters + EffectLFO lfo;//lfo-ul Alienwah + unsigned char Pvolume; + unsigned char Ppanning; + unsigned char Pdepth;//the depth of the Alienwah + unsigned char Pfb;//feedback + unsigned char Plrcross;//feedback + unsigned char Pdelay; + unsigned char Pphase; - - //Control Parametrii - void setvolume(unsigned char Pvolume); - void setpanning(unsigned char Ppanning); - void setdepth(unsigned char Pdepth); - void setfb(unsigned char Pfb); - void setlrcross(unsigned char Plrcross); - void setdelay(unsigned char Pdelay); - void setphase(unsigned char Pphase); - - //Valorile interne - int insertion; - REALTYPE panning,fb,depth,lrcross,phase; - COMPLEXTYPE *oldl,*oldr; - COMPLEXTYPE oldclfol,oldclfor; - int oldk; + + //Control Parameters + void setvolume(const unsigned char &Pvolume); + void setpanning(const unsigned char &Ppanning); + void setdepth(const unsigned char &Pdepth); + void setfb(const unsigned char &Pfb); + void setlrcross(const unsigned char &Plrcross); + void setdelay(const unsigned char &Pdelay); + void setphase(const unsigned char &Pphase); + + //Internal Values + //const int insertion; //value inherited + REALTYPE panning,fb,depth,lrcross,phase; + COMPLEXTYPE *oldl,*oldr; + COMPLEXTYPE oldclfol,oldclfor; + int oldk; }; #endif diff --git a/plugins/zynaddsubfx/src/Effects/Chorus.C b/plugins/zynaddsubfx/src/Effects/Chorus.C index b8a0c7dc2..46c3658c7 100644 --- a/plugins/zynaddsubfx/src/Effects/Chorus.C +++ b/plugins/zynaddsubfx/src/Effects/Chorus.C @@ -24,17 +24,14 @@ #include "Chorus.h" #include -Chorus::Chorus(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; +Chorus::Chorus(const int &insertion_,REALTYPE *const efxoutl_,REALTYPE *const efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0) +{ dlk=0;drk=0; maxdelay=(int)(MAX_CHORUS_DELAY/1000.0*SAMPLE_RATE); delayl=new REALTYPE[maxdelay]; delayr=new REALTYPE[maxdelay]; - insertion=insertion_; - filterpars=NULL; - Ppreset=0; setpreset(Ppreset); lfo.effectlfoout(&lfol,&lfor); @@ -144,33 +141,33 @@ void Chorus::cleanup(){ /* * Parameter control */ -void Chorus::setdepth(unsigned char Pdepth){ +void Chorus::setdepth(const unsigned char &Pdepth){ this->Pdepth=Pdepth; depth=(pow(8.0,(Pdepth/127.0)*2.0)-1.0)/1000.0;//seconds }; -void Chorus::setdelay(unsigned char Pdelay){ +void Chorus::setdelay(const unsigned char &Pdelay){ this->Pdelay=Pdelay; delay=(pow(10.0,(Pdelay/127.0)*2.0)-1.0)/1000.0;//seconds }; -void Chorus::setfb(unsigned char Pfb){ +void Chorus::setfb(const unsigned char &Pfb){ this->Pfb=Pfb; fb=(Pfb-64.0)/64.1; }; -void Chorus::setvolume(unsigned char Pvolume){ +void Chorus::setvolume(const unsigned char &Pvolume){ this->Pvolume=Pvolume; outvolume=Pvolume/127.0; if (insertion==0) volume=1.0; else volume=outvolume; }; -void Chorus::setpanning(unsigned char Ppanning){ +void Chorus::setpanning(const unsigned char &Ppanning){ this->Ppanning=Ppanning; panning=Ppanning/127.0; }; -void Chorus::setlrcross(unsigned char Plrcross){ +void Chorus::setlrcross(const unsigned char &Plrcross){ this->Plrcross=Plrcross; lrcross=Plrcross/127.0; }; @@ -206,7 +203,7 @@ void Chorus::setpreset(unsigned char npreset){ }; -void Chorus::changepar(int npar,unsigned char value){ +void Chorus::changepar(const int &npar,const unsigned char &value){ switch(npar){ case 0: setvolume(value); break; @@ -232,16 +229,16 @@ void Chorus::changepar(int npar,unsigned char value){ break; case 9: setlrcross(value); break; - case 10:if (value>1) value=1; - Pflangemode=value; + case 10:if (value>1) Pflangemode=1; + else Pflangemode=value; break; - case 11:if (value>1) value=1; - Poutsub=value; + case 11:if (value>1) Poutsub=1; + else Poutsub=value; break; }; }; -unsigned char Chorus::getpar(int npar){ +unsigned char Chorus::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; @@ -272,6 +269,3 @@ unsigned char Chorus::getpar(int npar){ }; - - - diff --git a/plugins/zynaddsubfx/src/Effects/Chorus.h b/plugins/zynaddsubfx/src/Effects/Chorus.h index 6b9249835..85366e60b 100644 --- a/plugins/zynaddsubfx/src/Effects/Chorus.h +++ b/plugins/zynaddsubfx/src/Effects/Chorus.h @@ -30,16 +30,16 @@ class Chorus:public Effect { public: - Chorus(int insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); + Chorus(const int &insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); ~Chorus(); void out(REALTYPE *smpsl,REALTYPE *smpsr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; void cleanup(); private: - //Parametrii Chorus + //Chorus Parameters EffectLFO lfo;//lfo-ul chorus unsigned char Pvolume; unsigned char Ppanning; @@ -52,17 +52,17 @@ class Chorus:public Effect { //Control Parametrii - void setvolume(unsigned char Pvolume); - void setpanning(unsigned char Ppanning); - void setdepth(unsigned char Pdepth); - void setdelay(unsigned char Pdelay); - void setfb(unsigned char Pfb); - void setlrcross(unsigned char Plrcross); + void setvolume(const unsigned char &Pvolume); + void setpanning(const unsigned char &Ppanning); + void setdepth(const unsigned char &Pdepth); + void setdelay(const unsigned char &Pdelay); + void setfb(const unsigned char &Pfb); + void setlrcross(const unsigned char &Plrcross); - //Valorile interne + //Internal Values REALTYPE depth,delay,fb,lrcross,panning; REALTYPE dl1,dl2,dr1,dr2,lfol,lfor; - int insertion,maxdelay; + int maxdelay; REALTYPE *delayl,*delayr; int dlk,drk,dlhi,dlhi2; REALTYPE getdelay(REALTYPE xlfo); diff --git a/plugins/zynaddsubfx/src/Effects/Distorsion.C b/plugins/zynaddsubfx/src/Effects/Distorsion.C index 133fc539c..c00f3e607 100644 --- a/plugins/zynaddsubfx/src/Effects/Distorsion.C +++ b/plugins/zynaddsubfx/src/Effects/Distorsion.C @@ -143,20 +143,17 @@ void waveshapesmps(int n,REALTYPE *smps,unsigned char type,unsigned char drive){ }; -Distorsion::Distorsion(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; +Distorsion::Distorsion(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0) +{ lpfl=new AnalogFilter(2,22000,1,0); lpfr=new AnalogFilter(2,22000,1,0); hpfl=new AnalogFilter(3,20,1,0); hpfr=new AnalogFilter(3,20,1,0); - filterpars=NULL; - insertion=insertion_; //default values - Ppreset=0; Pvolume=50; Plrcross=40; Pdrive=90; @@ -173,10 +170,10 @@ Distorsion::Distorsion(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ }; Distorsion::~Distorsion(){ - delete (lpfl); - delete (lpfr); - delete (hpfl); - delete (hpfr); + delete lpfl; + delete lpfr; + delete hpfl; + delete hpfr; }; @@ -256,7 +253,7 @@ void Distorsion::out(REALTYPE *smpsl,REALTYPE *smpsr){ /* * Parameter control */ -void Distorsion::setvolume(unsigned char Pvolume){ +void Distorsion::setvolume(const unsigned char &Pvolume){ this->Pvolume=Pvolume; if (insertion==0) { @@ -269,25 +266,25 @@ void Distorsion::setvolume(unsigned char Pvolume){ }; -void Distorsion::setpanning(unsigned char Ppanning){ +void Distorsion::setpanning(const unsigned char &Ppanning){ this->Ppanning=Ppanning; panning=(Ppanning+0.5)/127.0; }; -void Distorsion::setlrcross(unsigned char Plrcross){ +void Distorsion::setlrcross(const unsigned char &Plrcross){ this->Plrcross=Plrcross; lrcross=Plrcross/127.0*1.0; }; -void Distorsion::setlpf(unsigned char Plpf){ +void Distorsion::setlpf(const unsigned char &Plpf){ this->Plpf=Plpf; REALTYPE fr=exp(pow(Plpf/127.0,0.5)*log(25000.0))+40; lpfl->setfreq(fr); lpfr->setfreq(fr); }; -void Distorsion::sethpf(unsigned char Phpf){ +void Distorsion::sethpf(const unsigned char &Phpf){ this->Phpf=Phpf; REALTYPE fr=exp(pow(Phpf/127.0,0.5)*log(25000.0))+20.0; hpfl->setfreq(fr); @@ -321,7 +318,7 @@ void Distorsion::setpreset(unsigned char npreset){ }; -void Distorsion::changepar(int npar,unsigned char value){ +void Distorsion::changepar(const int &npar,const unsigned char &value){ switch (npar){ case 0: setvolume(value); break; @@ -333,25 +330,25 @@ void Distorsion::changepar(int npar,unsigned char value){ break; case 4: Plevel=value; break; - case 5: if (value>13) value=13;//this must be increased if more distorsion types are added - Ptype=value; + case 5: if (value>13) Ptype=13;//this must be increased if more distorsion types are added + else Ptype=value; break; - case 6: if (value>1) value=1; - Pnegate=value; + case 6: if (value>1) Pnegate=1; + else Pnegate=value; break; case 7: setlpf(value); break; case 8: sethpf(value); break; - case 9: if (value>1) value=1; - Pstereo=value; + case 9: if (value>1) Pstereo=1; + else Pstereo=value; break; case 10:Pprefiltering=value; break; }; }; -unsigned char Distorsion::getpar(int npar){ +unsigned char Distorsion::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; @@ -379,6 +376,3 @@ unsigned char Distorsion::getpar(int npar){ return(0);//in case of bogus parameter number }; - - - diff --git a/plugins/zynaddsubfx/src/Effects/Distorsion.h b/plugins/zynaddsubfx/src/Effects/Distorsion.h index 112482574..d351a4b7e 100644 --- a/plugins/zynaddsubfx/src/Effects/Distorsion.h +++ b/plugins/zynaddsubfx/src/Effects/Distorsion.h @@ -32,12 +32,12 @@ void waveshapesmps(int n,REALTYPE *smps,unsigned char type,unsigned char drive); class Distorsion:public Effect{ public: - Distorsion(int insertion,REALTYPE *efxoutl_,REALTYPE *efxoutr_); + Distorsion(const int &insertion,REALTYPE *efxoutl_,REALTYPE *efxoutr_); ~Distorsion(); void out(REALTYPE *smpsl,REALTYPE *smpr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; void cleanup(); void applyfilters(REALTYPE *efxoutl,REALTYPE *efxoutr); @@ -55,13 +55,13 @@ class Distorsion:public Effect{ unsigned char Pstereo; //0=mono,1=stereo unsigned char Pprefiltering;//if you want to do the filtering before the distorsion - void setvolume(unsigned char Pvolume); - void setpanning(unsigned char Ppanning); - void setlrcross(unsigned char Plrcross); - void setlpf(unsigned char Plpf); - void sethpf(unsigned char Phpf); + void setvolume(const unsigned char &Pvolume); + void setpanning(const unsigned char &Ppanning); + void setlrcross(const unsigned char &Plrcross); + void setlpf(const unsigned char &Plpf); + void sethpf(const unsigned char &Phpf); - //Parametrii reali + //Real Parameters REALTYPE panning,lrcross; AnalogFilter *lpfl,*lpfr,*hpfl,*hpfr; @@ -70,4 +70,3 @@ class Distorsion:public Effect{ #endif - diff --git a/plugins/zynaddsubfx/src/Effects/DynamicFilter.C b/plugins/zynaddsubfx/src/Effects/DynamicFilter.C index 90ba9b177..5595f793d 100644 --- a/plugins/zynaddsubfx/src/Effects/DynamicFilter.C +++ b/plugins/zynaddsubfx/src/Effects/DynamicFilter.C @@ -24,24 +24,19 @@ #include "DynamicFilter.h" #include -DynamicFilter::DynamicFilter(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; - - insertion=insertion_; - - Ppreset=0; - filterl=NULL; - filterr=NULL; - filterpars=new FilterParams(0,64,64); +DynamicFilter::DynamicFilter(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,new FilterParams(0,64,64),0), + filterl(NULL),filterr(NULL) +{ setpreset(Ppreset); cleanup(); + /**\todo fix intialization issues here*/ }; DynamicFilter::~DynamicFilter(){ - delete(filterpars); - delete(filterl); - delete(filterr); + delete filterpars; + delete filterl; + delete filterr; }; @@ -110,26 +105,26 @@ void DynamicFilter::cleanup(){ * Parameter control */ -void DynamicFilter::setdepth(unsigned char Pdepth){ +void DynamicFilter::setdepth(const unsigned char &Pdepth){ this->Pdepth=Pdepth; depth=pow((Pdepth/127.0),2.0); }; -void DynamicFilter::setvolume(unsigned char Pvolume){ +void DynamicFilter::setvolume(const unsigned char &Pvolume){ this->Pvolume=Pvolume; outvolume=Pvolume/127.0; if (insertion==0) volume=1.0; else volume=outvolume; }; -void DynamicFilter::setpanning(unsigned char Ppanning){ +void DynamicFilter::setpanning(const unsigned char &Ppanning){ this->Ppanning=Ppanning; panning=Ppanning/127.0; }; -void DynamicFilter::setampsns(unsigned char Pampsns){ +void DynamicFilter::setampsns(const unsigned char &Pampsns){ ampsns=pow(Pampsns/127.0,2.5)*10.0; if (Pampsnsinv!=0) ampsns=-ampsns; ampsmooth=exp(-Pampsmooth/127.0*10.0)*0.99; @@ -255,7 +250,7 @@ void DynamicFilter::setpreset(unsigned char npreset){ }; -void DynamicFilter::changepar(int npar,unsigned char value){ +void DynamicFilter::changepar(const int &npar,const unsigned char &value){ switch(npar){ case 0: setvolume(value); break; @@ -286,7 +281,7 @@ void DynamicFilter::changepar(int npar,unsigned char value){ }; }; -unsigned char DynamicFilter::getpar(int npar){ +unsigned char DynamicFilter::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; @@ -313,6 +308,3 @@ unsigned char DynamicFilter::getpar(int npar){ }; - - - diff --git a/plugins/zynaddsubfx/src/Effects/DynamicFilter.h b/plugins/zynaddsubfx/src/Effects/DynamicFilter.h index 006575530..5aeacfc54 100644 --- a/plugins/zynaddsubfx/src/Effects/DynamicFilter.h +++ b/plugins/zynaddsubfx/src/Effects/DynamicFilter.h @@ -35,8 +35,8 @@ class DynamicFilter:public Effect { void out(REALTYPE *smpsl,REALTYPE *smpsr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; void cleanup(); // void setdryonly(); @@ -46,21 +46,20 @@ class DynamicFilter:public Effect { EffectLFO lfo;//lfo-ul DynamicFilter unsigned char Pvolume; unsigned char Ppanning; - unsigned char Pdepth;//the depth of the lfo of the DynamicFilter - unsigned char Pampsns;//how the filter varies according to the input amplitude + unsigned char Pdepth;/** #include "EQ.h" -EQ::EQ(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; - insertion=insertion_; - filterpars=NULL; +EQ::EQ(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0) +{ for (int i=0;iPvolume=Pvolume; outvolume=pow(0.005,(1.0-Pvolume/127.0))*10.0; @@ -112,7 +109,7 @@ void EQ::setpreset(unsigned char npreset){ }; -void EQ::changepar(int npar,unsigned char value){ +void EQ::changepar(const int &npar,const unsigned char &value){ switch (npar){ case 0: setvolume(value); break; @@ -125,9 +122,9 @@ void EQ::changepar(int npar,unsigned char value){ REALTYPE tmp; switch(bp){ - case 0: if (value>9) value=0;//has to be changed if more filters will be added - filter[nb].Ptype=value; - if (value!=0){ + case 0: filter[nb].Ptype=value; + if (value>9) filter[nb].Ptype=0;//has to be changed if more filters will be added + if (filter[nb].Ptype!=0){ filter[nb].l->settype(value-1); filter[nb].r->settype(value-1); }; @@ -147,15 +144,15 @@ void EQ::changepar(int npar,unsigned char value){ filter[nb].l->setq(tmp); filter[nb].r->setq(tmp); break; - case 4: if (value>=MAX_FILTER_STAGES) value=MAX_FILTER_STAGES-1; - filter[nb].Pstages=value; + case 4: filter[nb].Pstages=value; + if (value>=MAX_FILTER_STAGES) filter[nb].Pstages=MAX_FILTER_STAGES-1; filter[nb].l->setstages(value); filter[nb].r->setstages(value); break; }; }; -unsigned char EQ::getpar(int npar){ +unsigned char EQ::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; diff --git a/plugins/zynaddsubfx/src/Effects/EQ.h b/plugins/zynaddsubfx/src/Effects/EQ.h index 0c19a287d..315d51a34 100644 --- a/plugins/zynaddsubfx/src/Effects/EQ.h +++ b/plugins/zynaddsubfx/src/Effects/EQ.h @@ -27,21 +27,22 @@ #include "../DSP/AnalogFilter.h" #include "Effect.h" +/**EQ Effect*/ class EQ:public Effect{ public: - EQ(int insertion,REALTYPE *efxoutl_,REALTYPE *efxoutr_); + EQ(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); ~EQ(); void out(REALTYPE *smpsl,REALTYPE *smpr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; void cleanup(); REALTYPE getfreqresponse(REALTYPE freq); private: - //Parametrii - unsigned char Pvolume;//Volumul + //Parameters + unsigned char Pvolume;/** -#include -#include +#include #include "Echo.h" -Echo::Echo(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; - filterpars=NULL; - - insertion=insertion_; - //default values - Ppreset=0; - Pvolume=50; - Ppanning=64; - Pdelay=60; - Plrdelay=100; - Plrcross=100; - Pfb=40; - Phidamp=60; - - ldelay=NULL; - rdelay=NULL; - lrdelay=0; - +Echo::Echo(const int & insertion_,REALTYPE *const efxoutl_,REALTYPE *const efxoutr_) + : Effect(insertion_,efxoutl_,efxoutr_,NULL,0), + Pvolume(50),Ppanning(64),Pdelay(60), + Plrdelay(100),Plrcross(100),Pfb(40),Phidamp(60), + lrdelay(0),ldelay(NULL),rdelay(NULL) +{ setpreset(Ppreset); cleanup(); -}; +} Echo::~Echo(){ delete[] ldelay; delete[] rdelay; -}; +} /* * Cleanup the effect @@ -63,7 +47,7 @@ void Echo::cleanup(){ for (i=0;i=dl) kl=0; - if (++kr>=dr) kr=0; + if (++kl>=dl) kl=0; + if (++kr>=dr) kr=0; }; -}; +} /* * Parameter control */ -void Echo::setvolume(unsigned char Pvolume){ +void Echo::setvolume(const unsigned char & Pvolume){ this->Pvolume=Pvolume; if (insertion==0) { - outvolume=pow(0.01,(1.0-Pvolume/127.0))*4.0; - volume=1.0; + outvolume=pow(0.01,(1.0-Pvolume/127.0))*4.0; + volume=1.0; } else { - volume=outvolume=Pvolume/127.0; + volume=outvolume=Pvolume/127.0; }; if (Pvolume==0) cleanup(); -}; +} -void Echo::setpanning(unsigned char Ppanning){ +void Echo::setpanning(const unsigned char & Ppanning){ this->Ppanning=Ppanning; panning=(Ppanning+0.5)/127.0; -}; +} -void Echo::setdelay(unsigned char Pdelay){ +void Echo::setdelay(const unsigned char & Pdelay){ this->Pdelay=Pdelay; delay=1+(int)(Pdelay/127.0*SAMPLE_RATE*1.5);//0 .. 1.5 sec initdelays(); -}; +} -void Echo::setlrdelay(unsigned char Plrdelay){ +void Echo::setlrdelay(const unsigned char & Plrdelay){ REALTYPE tmp; this->Plrdelay=Plrdelay; tmp=(pow(2,fabs(Plrdelay-64.0)/64.0*9)-1.0)/1000.0*SAMPLE_RATE; if (Plrdelay<64.0) tmp=-tmp; lrdelay=(int) tmp; initdelays(); -}; +} -void Echo::setlrcross(unsigned char Plrcross){ +void Echo::setlrcross(const unsigned char & Plrcross){ this->Plrcross=Plrcross; lrcross=Plrcross/127.0*1.0; -}; +} -void Echo::setfb(unsigned char Pfb){ +void Echo::setfb(const unsigned char & Pfb){ this->Pfb=Pfb; fb=Pfb/128.0; -}; +} -void Echo::sethidamp(unsigned char Phidamp){ +void Echo::sethidamp(const unsigned char & Phidamp){ this->Phidamp=Phidamp; hidamp=1.0-Phidamp/127.0; -}; +} void Echo::setpreset(unsigned char npreset){ const int PRESET_SIZE=7; const int NUM_PRESETS=9; unsigned char presets[NUM_PRESETS][PRESET_SIZE]={ - //Echo 1 - {67,64,35,64,30,59,0}, - //Echo 2 - {67,64,21,64,30,59,0}, - //Echo 3 - {67,75,60,64,30,59,10}, - //Simple Echo - {67,60,44,64,30,0,0}, - //Canyon - {67,60,102,50,30,82,48}, - //Panning Echo 1 - {67,64,44,17,0,82,24}, - //Panning Echo 2 - {81,60,46,118,100,68,18}, - //Panning Echo 3 - {81,60,26,100,127,67,36}, - //Feedback Echo - {62,64,28,64,100,90,55}}; + //Echo 1 + {67,64,35,64,30,59,0}, + //Echo 2 + {67,64,21,64,30,59,0}, + //Echo 3 + {67,75,60,64,30,59,10}, + //Simple Echo + {67,60,44,64,30,0,0}, + //Canyon + {67,60,102,50,30,82,48}, + //Panning Echo 1 + {67,64,44,17,0,82,24}, + //Panning Echo 2 + {81,60,46,118,100,68,18}, + //Panning Echo 3 + {81,60,26,100,127,67,36}, + //Feedback Echo + {62,64,28,64,100,90,55}}; if (npreset>=NUM_PRESETS) npreset=NUM_PRESETS-1; for (int n=0;nfilterpars; -}; +} /* * Obtain the effect number */ int EffectMgr::geteffect(){ return (nefx); -}; +} /* * Cleanup the current effect */ void EffectMgr::cleanup(){ if (efx!=NULL) efx->cleanup(); -}; +} /* @@ -104,14 +104,14 @@ void EffectMgr::cleanup(){ unsigned char EffectMgr::getpreset(){ if (efx!=NULL) return(efx->Ppreset); else return(0); -}; +} /* * Change the preset of the current effect */ void EffectMgr::changepreset_nolock(unsigned char npreset){ if (efx!=NULL) efx->setpreset(npreset); -}; +} /* * Change the preset of the current effect(with thread locking) @@ -120,7 +120,7 @@ void EffectMgr::changepreset(unsigned char npreset){ pthread_mutex_lock(mutex); changepreset_nolock(npreset); pthread_mutex_unlock(mutex); -}; +} /* @@ -129,7 +129,7 @@ void EffectMgr::changepreset(unsigned char npreset){ void EffectMgr::seteffectpar_nolock(int npar,unsigned char value){ if (efx==NULL) return; efx->changepar(npar,value); -}; +} /* * Change a parameter of the current effect (with thread locking) @@ -138,7 +138,7 @@ void EffectMgr::seteffectpar(int npar,unsigned char value){ pthread_mutex_lock(mutex); seteffectpar_nolock(npar,value); pthread_mutex_unlock(mutex); -}; +} /* * Get a parameter of the current effect @@ -146,7 +146,7 @@ void EffectMgr::seteffectpar(int npar,unsigned char value){ unsigned char EffectMgr::geteffectpar(int npar){ if (efx==NULL) return(0); return(efx->getpar(npar)); -}; +} /* @@ -214,7 +214,7 @@ void EffectMgr::out(REALTYPE *smpsl,REALTYPE *smpsr){ }; }; -}; +} /* * Get the effect volume for the system effect @@ -222,7 +222,7 @@ void EffectMgr::out(REALTYPE *smpsl,REALTYPE *smpsr){ REALTYPE EffectMgr::sysefxgetvolume(){ if (efx==NULL) return (1.0); else return(efx->outvolume); -}; +} /* @@ -231,12 +231,12 @@ REALTYPE EffectMgr::sysefxgetvolume(){ REALTYPE EffectMgr::getEQfreqresponse(REALTYPE freq){ if (nefx==7) return(efx->getfreqresponse(freq)); else return(0.0); -}; +} void EffectMgr::setdryonly(bool value){ dryonly=value; -}; +} void EffectMgr::add2XML(XMLwrapper *xml){ xml->addpar("type",geteffect()); @@ -258,7 +258,7 @@ void EffectMgr::add2XML(XMLwrapper *xml){ xml->endbranch(); }; xml->endbranch(); -}; +} void EffectMgr::getfromXML(XMLwrapper *xml){ changeeffect(xml->getpar127("type",geteffect())); @@ -285,7 +285,7 @@ void EffectMgr::getfromXML(XMLwrapper *xml){ xml->exitbranch(); }; cleanup(); -}; +} diff --git a/plugins/zynaddsubfx/src/Effects/EffectMgr.h b/plugins/zynaddsubfx/src/Effects/EffectMgr.h index 7937f0436..5be4e4601 100644 --- a/plugins/zynaddsubfx/src/Effects/EffectMgr.h +++ b/plugins/zynaddsubfx/src/Effects/EffectMgr.h @@ -39,6 +39,7 @@ #include "../Params/Presets.h" +/**Effect manager, an interface betwen the program and effects*/ class EffectMgr:public Presets{ public: EffectMgr(int insertion_,pthread_mutex_t *mutex_); @@ -52,10 +53,10 @@ class EffectMgr:public Presets{ void setdryonly(bool value); - //get the output(to speakers) volume of the systemeffect + /**get the output(to speakers) volume of the systemeffect*/ REALTYPE sysefxgetvolume(); - void cleanup();//cleanup the effect + void cleanup();/** #define PHASER_LFO_SHAPE 2 -Phaser::Phaser(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; - filterpars=NULL; - - oldl=NULL; - oldr=NULL; - insertion=insertion_; - - Ppreset=0; +Phaser::Phaser(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0),oldl(NULL),oldr(NULL) +{ setpreset(Ppreset); cleanup(); }; @@ -124,45 +117,45 @@ void Phaser::cleanup(){ /* * Parameter control */ -void Phaser::setdepth(unsigned char Pdepth){ +void Phaser::setdepth(const unsigned char &Pdepth){ this->Pdepth=Pdepth; depth=(Pdepth/127.0); }; -void Phaser::setfb(unsigned char Pfb){ +void Phaser::setfb(const unsigned char &Pfb){ this->Pfb=Pfb; fb=(Pfb-64.0)/64.1; }; -void Phaser::setvolume(unsigned char Pvolume){ +void Phaser::setvolume(const unsigned char &Pvolume){ this->Pvolume=Pvolume; outvolume=Pvolume/127.0; if (insertion==0) volume=1.0; else volume=outvolume; }; -void Phaser::setpanning(unsigned char Ppanning){ +void Phaser::setpanning(const unsigned char &Ppanning){ this->Ppanning=Ppanning; panning=Ppanning/127.0; }; -void Phaser::setlrcross(unsigned char Plrcross){ +void Phaser::setlrcross(const unsigned char &Plrcross){ this->Plrcross=Plrcross; lrcross=Plrcross/127.0; }; -void Phaser::setstages(unsigned char Pstages){ +void Phaser::setstages(const unsigned char &Pstages){ if (oldl!=NULL) delete [] oldl; if (oldr!=NULL) delete [] oldr; - if (Pstages>=MAX_PHASER_STAGES) Pstages=MAX_PHASER_STAGES-1; - this->Pstages=Pstages; + if (Pstages>=MAX_PHASER_STAGES) this->Pstages=MAX_PHASER_STAGES-1; + else this->Pstages=Pstages; oldl=new REALTYPE[Pstages*2]; oldr=new REALTYPE[Pstages*2]; cleanup(); }; -void Phaser::setphase(unsigned char Pphase){ +void Phaser::setphase(const unsigned char &Pphase){ this->Pphase=Pphase; phase=(Pphase/127.0); }; @@ -190,7 +183,7 @@ void Phaser::setpreset(unsigned char npreset){ }; -void Phaser::changepar(int npar,unsigned char value){ +void Phaser::changepar(const int &npar,const unsigned char &value){ switch(npar){ case 0: setvolume(value); break; @@ -216,15 +209,15 @@ void Phaser::changepar(int npar,unsigned char value){ break; case 9: setlrcross(value); break; - case 10:if (value>1) value=1; - Poutsub=value; + case 10:if (value>1) Poutsub=1; + else Poutsub=value; break; case 11:setphase(value); break; }; }; -unsigned char Phaser::getpar(int npar){ +unsigned char Phaser::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; @@ -255,6 +248,3 @@ unsigned char Phaser::getpar(int npar){ }; - - - diff --git a/plugins/zynaddsubfx/src/Effects/Phaser.h b/plugins/zynaddsubfx/src/Effects/Phaser.h index 07e1960c6..190f1491c 100644 --- a/plugins/zynaddsubfx/src/Effects/Phaser.h +++ b/plugins/zynaddsubfx/src/Effects/Phaser.h @@ -29,38 +29,38 @@ #define MAX_PHASER_STAGES 12 class Phaser:public Effect { public: - Phaser(int insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); + Phaser(const int &insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); ~Phaser(); void out(REALTYPE *smpsl,REALTYPE *smpsr); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; void cleanup(); void setdryonly(); private: //Parametrii Phaser - EffectLFO lfo;//lfo-ul Phaser + EffectLFO lfo;/** #include "Reverb.h" -/*TODO: EarlyReflections,Prdelay,Perbalance */ +/**\todo: EarlyReflections,Prdelay,Perbalance */ -Reverb::Reverb(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){ - efxoutl=efxoutl_; - efxoutr=efxoutr_; +Reverb::Reverb(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_) + :Effect(insertion_,efxoutl_,efxoutr_,NULL,0) +{ inputbuf=new REALTYPE[SOUND_BUFFER_SIZE]; - filterpars=NULL; - insertion=insertion_; //defaults - Ppreset=0; Pvolume=48; Ppan=64; Ptime=64; @@ -110,7 +107,7 @@ void Reverb::cleanup(){ void Reverb::processmono(int ch,REALTYPE *output){ int i,j; REALTYPE fbout,tmp; - //TODO: implement the high part from lohidamp + /**\todo: implement the high part from lohidamp*/ for (j=REV_COMBS*ch;jPvolume=Pvolume; if (insertion==0) { outvolume=pow(0.01,(1.0-Pvolume/127.0))*4.0; @@ -196,12 +193,12 @@ void Reverb::setvolume(unsigned char Pvolume){ }; }; -void Reverb::setpan(unsigned char Ppan){ +void Reverb::setpan(const unsigned char &Ppan){ this->Ppan=Ppan; pan=(REALTYPE)Ppan/127.0; }; -void Reverb::settime(unsigned char Ptime){ +void Reverb::settime(const unsigned char &Ptime){ int i; REALTYPE t; this->Ptime=Ptime; @@ -230,7 +227,7 @@ void Reverb::setlohidamp(unsigned char Plohidamp){ }; }; -void Reverb::setidelay(unsigned char Pidelay){ +void Reverb::setidelay(const unsigned char &Pidelay){ REALTYPE delay; this->Pidelay=Pidelay; delay=pow(50*Pidelay/127.0,2)-1.0; @@ -246,12 +243,12 @@ void Reverb::setidelay(unsigned char Pidelay){ }; }; -void Reverb::setidelayfb(unsigned char Pidelayfb){ +void Reverb::setidelayfb(const unsigned char &Pidelayfb){ this->Pidelayfb=Pidelayfb; idelayfb=Pidelayfb/128.0; }; -void Reverb::sethpf(unsigned char Phpf){ +void Reverb::sethpf(const unsigned char &Phpf){ this->Phpf=Phpf; if (Phpf==0) {//No HighPass if (hpf!=NULL) delete(hpf); @@ -264,7 +261,7 @@ void Reverb::sethpf(unsigned char Phpf){ }; }; -void Reverb::setlpf(unsigned char Plpf){ +void Reverb::setlpf(const unsigned char &Plpf){ this->Plpf=Plpf; if (Plpf==127) {//No LowPass if (lpf!=NULL) delete(lpf); @@ -327,10 +324,10 @@ void Reverb::settype(unsigned char Ptype){ cleanup(); }; -void Reverb::setroomsize(unsigned char Proomsize){ - if (Proomsize==0) Proomsize=64;//this is because the older versions consider roomsize=0 +void Reverb::setroomsize(const unsigned char &Proomsize){ this->Proomsize=Proomsize; - roomsize=(Proomsize-64.0)/64.0; + if (Proomsize==0) this->Proomsize=64;//this is because the older versions consider roomsize=0 + roomsize=(this->Proomsize-64.0)/64.0; if (roomsize>0.0) roomsize*=2.0; roomsize=pow(10.0,roomsize); rs=sqrt(roomsize); @@ -375,7 +372,7 @@ void Reverb::setpreset(unsigned char npreset){ }; -void Reverb::changepar(int npar,unsigned char value){ +void Reverb::changepar(const int &npar,const unsigned char &value){ switch (npar){ case 0: setvolume(value); break; @@ -404,7 +401,7 @@ void Reverb::changepar(int npar,unsigned char value){ }; }; -unsigned char Reverb::getpar(int npar){ +unsigned char Reverb::getpar(const int &npar)const{ switch (npar){ case 0: return(Pvolume); break; diff --git a/plugins/zynaddsubfx/src/Effects/Reverb.h b/plugins/zynaddsubfx/src/Effects/Reverb.h index 10f1d701b..6df67cbbb 100644 --- a/plugins/zynaddsubfx/src/Effects/Reverb.h +++ b/plugins/zynaddsubfx/src/Effects/Reverb.h @@ -31,83 +31,85 @@ #define REV_COMBS 8 #define REV_APS 4 +/**Creates Reverberation Effects*/ class Reverb:public Effect { public: - Reverb(int insertion,REALTYPE *efxoutl_,REALTYPE *efxoutr_); + Reverb(const int &insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_); ~Reverb(); void out(REALTYPE *smps_l,REALTYPE *smps_r); void cleanup(); void setpreset(unsigned char npreset); - void changepar(int npar,unsigned char value); - unsigned char getpar(int npar); + void changepar(const int &npar,const unsigned char &value); + unsigned char getpar(const int &npar)const; private: //Parametrii - //Amount of the reverb, + /**Amount of the reverb*/ unsigned char Pvolume; - //LefT/Right Panning + /**Left/Right Panning*/ unsigned char Ppan; - //duration of reverb + /**duration of reverb*/ unsigned char Ptime; - //Initial delay + /**Initial delay*/ unsigned char Pidelay; - //Initial delay feedback + /**Initial delay feedback*/ unsigned char Pidelayfb; - //delay between ER/Reverbs + /**delay between ER/Reverbs*/ unsigned char Prdelay; - //EarlyReflections/Reverb Balance + /**EarlyReflections/Reverb Balance*/ unsigned char Perbalance; - //HighPassFilter + /**HighPassFilter*/ unsigned char Plpf; - //LowPassFilter + /**LowPassFilter*/ unsigned char Phpf; - //Low/HighFrequency Damping - unsigned char Plohidamp;// 0..63 lpf,64=off,65..127=hpf(TODO) + /**Low/HighFrequency Damping + * \todo 0..63 lpf,64=off,65..127=hpf(TODO)*/ + unsigned char Plohidamp; - //Reverb type + /**Reverb type*/ unsigned char Ptype; - //Room Size + /**Room Size*/ unsigned char Proomsize; //parameter control - void setvolume(unsigned char Pvolume); - void setpan(unsigned char Ppan); - void settime(unsigned char Ptime); + void setvolume(const unsigned char &Pvolume); + void setpan(const unsigned char &Ppan); + void settime(const unsigned char &Ptime); void setlohidamp(unsigned char Plohidamp); - void setidelay(unsigned char Pidelay); - void setidelayfb(unsigned char Pidelayfb); - void sethpf(unsigned char Phpf); - void setlpf(unsigned char Plpf); - void settype(unsigned char Ptype); - void setroomsize(unsigned char Proomsize); + void setidelay(const unsigned char &Pidelay); + void setidelayfb(const unsigned char &Pidelayfb); + void sethpf(const unsigned char &Phpf); + void setlpf(const unsigned char &Plpf); + void settype( unsigned char Ptype); + void setroomsize(const unsigned char &Proomsize); REALTYPE pan,erbalance; //Parametrii 2 - int lohidamptype;//0=disable,1=highdamp(lowpass),2=lowdamp(highpass) + int lohidamptype;/**<0=disable,1=highdamp(lowpass),2=lowdamp(highpass)*/ int idelaylen,rdelaylen; int idelayk; REALTYPE lohifb,idelayfb,roomsize,rs;//rs is used to "normalise" the volume according to the roomsize int comblen[REV_COMBS*2]; int aplen[REV_APS*2]; - //Valorile interne + //Internal Variables REALTYPE *comb[REV_COMBS*2]; int combk[REV_COMBS*2]; - REALTYPE combfb[REV_COMBS*2];//feedback-ul fiecarui filtru "comb" - REALTYPE lpcomb[REV_COMBS*2];//pentru Filtrul LowPass + REALTYPE combfb[REV_COMBS*2];/**