commit 07c3e8dd220f76db8f351090a2e6d6212870343a
parent bc1538ef65bf41de9bb45fae943a329cd19b3bac
Author: paulnasca <paulnasca>
Date: Wed, 30 Jun 2004 20:55:57 +0000
*** empty log message ***
Diffstat:
18 files changed, 502 insertions(+), 27 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -598,5 +598,5 @@
- Facute cateva imbunatatiri la interfata unde sunt inlocuite comuter-urile cu setari mai usor de inteles de catre utilizator (ex. la efectele de insertie se arata "insert to Master Out" in loc de "-2")
29 Iun 2004 - Inlaturata setarea cu gain la Resonance pentru ca este inutil (datorita faptului ca normalize este Full RMS intotdeauna)
30 Iun 2004 - Inlaturata o eroare recenta la EffectUI si modificat EffectUI in sensul ca nu trebuie sters si reinstantiat pentru a se reincarca valorile curente de efecte
-
+ - Inceput sa scriu un nou efect (DynamicFilter)
diff --git a/src/Effects/Alienwah.C b/src/Effects/Alienwah.C
@@ -30,6 +30,7 @@ Alienwah::Alienwah(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
oldl=NULL;
oldr=NULL;
+ filterpars=NULL;
insertion=insertion_;
Ppreset=0;
diff --git a/src/Effects/Chorus.C b/src/Effects/Chorus.C
@@ -33,6 +33,7 @@ Chorus::Chorus(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
delayr=new REALTYPE[maxdelay];
insertion=insertion_;
+ filterpars=NULL;
Ppreset=0;
setpreset(Ppreset);
diff --git a/src/Effects/Distorsion.C b/src/Effects/Distorsion.C
@@ -35,6 +35,7 @@ Distorsion::Distorsion(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
hpfl=new AnalogFilter(3,20,1,0);
hpfr=new AnalogFilter(3,20,1,0);
+ filterpars=NULL;
insertion=insertion_;
//default values
diff --git a/src/Effects/DynamicFilter.C b/src/Effects/DynamicFilter.C
@@ -0,0 +1,244 @@
+/*
+ ZynAddSubFX - a software synthesizer
+
+ DynamicFilter.C - "WahWah" effect and others
+ Copyright (C) 2002-2004 Nasca Octavian Paul
+ Author: Nasca Octavian Paul
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License (version 2) for more details.
+
+ You should have received a copy of the GNU General Public License (version 2)
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+#include <math.h>
+#include "DynamicFilter.h"
+#include <stdio.h>
+
+DynamicFilter::DynamicFilter(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
+ efxoutl=efxoutl_;
+ efxoutr=efxoutr_;
+
+ insertion=insertion_;
+
+ Ppreset=0;
+ filter=NULL;
+ filterpars=new FilterParams(0,64,64);
+ setpreset(Ppreset);
+ cleanup();
+};
+
+DynamicFilter::~DynamicFilter(){
+ delete(filterpars);
+};
+
+
+/*
+ * Apply the effect
+ */
+void DynamicFilter::out(REALTYPE *smpsl,REALTYPE *smpsr){
+ int i;
+/* REALTYPE lfol,lfor;
+ COMPLEXTYPE clfol,clfor,out,tmp;
+*/
+// lfo.effectlfoout(&lfol,&lfor);
+/* lfol*=depth*PI*2.0;lfor*=depth*PI*2.0;
+ clfol.a=cos(lfol+phase)*fb;clfol.b=sin(lfol+phase)*fb;
+ clfor.a=cos(lfor+phase)*fb;clfor.b=sin(lfor+phase)*fb;
+
+ for (i=0;i<SOUND_BUFFER_SIZE;i++){
+ REALTYPE x=((REALTYPE) i)/SOUND_BUFFER_SIZE;
+ REALTYPE x1=1.0-x;
+ //left
+ tmp.a=clfol.a*x+oldclfol.a*x1;
+ tmp.b=clfol.b*x+oldclfol.b*x1;
+
+ out.a=tmp.a*oldl[oldk].a-tmp.b*oldl[oldk].b
+ +(1-fabs(fb))*smpsl[i]*panning;
+ out.b=tmp.a*oldl[oldk].b+tmp.b*oldl[oldk].a;
+ oldl[oldk].a=out.a;
+ oldl[oldk].b=out.b;
+ REALTYPE l=out.a*10.0*(fb+0.1);
+
+ //right
+ tmp.a=clfor.a*x+oldclfor.a*x1;
+ tmp.b=clfor.b*x+oldclfor.b*x1;
+
+ out.a=tmp.a*oldr[oldk].a-tmp.b*oldr[oldk].b
+ +(1-fabs(fb))*smpsr[i]*(1.0-panning);
+ out.b=tmp.a*oldr[oldk].b+tmp.b*oldr[oldk].a;
+ oldr[oldk].a=out.a;
+ oldr[oldk].b=out.b;
+ REALTYPE r=out.a*10.0*(fb+0.1);
+
+
+ if (++oldk>=Pdelay) oldk=0;
+ //LRcross
+ efxoutl[i]=l*(1.0-lrcross)+r*lrcross;
+ efxoutr[i]=r*(1.0-lrcross)+l*lrcross;
+ };
+
+ oldclfol.a=clfol.a;oldclfol.b=clfol.b;
+ oldclfor.a=clfor.a;oldclfor.b=clfor.b;
+*/
+ //Insertion effect
+ if (insertion!=0) {
+ REALTYPE v1,v2;
+ if (volume<0.5) {
+ v1=1.0;
+ v2=volume*2.0;
+ } else {
+ v1=(1.0-volume)*2.0;
+ v2=1.0;
+ };
+ for (i=0;i<SOUND_BUFFER_SIZE;i++){
+ smpsl[i]=smpsl[i]*v1+efxoutl[i]*v2;
+ smpsr[i]=smpsr[i]*v1+efxoutr[i]*v2;
+ };
+ } else {//System effect
+ for (i=0;i<SOUND_BUFFER_SIZE;i++){
+ efxoutl[i]*=2.0*volume;
+ efxoutr[i]*=2.0*volume;
+ smpsl[i]=efxoutl[i];
+ smpsr[i]=efxoutr[i];
+ };
+ };
+
+
+};
+
+/*
+ * Cleanup the effect
+ */
+void DynamicFilter::cleanup(){
+ reinitfilter();
+};
+
+
+/*
+ * Parameter control
+ */
+
+void DynamicFilter::setdepth(unsigned char Pdepth){
+ this->Pdepth=Pdepth;
+ depth=(Pdepth/127.0);
+};
+
+
+void DynamicFilter::setvolume(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){
+ this->Ppanning=Ppanning;
+ panning=Ppanning/127.0;
+};
+
+void DynamicFilter::setlrcross(unsigned char Plrcross){
+ this->Plrcross=Plrcross;
+ lrcross=Plrcross/127.0;
+};
+
+void DynamicFilter::setampsns(unsigned char Pampsns){
+ ampsns=Pampsns/127.0;
+ if (Pampsnsinv!=0) ampsns=-ampsns;
+};
+
+void DynamicFilter::reinitfilter(){
+ if (filter!=NULL) delete(filter);
+ filter=new Filter(filterpars);
+};
+
+void DynamicFilter::setpreset(unsigned char npreset){
+ const int PRESET_SIZE=11;
+ const int NUM_PRESETS=4;
+ unsigned char presets[NUM_PRESETS][PRESET_SIZE]={
+ //DynamicFilter1
+ {127,64,70,0,0,62,60,105,25,0,64},
+ //DynamicFilter2
+ {127,64,73,106,0,101,60,105,17,0,64},
+ //DynamicFilter3
+ {127,64,63,0,1,100,112,105,31,0,42},
+ //DynamicFilter4
+ {93,64,25,0,1,66,101,11,47,0,86}};
+
+ if (npreset>=NUM_PRESETS) npreset=NUM_PRESETS-1;
+ for (int n=0;n<PRESET_SIZE;n++) changepar(n,presets[npreset][n]);
+ if (insertion==0) changepar(0,presets[npreset][0]/2);//lower the volume if this is system effect
+ Ppreset=npreset;
+
+ reinitfilter();
+};
+
+
+void DynamicFilter::changepar(int npar,unsigned char value){
+ switch(npar){
+ case 0: setvolume(value);
+ break;
+ case 1: setpanning(value);
+ break;
+ case 2: lfo.Pfreq=value;
+ lfo.updateparams();
+ break;
+ case 3: lfo.Prandomness=value;
+ lfo.updateparams();
+ break;
+ case 4: lfo.PLFOtype=value;
+ lfo.updateparams();
+ break;
+ case 5: lfo.Pstereo=value;
+ lfo.updateparams();
+ break;
+ case 6: setdepth(value);
+ break;
+ case 7: setampsns(value);
+ break;
+ case 8: setampsns(Pampsns);
+ break;
+ case 9: setlrcross(value);
+ break;
+ };
+};
+
+unsigned char DynamicFilter::getpar(int npar){
+ switch (npar){
+ case 0: return(Pvolume);
+ break;
+ case 1: return(Ppanning);
+ break;
+ case 2: return(lfo.Pfreq);
+ break;
+ case 3: return(lfo.Prandomness);
+ break;
+ case 4: return(lfo.PLFOtype);
+ break;
+ case 5: return(lfo.Pstereo);
+ break;
+ case 6: return(Pdepth);
+ break;
+ case 7: return(Pampsns);
+ break;
+ case 8: return(Pampsnsinv);
+ break;
+ case 9: return(Plrcross);
+ break;
+ default:return (0);
+ };
+
+};
+
+
+
+
diff --git a/src/Effects/DynamicFilter.h b/src/Effects/DynamicFilter.h
@@ -0,0 +1,70 @@
+/*
+ ZynAddSubFX - a software synthesizer
+
+ DynamicFilter.h - "WahWah" effect and others
+ Copyright (C) 2002-2004 Nasca Octavian Paul
+ Author: Nasca Octavian Paul
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License
+ as published by the Free Software Foundation.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License (version 2) for more details.
+
+ You should have received a copy of the GNU General Public License (version 2)
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+*/
+
+#ifndef DYNAMICFILTER_H
+#define DYNAMICFILTER_H
+#include "../globals.h"
+#include "Effect.h"
+#include "EffectLFO.h"
+
+#include "../DSP/Filter.h"
+
+class DynamicFilter:public Effect {
+ public:
+ DynamicFilter(int insetion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_);
+ ~DynamicFilter();
+ void out(REALTYPE *smpsl,REALTYPE *smpsr);
+
+ void setpreset(unsigned char npreset);
+ void changepar(int npar,unsigned char value);
+ unsigned char getpar(int npar);
+ void cleanup();
+
+ private:
+ //Parametrii DynamicFilter
+ EffectLFO lfo;//lfo-ul DynamicFilter
+ unsigned char Pvolume;
+ unsigned char Ppanning;
+ unsigned char Pdepth;//the depth of the lfo of the DynamicFilter
+ unsigned char Plrcross;//left/right crossing
+ unsigned char Pampsns;//how the filter varies according to the input amplitude
+ unsigned char Pampsnsinv;//if the filter freq is lowered if the input amplitude rises
+
+ //Control Parametrii
+ void setvolume(unsigned char Pvolume);
+ void setpanning(unsigned char Ppanning);
+ void setdepth(unsigned char Pdepth);
+ void setlrcross(unsigned char Plrcross);
+ void setampsns(unsigned char Pampsns);
+
+
+ void reinitfilter();
+
+ //Valorile interne
+ int insertion;
+ REALTYPE volume,panning,depth,lrcross,ampsns;
+
+ Filter *filter;
+};
+
+#endif
+
diff --git a/src/Effects/EQ.C b/src/Effects/EQ.C
@@ -29,6 +29,7 @@ EQ::EQ(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
efxoutl=efxoutl_;
efxoutr=efxoutr_;
insertion=insertion_;
+ filterpars=NULL;
for (int i=0;i<MAX_EQ_BANDS;i++){
filter[i].Ptype=0;
diff --git a/src/Effects/Echo.C b/src/Effects/Echo.C
@@ -28,6 +28,7 @@
Echo::Echo(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
efxoutl=efxoutl_;
efxoutr=efxoutr_;
+ filterpars=NULL;
insertion=insertion_;
//default values
diff --git a/src/Effects/Effect.h b/src/Effects/Effect.h
@@ -26,6 +26,7 @@
#include <pthread.h>
#include "../Misc/Util.h"
#include "../globals.h"
+#include "../Params/FilterParams.h"
class Effect{
@@ -45,6 +46,7 @@ class Effect{
REALTYPE outvolume;//this is the volume of effect and is public because need it in system effect. The out volume of such effects are always 1.0, so this setting tells me how is the volume to the Master Output only.
+ FilterParams *filterpars;
protected:
int insertion;//1 for insertion effect
diff --git a/src/Effects/EffectMgr.C b/src/Effects/EffectMgr.C
@@ -35,7 +35,7 @@ EffectMgr::EffectMgr(int insertion_,pthread_mutex_t *mutex_){
efxoutl[i]=0.0;
efxoutr[i]=0.0;
};
-
+ filterpars=NULL;
defaults();
};
@@ -71,9 +71,12 @@ void EffectMgr::changeeffect(int nefx_){
case 5:efx=new Alienwah(insertion,efxoutl,efxoutr);break;
case 6:efx=new Distorsion(insertion,efxoutl,efxoutr);break;
case 7:efx=new EQ(insertion,efxoutl,efxoutr);break;
+ case 8:efx=new DynamicFilter(insertion,efxoutl,efxoutr);break;
//put more effect here
default:efx=NULL;break;//no effect (thru)
};
+
+ if (efx!=NULL) filterpars=efx->filterpars;
};
/*
diff --git a/src/Effects/EffectMgr.h b/src/Effects/EffectMgr.h
@@ -33,8 +33,10 @@
#include "Alienwah.h"
#include "Distorsion.h"
#include "EQ.h"
+#include "DynamicFilter.h"
#include "../Misc/Buffer.h"
#include "../Misc/XMLwrapper.h"
+#include "../Params/FilterParams.h"
class EffectMgr{
@@ -68,12 +70,13 @@ class EffectMgr{
//used by UI
REALTYPE getEQfreqresponse(REALTYPE freq);
+
+ FilterParams *filterpars;
private:
int nefx;
Effect *efx;
pthread_mutex_t *mutex;
-
};
#endif
diff --git a/src/Effects/Makefile b/src/Effects/Makefile
@@ -2,7 +2,7 @@ include ../Makefile.inc
objects=Alienwah.o Chorus.o Echo.o Effect.o \
EffectLFO.o EffectMgr.o Phaser.o Reverb.o \
- Distorsion.o EQ.o
+ Distorsion.o EQ.o DynamicFilter.o
all: $(objects)
diff --git a/src/Effects/Phaser.C b/src/Effects/Phaser.C
@@ -28,6 +28,7 @@
Phaser::Phaser(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
efxoutl=efxoutl_;
efxoutr=efxoutr_;
+ filterpars=NULL;
oldl=NULL;
oldr=NULL;
diff --git a/src/Effects/Reverb.C b/src/Effects/Reverb.C
@@ -32,6 +32,7 @@ Reverb::Reverb(int insertion_,REALTYPE *efxoutl_,REALTYPE *efxoutr_){
efxoutl=efxoutl_;
efxoutr=efxoutr_;
inputbuf=new REALTYPE[SOUND_BUFFER_SIZE];
+ filterpars=NULL;
insertion=insertion_;
//defaults
diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl
@@ -24,6 +24,9 @@ decl {\#include "WidgetPDial.h"} {public
decl {\#include "EnvelopeUI.h"} {public
}
+decl {\#include "FilterUI.h"} {public
+}
+
decl {\#include "../Misc/Util.h"} {public
}
@@ -149,12 +152,15 @@ return(log(freq/20.0)/log(1000.0));} {}
decl {int maxdB;} {}
}
-class EffUI {: {public Fl_Group}
+class EffUI {open : {public Fl_Group}
} {
- Function {EffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} {
- code {eff=NULL;} {}
+ Function {EffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {open
+ } {
+ code {eff=NULL;
+filterwindow=NULL;} {}
}
- Function {~EffUI()} {} {
+ Function {~EffUI()} {open
+ } {
code {effnullwindow->hide();delete (effnullwindow);
effreverbwindow->hide();delete (effreverbwindow);
effechowindow->hide();delete (effechowindow);
@@ -162,7 +168,12 @@ effchoruswindow->hide();delete (effchoruswindow);
effphaserwindow->hide();delete (effphaserwindow);
effalienwahwindow->hide();delete (effalienwahwindow);
effdistorsionwindow->hide();delete (effdistorsionwindow);
-effeqwindow->hide();delete (effeqwindow);} {}
+effeqwindow->hide();delete (effeqwindow);
+
+if (filterwindow!=NULL){
+ filterwindow->hide();
+ delete(filterwindow);
+};} {}
}
Function {make_null_window()} {} {
Fl_Window effnullwindow {
@@ -1089,7 +1100,115 @@ eqgraph->redraw();}
}
}
}
- Function {init(EffectMgr *eff_)} {} {
+ Function {make_dynamicfilter_window()} {open
+ } {
+ Fl_Window effdynamicfilterwindow {
+ xywh {207 390 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1
+ class Fl_Group visible
+ } {
+ Fl_Choice dfp {
+ label Preset
+ callback {eff->changepreset((int)o->value());
+refresh(eff);} open
+ xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 labelcolor 0 align 5 textfont 1 textsize 10 textcolor 7
+ } {
+ menuitem {} {
+ label cucurigu
+ xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ }
+ Fl_Text_Display {} {
+ label DynFilter
+ xywh {245 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 26 align 8
+ }
+ Fl_Dial dfp0 {
+ label Vol
+ callback {eff->seteffectpar(0,(int) o->value());}
+ xywh {10 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp1 {
+ label Pan
+ callback {eff->seteffectpar(1,(int) o->value());}
+ xywh {45 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp2 {
+ label Freq
+ callback {eff->seteffectpar(2,(int) o->value());}
+ xywh {85 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp3 {
+ label Rnd
+ callback {eff->seteffectpar(3,(int) o->value());}
+ xywh {120 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 when 4 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp5 {
+ label {St.df}
+ callback {eff->seteffectpar(5,(int) o->value());}
+ xywh {200 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp6 {
+ label Dpth
+ callback {eff->seteffectpar(6,(int) o->value());}
+ xywh {235 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial dfp9 {
+ label {L/R}
+ callback {eff->seteffectpar(9,(int) o->value());}
+ xywh {345 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 12 maximum 127
+ class WidgetPDial
+ }
+ Fl_Choice dfp4 {
+ label {LFO type}
+ callback {eff->seteffectpar(4,(int) o->value());}
+ tooltip {LFO function} xywh {155 50 40 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 130 textsize 8
+ } {
+ menuitem {} {
+ label SINE
+ xywh {15 15 100 20} labelfont 1 labelsize 10
+ }
+ menuitem {} {
+ label TRI
+ xywh {25 25 100 20} labelfont 1 labelsize 10
+ }
+ }
+ Fl_Button {} {
+ label Filter
+ callback {filterwindow->show();}
+ xywh {115 10 55 25} box PLASTIC_THIN_UP_BOX
+ }
+ }
+ }
+ Function {make_filter_window()} {} {
+ Fl_Window filterwindow {
+ label {Filter Parameters for DynFilter Eff.}
+ xywh {212 170 290 125} type Double visible
+ } {
+ Fl_Group {} {
+ label {DynFilter effect - Filter} open
+ xywh {5 5 275 75} box FLAT_BOX color 50 align 144
+ code0 {o->init(eff->filterpars,NULL,NULL);}
+ class FilterUI
+ } {}
+ Fl_Button {} {
+ label Apply
+ callback {eff->cleanup();} selected
+ tooltip {apply the filter settings} xywh {5 95 70 25} box THIN_UP_BOX
+ }
+ Fl_Button {} {
+ label Close
+ callback {filterwindow->hide();}
+ xywh {210 95 70 25} box THIN_UP_BOX
+ }
+ }
+ }
+ Function {init(EffectMgr *eff_)} {open
+ } {
code {eff=eff_;
make_null_window();
@@ -1100,6 +1219,7 @@ make_phaser_window();
make_alienwah_window();
make_distorsion_window();
make_eq_window();
+make_dynamicfilter_window();
int px=this->parent()->x();
int py=this->parent()->y();
@@ -1112,11 +1232,12 @@ effphaserwindow->position(px,py);
effalienwahwindow->position(px,py);
effdistorsionwindow->position(px,py);
effeqwindow->position(px,py);
-
+effdynamicfilterwindow->position(px,py);
refresh(eff);} {}
}
- Function {refresh(EffectMgr *eff_)} {} {
+ Function {refresh(EffectMgr *eff_)} {open
+ } {
code {eff=eff_;
this->hide();
@@ -1128,8 +1249,15 @@ effphaserwindow->hide();
effalienwahwindow->hide();
effdistorsionwindow->hide();
effeqwindow->hide();
+effdynamicfilterwindow->hide();
eqband=0;
+if (filterwindow!=NULL){
+ filterwindow->hide();
+ delete(filterwindow);
+ filterwindow=NULL;
+};
+
switch(eff->geteffect()){
case 1:
revp->value(eff->getpreset());
@@ -1234,6 +1362,10 @@ switch(eff->geteffect()){
stagescounter->value(eff->geteffectpar(14));
effeqwindow->show();
break;
+ case 8:make_filter_window();
+ effdynamicfilterwindow->show();
+
+ break;
default:effnullwindow->show();
break;
};
diff --git a/src/UI/FilterUI.fl b/src/UI/FilterUI.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0104
+version 1.0105
header_name {.h}
code_name {.cc}
decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {}
@@ -163,8 +163,8 @@ delete (formantparswindow);} {}
}
Function {make_window()} {} {
Fl_Window filterui {
- xywh {365 269 275 75} color 50 labelfont 1
- class Fl_Group visible
+ xywh {365 269 275 75} type Double color 50 labelfont 1 hide
+ class Fl_Group
} {
Fl_Group filterparamswindow {
label {Filter Parameters}
@@ -316,7 +316,7 @@ formantfiltergraph->redraw();}
Function {make_formant_window()} {} {
Fl_Window formantparswindow {
label {Formant Filter Parameters}
- xywh {41 226 710 205} hide
+ xywh {41 226 710 205} type Double hide
} {
Fl_Group {} {
xywh {485 47 105 113} box THIN_UP_BOX
diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl
@@ -363,17 +363,19 @@ delete(panellistitem);} {}
decl {BankUI *bankui;} {}
}
-class MasterUI {} {
- Function {make_window()} {} {
+class MasterUI {open
+} {
+ Function {make_window()} {open
+ } {
Fl_Window masterwindow {
label zynaddsubfx
callback {\#ifdef VSTAUDIOOUT
fl_alert("ZynAddSubFX could not be closed this way, because it's a VST plugin. Please use the host aplication to close it.");
\#else
if (fl_ask("Exit and leave the unsaved data?")) *exitprogram=1;
-\#endif}
- xywh {188 182 390 465} type Double hide
- code0 {setfilelabel(NULL);} non_modal
+\#endif} open
+ xywh {188 182 390 465} type Double
+ code0 {setfilelabel(NULL);} non_modal visible
} {
Fl_Menu_Bar mastermenu {
xywh {0 0 690 25}
@@ -765,12 +767,12 @@ pthread_mutex_unlock(&master->mutex);}
class PartUI
} {}
}
- Fl_Tabs {} {
+ Fl_Tabs {} {open
xywh {0 80 390 160}
} {
Fl_Group {} {
- label {System Effects}
- xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 20 align 25 hide
+ label {System Effects} open selected
+ xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 20 align 25
} {
Fl_Counter syseffnocounter {
label {Sys.Effect No.}
@@ -822,6 +824,10 @@ syseffectui->refresh(master->sysefx[nsyseff]);}
label EQ
xywh {80 80 100 20} labelfont 1 labelsize 11
}
+ menuitem {} {
+ label DynFilter
+ xywh {90 90 100 20} labelfont 1 labelsize 11
+ }
}
Fl_Group syseffectuigroup {
xywh {5 140 380 95} box FLAT_BOX color 48
@@ -847,7 +853,7 @@ swapeffwindow->show();}
}
Fl_Group {} {
label {Insertion Effects}
- xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 20 align 25
+ xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 20 align 25 hide
} {
Fl_Button {} {
label {Swap/Copy...}
@@ -863,7 +869,7 @@ insefftype->value(master->insefx[ninseff]->geteffect());
inseffpart->value(master->Pinsparts[ninseff]+2);
//insefftype->do_callback();
inseffectui->refresh(master->insefx[ninseff]);
-//inseffpart->do_callback();} selected
+//inseffpart->do_callback();}
xywh {5 120 80 20} type Simple labelfont 1 labelsize 11 align 1 minimum 0 maximum 127 step 1 textfont 1
code0 {o->bounds(0,NUM_INS_EFX-1);}
code1 {o->value(ninseff);}
@@ -911,6 +917,10 @@ inseffectui->show();}
label EQ
xywh {90 90 100 20} labelfont 1 labelsize 11
}
+ menuitem {} {
+ label DynFilter
+ xywh {100 100 100 20} labelfont 1 labelsize 11
+ }
}
Fl_Group inseffectuigroup {
xywh {5 140 380 95} box FLAT_BOX color 48
diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl
@@ -592,7 +592,7 @@ insefftype->do_callback();
inseffectui->refresh(part->partefx[ninseff]);
int x=part->Pefxroute[ninseff];
if (x==127) x=1;
-sendtochoice->value(x);} selected
+sendtochoice->value(x);}
xywh {5 110 80 20} type Simple labelfont 1 labelsize 11 align 6 minimum 0 maximum 127 step 1 textfont 1
code0 {o->bounds(0,NUM_PART_EFX-1);}
code1 {o->value(ninseff);}
@@ -638,6 +638,10 @@ inseffectui->refresh(part->partefx[ninseff]);}
label EQ
xywh {100 100 100 20} labelfont 1 labelsize 11
}
+ menuitem {} {
+ label DynFilter
+ xywh {110 110 100 20} labelfont 1 labelsize 11
+ }
}
Fl_Group inseffectuigroup {
xywh {5 5 380 100} box FLAT_BOX color 48