commit 8fc81e1784aebf7e27a503073803ac2ba05925ad
parent 458d1044fdaf970daeb26b0294e92c220247543e
Author: fundamental <mark.d.mccurry@gmail.com>
Date: Sat, 20 Mar 2010 18:38:40 -0400
WIP: Adding in Effect from Rakarrack
Diffstat:
7 files changed, 709 insertions(+), 17 deletions(-)
diff --git a/src/Effects/APhaser.cpp b/src/Effects/APhaser.cpp
@@ -0,0 +1,444 @@
+/*
+
+ APhaser.C - Approximate digital model of an analog JFET phaser.
+ Analog modeling implemented by Ryan Billing aka Transmogrifox.
+ November, 2009
+
+ Credit to:
+ ///////////////////
+ ZynAddSubFX - a software synthesizer
+
+ Phaser.C - Phaser effect
+ Copyright (C) 2002-2005 Nasca Octavian Paul
+ Author: Nasca Octavian Paul
+
+ Modified for rakarrack by Josep Andreu
+
+ DSP analog modeling theory & practice largely influenced by various CCRMA publications, particularly works by Julius O. Smith.
+ ////////////////////
+
+
+ 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 <cmath>
+#include "APhaser.h"
+#include <cstdio>
+#include <iostream>
+using namespace std;
+#define PHASER_LFO_SHAPE 2
+#define ONE_ 0.99999f // To prevent LFO ever reaching 1.0 for filter stability purposes
+#define ZERO_ 0.00001f // Same idea as above.
+
+Analog_Phaser::Analog_Phaser(const int & insertion_, REALTYPE *efxoutl_, REALTYPE *efxoutr_)
+ :Effect(insertion_, efxoutl_, efxoutr_, NULL, 0)
+{
+ lxn1 = NULL;
+ lyn1 = NULL;
+ rxn1 = NULL;
+ ryn1 = NULL;
+
+ offset = new REALTYPE[12]; //model mismatch between JFET devices
+ offset[0] = -0.2509303f;
+ offset[1] = 0.9408924f;
+ offset[2] = 0.998f;
+ offset[3] = -0.3486182f;
+ offset[4] = -0.2762545f;
+ offset[5] = -0.5215785f;
+ offset[6] = 0.2509303f;
+ offset[7] = -0.9408924f;
+ offset[8] = -0.998f;
+ offset[9] = 0.3486182f;
+ offset[10] = 0.2762545f;
+ offset[11] = 0.5215785f;
+
+ barber = 0; //Deactivate barber pole phasing by default
+
+ mis = 1.0f;
+ Rmin = 625.0f; // 2N5457 typical on resistance at Vgs = 0
+ Rmax = 22000.0f; // Resistor parallel to FET
+ Rmx = Rmin/Rmax;
+ Rconst = 1.0f + Rmx; // Handle parallel resistor relationship
+ C = 0.00000005f; // 50 nF
+ CFs = (float) 2.0f*(float)SAMPLE_RATE*C;
+ invperiod = 1.0f / ((float) SOUND_BUFFER_SIZE);
+
+
+ Ppreset = 0;
+ setpreset (Ppreset);
+ cleanup ();
+};
+
+Analog_Phaser::~Analog_Phaser()
+{
+
+ if(lxn1 != NULL)
+ delete[]lxn1;
+
+ if(lyn1 != NULL)
+ delete[]lyn1;
+
+ if(rxn1 != NULL)
+ delete[]rxn1;
+
+ if(ryn1 != NULL)
+ delete[]ryn1;
+
+ if(offset != NULL)
+ delete[]offset;
+};
+
+
+/*
+ * Effect output
+ */
+void Analog_Phaser::out(const Stereo<REALTYPE *> &input)
+{
+ int i, j;
+ float lfol, lfor, lgain, rgain, bl, br, gl, gr, rmod, lmod, d, hpfr, hpfl;
+ lgain = 0.0;
+ rgain = 0.0;
+
+ //initialize hpf
+ hpfl = 0.0;
+ hpfr = 0.0;
+
+ lfo.effectlfoout (&lfol, &lfor);
+ lmod = lfol*width + depth;
+ rmod = lfor*width + depth;
+
+ if(lmod > ONE_)
+ lmod = ONE_;
+ else if(lmod < ZERO_)
+ lmod = ZERO_;
+ if(rmod > ONE_)
+ rmod = ONE_;
+ else if(rmod < ZERO_)
+ rmod = ZERO_;
+
+ if(Phyper != 0)
+ {
+ lmod *= lmod; //Triangle wave squared is approximately sin on bottom, tri on top
+ rmod *= rmod; //Result is exponential sweep more akin to filter in synth with exponential generator circuitry.
+ };
+
+ lmod = sqrtf(1.0f - lmod); //gl,gr is Vp - Vgs. Typical FET drain-source resistance follows constant/[1-sqrt(Vp - Vgs)]
+ rmod = sqrtf(1.0f - rmod);
+
+ rdiff = (rmod - oldrgain) * invperiod;
+ ldiff = (lmod - oldlgain) * invperiod;
+
+ gl = oldlgain;
+ gr = oldrgain;
+
+ oldlgain = lmod;
+ oldrgain = rmod;
+
+ for (i = 0; i < SOUND_BUFFER_SIZE; i++)
+ {
+
+ gl += ldiff; // Linear interpolation between LFO samples
+ gr += rdiff;
+
+ float lxn = input.l()[i];
+ float rxn = input.r()[i];
+
+
+ if (barber) {
+ gl = fmodf((gl + 0.25f) , ONE_);
+ gr = fmodf((gr + 0.25f) , ONE_);
+ };
+
+
+ //cout << lxn << " vs ";
+ //Left channel
+ for (j = 0; j < Pstages; j++)
+ { //Phasing routine
+ mis = 1.0f + offsetpct*offset[j];
+ d = (1.0f + 2.0f*(0.25f + gl)*hpfl*hpfl*distortion) * mis; //This is symmetrical. FET is not, so this deviates slightly, however sym dist. is better sounding than a real FET.
+ Rconst = 1.0f + mis*Rmx;
+ bl = (Rconst - gl )/ (d*Rmin); // This is 1/R. R is being modulated to control filter fc.
+ lgain = (CFs - bl)/(CFs + bl);
+
+ lyn1[j] = lgain * (lxn + lyn1[j]) - lxn1[j];
+ //lyn1[j] += DENORMAL_GUARD;
+ hpfl = lyn1[j] + (1.0f-lgain)*lxn1[j]; //high pass filter -- Distortion depends on the high-pass part of the AP stage.
+
+ lxn1[j] = lxn;
+ lxn = lyn1[j];
+ if (j==1) lxn += fbl; //Insert feedback after first phase stage
+ };
+ //cout << lxn << endl;
+
+ //Right channel
+ for (j = 0; j < Pstages; j++)
+ { //Phasing routine
+ mis = 1.0f + offsetpct*offset[j];
+ d = (1.0f + 2.0f*(0.25f + gr)*hpfr*hpfr*distortion) * mis; // distortion
+ Rconst = 1.0f + mis*Rmx;
+ br = (Rconst - gr )/ (d*Rmin);
+ rgain = (CFs - br)/(CFs + br);
+
+ ryn1[j] = rgain * (rxn + ryn1[j]) - rxn1[j];
+ //ryn1[j] += DENORMAL_GUARD;
+ hpfr = ryn1[j] + (1.0f-rgain)*rxn1[j]; //high pass filter
+
+ rxn1[j] = rxn;
+ rxn = ryn1[j];
+ if (j==1) rxn += fbr; //Insert feedback after first phase stage
+ }
+
+ //cout << fb << ' ' << input.l()[i] - lxn << endl;
+
+ fbl = lxn * fb;
+ fbr = rxn * fb;
+ efxoutl[i] = lxn;
+ efxoutr[i] = rxn;
+
+ }
+
+ if(Poutsub != 0)
+ for(i = 0; i < SOUND_BUFFER_SIZE; i++)
+ {
+ efxoutl[i] *= -1.0f;
+ efxoutr[i] *= -1.0f;
+ };
+};
+
+/*
+ * Cleanup the effect
+ */
+void Analog_Phaser::cleanup()
+{
+ fbl = 0.0;
+ fbr = 0.0;
+ oldlgain = 0.0;
+ oldrgain = 0.0;
+ for(int i = 0; i < Pstages; i++)
+ {
+ lxn1[i] = 0.0;
+
+ lyn1[i] = 0.0;
+
+ rxn1[i] = 0.0;
+
+ ryn1[i] = 0.0;
+
+ };
+};
+
+/*
+ * Parameter control
+ */
+void Analog_Phaser::setwidth(unsigned char Pwidth)
+{
+ this->Pwidth = Pwidth;
+ width = ((float)Pwidth / 127.0f);
+};
+
+
+void Analog_Phaser::setfb(unsigned char Pfb)
+{
+ this->Pfb = Pfb;
+ fb = (float) (Pfb - 64) / 64.2f;
+};
+
+void Analog_Phaser::setvolume(unsigned char Pvolume)
+{
+ cout << "setting volume" << (int) Pvolume << endl;
+ this->Pvolume = Pvolume;
+ // outvolume is needed in calling program
+ outvolume = (float)Pvolume / 127.0f;
+};
+
+void Analog_Phaser::setdistortion(unsigned char Pdistortion)
+{
+ this->Pdistortion = Pdistortion;
+ distortion = (float)Pdistortion / 127.0f;
+};
+
+void Analog_Phaser::setoffset(unsigned char Poffset)
+{
+ this->Poffset = Poffset;
+ offsetpct = (float)Poffset / 127.0f;
+};
+
+void Analog_Phaser::setstages(unsigned char Pstages)
+{
+
+ if(lxn1 != NULL)
+ delete[]lxn1;
+
+ if(lyn1 != NULL)
+ delete[]lyn1;
+
+ if(rxn1 != NULL)
+ delete[]rxn1;
+
+ if(ryn1 != NULL)
+ delete[]ryn1;
+
+
+ if(Pstages >= MAX_PHASER_STAGES)
+ Pstages = MAX_PHASER_STAGES ;
+ this->Pstages = Pstages;
+
+
+ lxn1 = new REALTYPE[Pstages];
+ lyn1 = new REALTYPE[Pstages];
+
+ rxn1 = new REALTYPE[Pstages];
+ ryn1 = new REALTYPE[Pstages];
+
+ cleanup();
+};
+
+void Analog_Phaser::setdepth(unsigned char Pdepth)
+{
+ this->Pdepth = Pdepth;
+ depth = (float)(Pdepth - 64) / 127.0f; //Pdepth input should be 0-127. depth shall range 0-0.5 since we don't need to shift the full spectrum.
+};
+
+
+void Analog_Phaser::setpreset(unsigned char npreset)
+{
+ const int PRESET_SIZE = 13;
+ const int NUM_PRESETS = 6;
+ unsigned char presets[NUM_PRESETS][PRESET_SIZE] = {
+ //Phaser1
+ {64, 20, 14, 0, 1, 64, 110, 40, 4, 10, 0, 64, 1},
+ //Phaser2
+ {64, 20, 14, 5, 1, 64, 110, 40, 6, 10, 0, 70, 1},
+ //Phaser3
+ {64, 20, 9, 0, 0, 64, 40, 40, 8, 10, 0, 60, 0},
+ //Phaser4
+ {64, 20, 14, 10, 0, 64, 110, 80, 7, 10, 1, 45, 1},
+ //Phaser5
+ {25, 20, 240, 10, 0, 64, 25, 16, 8, 100, 0, 25, 0},
+ //Phaser6
+ {64, 20, 1, 10, 1, 64, 110, 40, 12, 10, 0, 70, 1}
+ };
+ if(npreset >= NUM_PRESETS)
+ npreset = NUM_PRESETS - 1;
+ for(int n = 0; n < PRESET_SIZE; n++)
+ changepar(n, presets[npreset][n]);
+ Ppreset = npreset;
+};
+
+
+void Analog_Phaser::changepar(int npar, unsigned char value)
+{
+ switch(npar)
+ {
+ case 0:
+ setvolume(value);
+ break;
+ case 1:
+ setdistortion(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();
+ barber = 0;
+ if (value == 2) barber = 1;
+ break;
+ case 5:
+ lfo.Pstereo = value;
+ lfo.updateparams();
+ break;
+ case 6:
+ setwidth(value);
+ break;
+ case 7:
+ setfb(value);
+ break;
+ case 8:
+ setstages(value);
+ break;
+ case 9:
+ setoffset(value);
+ break;
+ case 10:
+ if (value > 1)
+ value = 1;
+ Poutsub = value;
+ break;
+ case 11:
+ setdepth(value);
+ break;
+ case 12:
+ if (value > 1)
+ value = 1;
+ Phyper = value;
+ break;
+ };
+};
+
+unsigned char Analog_Phaser::getpar(int npar) const
+{
+ switch(npar)
+ {
+ case 0:
+ return(Pvolume);
+ break;
+ case 1:
+ return(Pdistortion);
+ 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(Pwidth);
+ break;
+ case 7:
+ return(Pfb);
+ break;
+ case 8:
+ return(Pstages);
+ break;
+ case 9:
+ return(Poffset);
+ break;
+ case 10:
+ return(Poutsub);
+ break;
+ case 11:
+ return(Pdepth);
+ break;
+ case 12:
+ return(Phyper);
+ break;
+
+ default:
+ return(0);
+ }
+}
diff --git a/src/Effects/APhaser.h b/src/Effects/APhaser.h
@@ -0,0 +1,86 @@
+/*
+ ZynAddSubFX - a software synthesizer
+
+ Phaser.h - Phaser effect
+ Copyright (C) 2002-2005 Nasca Octavian Paul
+ Author: Nasca Octavian Paul
+
+ Modified for rakarrack by Josep Andreu
+
+ Further modified for rakarrack by Ryan Billing (Transmogrifox) to model Analog Phaser behavior 2009
+
+ 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 APHASER_H
+#define APHASER_H
+#include "../globals.h"
+#include "Effect.h"
+#include "EffectLFO.h"
+
+#define MAX_PHASER_STAGES 12
+
+class Analog_Phaser:public Effect
+{
+ public:
+ Analog_Phaser(const int & insertion_, REALTYPE * efxoutl_, REALTYPE * efxoutr_);
+ ~Analog_Phaser();
+ void out(const Stereo<REALTYPE *> &input);
+ void setpreset(unsigned char npreset);
+ void changepar(int npar, unsigned char value);
+ unsigned char getpar(int npar) const;
+ void cleanup();
+ //unsigned char Ppreset;
+
+ private:
+ //Phaser parameters
+ EffectLFO lfo; //Phaser modulator
+ unsigned char Pvolume; //Used in Process.C to set wet/dry mix
+ unsigned char Pdistortion; //Model distortion added by FET element
+ unsigned char Pwidth; //Phaser width (LFO amplitude)
+ unsigned char Pfb; //feedback
+ unsigned char Poffset; //Model mismatch between variable resistors
+ unsigned char Pstages; //Number of first-order All-Pass stages
+ unsigned char Poutsub; //if I wish to subtract the output instead of the adding it
+ unsigned char Phyper; //lfo^2 -- converts tri into hyper-sine
+ unsigned char Pdepth; //Depth of phaser sweep
+ unsigned char Pbarber; //Enable parber pole phasing
+
+
+ //Control parameters
+ void setvolume(unsigned char Pvolume);
+ void setdistortion(unsigned char Pdistortion);
+ void setwidth(unsigned char Pwidth);
+ void setfb(unsigned char Pfb);
+ void setoffset(unsigned char Poffset);
+ void setstages(unsigned char Pstages);
+ void setdepth(unsigned char Pdepth);
+
+ //Internal Variables
+ bool barber; //Barber pole phasing flag
+ REALTYPE distortion, fb, width, offsetpct, fbl, fbr, depth;
+ REALTYPE *lxn1, *lyn1,*rxn1, *ryn1, *offset;
+ REALTYPE oldlgain, oldrgain, rdiff, ldiff, invperiod;
+
+ float mis;
+ float Rmin; // 2N5457 typical on resistance at Vgs = 0
+ float Rmax; // Resistor parallel to FET
+ float Rmx; // Rmin/Rmax to avoid division in loop
+ float Rconst; // Handle parallel resistor relationship
+ float C; // Capacitor
+ float CFs; // A constant derived from capacitor and resistor relationships
+};
+
+#endif
diff --git a/src/Effects/CMakeLists.txt b/src/Effects/CMakeLists.txt
@@ -10,6 +10,7 @@ set(zynaddsubfx_effect_SRCS
EQ.cpp
Phaser.cpp
Reverb.cpp
+ APhaser.cpp
)
add_library(zynaddsubfx_effect STATIC
diff --git a/src/Effects/EffectMgr.cpp b/src/Effects/EffectMgr.cpp
@@ -21,6 +21,8 @@
*/
#include "EffectMgr.h"
+#include <iostream>
+using namespace std;
EffectMgr::EffectMgr(int insertion_, pthread_mutex_t *mutex_)
:insertion(insertion_),
@@ -101,6 +103,9 @@ void EffectMgr::changeeffect(int nefx_)
case 8:
efx = new DynamicFilter(insertion, efxoutl, efxoutr);
break;
+ case 9:
+ efx = new Analog_Phaser(insertion, efxoutl, efxoutr);
+ break;
//put more effect here
default:
efx = NULL;
diff --git a/src/Effects/EffectMgr.h b/src/Effects/EffectMgr.h
@@ -33,11 +33,11 @@
#include "Distorsion.h"
#include "EQ.h"
#include "DynamicFilter.h"
+#include "APhaser.h"
#include "../Misc/XMLwrapper.h"
#include "../Params/FilterParams.h"
#include "../Params/Presets.h"
-
/**Effect manager, an interface betwen the program and effects*/
class EffectMgr:public Presets
{
diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0109
+version 1.0300
header_name {.h}
code_name {.cc}
decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {}
@@ -167,6 +167,7 @@ effreverbwindow->hide();//delete (effreverbwindow);
effechowindow->hide();//delete (effechowindow);
effchoruswindow->hide();//delete (effchoruswindow);
effphaserwindow->hide();//delete (effphaserwindow);
+effaphaserwindow->hide();//delete (effaphaserwindow);
effalienwahwindow->hide();//delete (effalienwahwindow);
effdistorsionwindow->hide();//delete (effdistorsionwindow);
effeqwindow->hide();//delete (effeqwindow);
@@ -179,7 +180,7 @@ if (filterwindow!=NULL){
}
Function {make_null_window()} {} {
Fl_Window effnullwindow {
- xywh {287 379 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {216 539 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Text_Display {} {
@@ -188,11 +189,10 @@ if (filterwindow!=NULL){
}
}
}
- Function {make_reverb_window()} {open
- } {
- Fl_Window effreverbwindow {open
- xywh {343 337 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1
- class Fl_Group visible
+ Function {make_reverb_window()} {} {
+ Fl_Window effreverbwindow {
+ xywh {343 337 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ class Fl_Group
} {
Fl_Text_Display {} {
label {Reverb }
@@ -344,7 +344,7 @@ if (eff->geteffectpar(10)==2) revp12->activate();
callback {int x=64;
if (Fl::event_button1()) x=(int)o->value();
else o->value(x);
-eff->seteffectpar(11,x);} selected
+eff->seteffectpar(11,x);}
tooltip RoomSize xywh {200 10 25 25} box ROUND_UP_BOX labelfont 1 labelsize 8 align 8 minimum 1 maximum 127 step 1
class WidgetPDial
}
@@ -704,6 +704,133 @@ refresh(eff);}
}
}
}
+ Function {make_analog_phaser_window()} {} {
+ Fl_Window effaphaserwindow {
+ xywh {292 251 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ code0 {putchar('a'); putchar('b'); putchar('c');}
+ class Fl_Group
+ } {
+ Fl_Choice aphaserp {
+ label Preset
+ callback {eff->changepreset((int)o->value());
+refresh(eff);}
+ xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7
+ } {
+ MenuItem {} {
+ label {Phaser 1}
+ xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ MenuItem {} {
+ label {Phaser 2}
+ xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ MenuItem {} {
+ label {Phaser 3}
+ xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ MenuItem {} {
+ label {Phaser 4}
+ xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ MenuItem {} {
+ label {Phaser 5}
+ xywh {70 70 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ MenuItem {} {
+ label {Phaser 6}
+ xywh {80 80 100 20} labelfont 1 labelsize 10 labelcolor 7
+ }
+ }
+ Fl_Text_Display {} {
+ label APhaser
+ xywh {260 10 10 20} box NO_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 8
+ }
+ Fl_Dial aphaser0 {
+ label Vol
+ callback {eff->seteffectpar(0,(int) o->value());}
+ tooltip {Effect Volume} xywh {10 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial aphaser1 {
+ label dist
+ callback {eff->seteffectpar(1,(int) o->value());}
+ tooltip Distortion xywh {45 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial aphaser2 {
+ label Freq
+ callback {eff->seteffectpar(2,(int) o->value());}
+ tooltip {LFO frequency} xywh {85 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial aphaser3 {
+ label {?}
+ callback {eff->seteffectpar(3,(int) o->value());}
+ tooltip {????????} xywh {120 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 when 4 maximum 127
+ class WidgetPDial
+ }
+ Fl_Choice aphaser4 {
+ 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_Dial aphaser5 {
+ label {St.df}
+ callback {eff->seteffectpar(5,(int) o->value());}
+ tooltip {Left/Right Channel Phase Shift} xywh {200 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial aphaser6 {
+ label Dpth
+ callback {eff->seteffectpar(6,(int) o->value());}
+ tooltip {LFO Depth} xywh {235 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Dial aphaser7 {
+ label Fb
+ callback {eff->seteffectpar(7,(int) o->value());}
+ tooltip Feedback xywh {270 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Counter aphaser8 {
+ label Stages
+ callback {eff->seteffectpar(8,(int) o->value());}
+ xywh {305 55 35 15} type Simple labelfont 1 labelsize 11 minimum 0 maximum 127 step 1
+ code0 {o->range(1,MAX_PHASER_STAGES);}
+ }
+ Fl_Dial aphaser9 {
+ label offset
+ callback {eff->seteffectpar(9,(int) o->value());}
+ tooltip offset xywh {345 40 30 30} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127
+ class WidgetPDial
+ }
+ Fl_Check_Button aphaser10 {
+ label Substract
+ callback {eff->seteffectpar(10,(int) o->value());}
+ tooltip {inverts output} xywh {185 10 74 20} box THIN_UP_BOX down_box DOWN_BOX color 230 labelfont 1 labelsize 10
+ }
+ Fl_Dial aphaser11 {
+ label Depth
+ callback {eff->seteffectpar(11,(int) o->value());}
+ xywh {155 10 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 maximum 127
+ class WidgetPDial
+ }
+ Fl_Check_Button aphaser12 {
+ label {hyp.}
+ callback {eff->seteffectpar(12,(int) o->value());}
+ tooltip hyper xywh {100 10 55 15} down_box DOWN_BOX
+ }
+ }
+ }
Function {make_alienwah_window()} {} {
Fl_Window effalienwahwindow {
xywh {538 250 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
@@ -1224,7 +1351,8 @@ refresh(eff);}
}
}
}
- Function {make_filter_window()} {} {
+ Function {make_filter_window()} {selected
+ } {
Fl_Window filterwindow {
label {Filter Parameters for DynFilter Eff.}
xywh {212 170 290 110} type Double hide
@@ -1251,6 +1379,7 @@ make_reverb_window();
make_echo_window();
make_chorus_window();
make_phaser_window();
+make_analog_phaser_window();
make_alienwah_window();
make_distorsion_window();
make_eq_window();
@@ -1264,6 +1393,7 @@ effreverbwindow->position(px,py);
effechowindow->position(px,py);
effchoruswindow->position(px,py);
effphaserwindow->position(px,py);
+effaphaserwindow->position(px,py);
effalienwahwindow->position(px,py);
effdistorsionwindow->position(px,py);
effeqwindow->position(px,py);
@@ -1281,6 +1411,7 @@ effreverbwindow->hide();
effechowindow->hide();
effchoruswindow->hide();
effphaserwindow->hide();
+effaphaserwindow->hide();
effalienwahwindow->hide();
effdistorsionwindow->hide();
effeqwindow->hide();
@@ -1416,6 +1547,24 @@ switch(eff->geteffect()){
effdynamicfilterwindow->show();
break;
+ case 9://make_analog_phaser_window();
+ aphaserp->value(eff->getpreset());
+ aphaser0->value(eff->geteffectpar(0));
+ aphaser1->value(eff->geteffectpar(1));
+ aphaser2->value(eff->geteffectpar(2));
+ aphaser3->value(eff->geteffectpar(3));
+ aphaser4->value(eff->geteffectpar(4));
+ aphaser5->value(eff->geteffectpar(5));
+ aphaser6->value(eff->geteffectpar(6));
+ aphaser7->value(eff->geteffectpar(7));
+ aphaser8->value(eff->geteffectpar(8));
+ aphaser9->value(eff->geteffectpar(9));
+ aphaser10->value(eff->geteffectpar(10));
+ aphaser11->value(eff->geteffectpar(11));
+ aphaser12->value(eff->geteffectpar(12));
+ putchar('?');
+ effaphaserwindow->show();
+ break;
default:effnullwindow->show();
break;
};
diff --git a/src/UI/MasterUI.fl b/src/UI/MasterUI.fl
@@ -1,5 +1,5 @@
# data file for the Fltk User Interface Designer (fluid)
-version 1.0107
+version 1.0300
header_name {.h}
code_name {.cc}
decl {//Copyright (c) 2002-2009 Nasca Octavian Paul} {}
@@ -414,8 +414,7 @@ panellistitemgroup->redraw();} {}
}
class MasterUI {} {
- Function {make_window()} {selected
- } {
+ Function {make_window()} {} {
Fl_Window masterwindow {
label zynaddsubfx
callback {\#ifdef VSTAUDIOOUT
@@ -426,7 +425,7 @@ if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL)) {
*exitprogram=1;
};
\#endif}
- xywh {31 206 390 465} type Double hide xclass zynaddsubfx
+ xywh {31 206 390 465} type Double xclass zynaddsubfx visible
} {
Fl_Menu_Bar mastermenu {
xywh {-5 0 690 25}
@@ -689,8 +688,8 @@ pthread_mutex_unlock(&master->mutex);}
xywh {0 80 390 160}
} {
Fl_Group {} {
- label {System Effects} open
- xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25
+ label {System Effects}
+ xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 hide
} {
Fl_Counter syseffnocounter {
label {Sys.Effect No.}
@@ -746,6 +745,10 @@ syseffectui->refresh(master->sysefx[nsyseff]);}
label DynFilter
xywh {90 90 100 20} labelfont 1 labelsize 10
}
+ MenuItem {} {
+ label APhaser
+ xywh {0 0 36 21}
+ }
}
Fl_Group syseffectuigroup {
xywh {5 140 380 95} box FLAT_BOX color 48
@@ -776,7 +779,7 @@ pthread_mutex_unlock(&master->mutex);}
}
Fl_Group {} {
label {Insertion Effects}
- xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25 hide
+ xywh {0 100 390 140} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 15 align 25
} {
Fl_Counter inseffnocounter {
label {Ins.Effect No.}
@@ -845,6 +848,10 @@ inseffectui->show();}
label DynFilter
xywh {100 100 100 20} labelfont 1 labelsize 10
}
+ MenuItem {} {
+ label APhaser selected
+ xywh {0 0 36 21}
+ }
}
Fl_Group inseffectuigroup {
xywh {5 140 380 95} box FLAT_BOX color 48