commit f35c87dceceacaa9a640024cfbe78877147be2e3
parent 84ddf9c0132b6be8d685f01c6444edd8bc49bb0f
Author: paulnasca <paulnasca>
Date: Mon, 16 Aug 2004 21:18:23 +0000
*** empty log message ***
Diffstat:
9 files changed, 418 insertions(+), 184 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -687,6 +687,9 @@
- Merge partial partea de Copy in clipboard
15 Aug 2004 - Corectata o eroare in main.c la pitch bend
- Scos Swap/Copy la efecte si la PartUI si vechiul Copy/Paste de la ADnote voice
- - Merge clipboardul la Oscil, Resonance, Filter si partial la ADsynth,SUBSynth si PADsynth (am de facut actualizarea la Filter si SUB/PADsynth)
+ - Merge clipboardul la Oscil, Resonance, Filter si partial la ADsynth,SUBSynth si PADsynth
+16 Aug 2004 - Corectata inca o eroare la pitch bend (aratata de Krzysztof Korpiela)
+ - Adaugat refresh si la Filtru si paste la ADnote, SUBnote si PADsynth sunt complete
+
\ No newline at end of file
diff --git a/src/Params/Presets.C b/src/Params/Presets.C
@@ -56,6 +56,7 @@ void Presets::pasteclipboard(){
};
if (xml->enterbranch(type)==0) return;
+ defaults();
getfromXML(xml);
xml->exitbranch();
diff --git a/src/Params/Presets.h b/src/Params/Presets.h
@@ -42,7 +42,7 @@ class Presets{
private:
virtual void add2XML(XMLwrapper *xml)=0;
virtual void getfromXML(XMLwrapper *xml)=0;
-
+ virtual void defaults()=0;
};
#endif
diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl
@@ -750,9 +750,9 @@ if (oscedit!=NULL) {
decl {Master *master;} {}
}
-class ADnoteUI {open : {public PresetsUI_}
+class ADnoteUI {: {public PresetsUI_}
} {
- Function {make_window()} {open private
+ Function {make_window()} {private
} {
Fl_Window ADnoteGlobalParameters {
label {ADsynth Global Parameters of the Instrument}
@@ -762,7 +762,7 @@ class ADnoteUI {open : {public PresetsUI_}
label FREQUENCY
xywh {5 255 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
} {
- Fl_Group {} {
+ Fl_Group freqenv {
label {ADSynth Global - Frequency Envelope} open
xywh {10 295 205 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->GlobalPar.FreqEnvelope);}
@@ -790,7 +790,7 @@ pars->GlobalPar.PCoarseDetune = k+
code3 {o->lstep(10);}
}
Fl_Group freqlfo {
- label {Frequency LFO} open selected
+ label {Frequency LFO} open
xywh {215 295 230 70} box FLAT_BOX color 47 align 144
code0 {o->init(pars->GlobalPar.FreqLfo);}
class LFOUI
@@ -867,8 +867,8 @@ detunevalueoutput->do_callback();} open
code0 {o->value(pars->GlobalPar.PPunchVelocitySensing);}
class WidgetPDial
}
- Fl_Group {} {
- label {ADSynth Global - Amplitude Envelope} open
+ Fl_Group ampenv {
+ label {ADSynth Global - Amplitude Envelope} open selected
xywh {10 75 205 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->GlobalPar.AmpEnvelope);}
class EnvelopeUI
@@ -890,7 +890,7 @@ detunevalueoutput->do_callback();} open
label FILTER
xywh {245 5 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
} {
- Fl_Group {} {
+ Fl_Group filterenv {
label {ADSynth Global - Filter Envelope} open
xywh {250 110 275 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->GlobalPar.FilterEnvelope);}
@@ -902,7 +902,7 @@ detunevalueoutput->do_callback();} open
code0 {o->init(pars->GlobalPar.FilterLfo);}
class LFOUI
} {}
- Fl_Group {} {
+ Fl_Group filterui {
label {ADsynth Global - Filter} open
xywh {250 35 275 75} box FLAT_BOX color 50 align 144
code0 {o->init(pars->GlobalPar.GlobalFilter,&pars->GlobalPar.PFilterVelocityScale,&pars->GlobalPar.PFilterVelocityScaleFunction);}
@@ -1065,6 +1065,11 @@ amplfo->refresh();
freqlfo->refresh();
filterlfo->refresh();
+ampenv->refresh();
+freqenv->refresh();
+filterenv->refresh();
+filterui->refresh();
+
for (int i=0;i<NUM_VOICES;i++) voicelistitem[i]->refreshlist();
resui->refresh();
diff --git a/src/UI/EnvelopeUI.fl b/src/UI/EnvelopeUI.fl
@@ -192,13 +192,18 @@ return(1);} {}
}
}
-class EnvelopeUI {open : {public Fl_Group}
+class EnvelopeUI {: {public Fl_Group}
} {
Function {EnvelopeUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} {
- code {env=NULL;} {}
+ code {env=NULL;
+freemodeeditwindow=NULL;
+envADSR=NULL;
+envASR=NULL;
+envADSRfilter=NULL;
+envASRbw=NULL;
+envfree=NULL;} {}
}
- Function {~EnvelopeUI()} {open
- } {
+ Function {~EnvelopeUI()} {} {
code {envwindow->hide();
hide();
freemodeeditwindow->hide();
@@ -208,7 +213,7 @@ delete (freemodeeditwindow);} {}
Function {make_freemode_edit_window()} {} {
Fl_Window freemodeeditwindow {
label Envelope
- xywh {132 455 575 180} type Double hide
+ xywh {19 242 575 180} type Double hide
} {
Fl_Box freeedit {
label Envelope
@@ -278,14 +283,14 @@ freeedit->lastpoint=-1;
freeedit->redraw();}
tooltip {Enable or disable the freemode} xywh {10 155 95 25} box PLASTIC_UP_BOX
}
- Fl_Check_Button {} {
+ Fl_Check_Button forcedreleasecheck {
label frcR
callback {env->Pforcedrelease=(int)o->value();}
tooltip {Forced Relase} xywh {410 165 40 15} down_box DOWN_BOX labelsize 11
code0 {o->value(env->Pforcedrelease);}
code1 {if (env->Pfreemode==0) o->hide();}
}
- Fl_Dial {} {
+ Fl_Dial envstretchdial {
label {Str.}
callback {env->Penvstretch=(int)o->value();}
tooltip {Envelope stretch (on lower notes make the envelope longer)} xywh {380 155 25 25} box ROUND_UP_BOX labelsize 11 align 4 maximum 127 step 1
@@ -298,13 +303,12 @@ freeedit->redraw();}
callback {freemodeeditwindow->hide();}
xywh {510 155 60 25} box THIN_UP_BOX
}
- Fl_Check_Button {} {
+ Fl_Check_Button linearenvelopecheck {
label L
callback {env->Plinearenvelope=(int)o->value();}
tooltip {Linear Envelope} xywh {410 151 30 15} down_box DOWN_BOX labelsize 11
code0 {o->value(env->Plinearenvelope);}
- code1 {if (env->Pfreemode==0) o->hide();}
- code2 {if (env->Envmode>2) o->hide();}
+ code1 {if ((env->Pfreemode==0)||(env->Envmode>2)) o->hide();}
}
Fl_Counter sustaincounter {
label Sust
@@ -320,14 +324,14 @@ envfree->redraw();}
}
Function {make_ADSR_window()} {} {
Fl_Window envADSR {
- xywh {440 55 205 70} type Double color 50 labelfont 1
- class Fl_Group visible
+ xywh {108 336 205 70} type Double color 50 labelfont 1 hide
+ class Fl_Group
} {
Fl_Group {} {
label {Amplitude Envelope}
xywh {0 0 205 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 11 align 17
} {
- Fl_Dial {} {
+ Fl_Dial e1adt {
label {A.dt}
callback {env->PA_dt=(int)o->value();
freeedit->redraw();}
@@ -335,7 +339,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e1ddt {
label {D.dt}
callback {env->PD_dt=(int)o->value();
freeedit->redraw();}
@@ -343,7 +347,7 @@ freeedit->redraw();}
code0 {o->value(env->PD_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e1rdt {
label {R.dt}
callback {env->PR_dt=(int)o->value();
freeedit->redraw();}
@@ -351,7 +355,7 @@ freeedit->redraw();}
code0 {o->value(env->PR_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e1sval {
label {S.val}
callback {env->PS_val=(int)o->value();
freeedit->redraw();}
@@ -359,13 +363,13 @@ freeedit->redraw();}
code0 {o->value(env->PS_val);}
class WidgetPDial
}
- Fl_Check_Button {} {
+ Fl_Check_Button e1forcedrelease {
label frcR
callback {env->Pforcedrelease=(int)o->value();}
tooltip {Forced Relase} xywh {180 35 20 15} down_box DOWN_BOX labelsize 11 align 6
code0 {o->value(env->Pforcedrelease);}
}
- Fl_Dial {} {
+ Fl_Dial e1envstretch {
label Stretch
callback {env->Penvstretch=(int)o->value();}
tooltip {Envelope stretch (on lower notes makes the envelope longer)} xywh {145 25 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
@@ -377,7 +381,7 @@ freeedit->redraw();}
callback {freemodeeditwindow->show();}
tooltip {Envelope window} xywh {160 5 40 15} box PLASTIC_UP_BOX labelfont 1 labelsize 10
}
- Fl_Check_Button {} {
+ Fl_Check_Button e1linearenvelope {
label L
callback {env->Plinearenvelope=(int)o->value();}
tooltip {The evelope is linear} xywh {180 20 15 15} down_box DOWN_BOX labelsize 11 align 4
@@ -388,14 +392,14 @@ freeedit->redraw();}
}
Function {make_ASR_window()} {} {
Fl_Window envASR {
- xywh {433 172 210 70} type Double hide
+ xywh {71 320 210 70} type Double hide
class Fl_Group
} {
Fl_Group {} {
label {Frequency Envelope}
xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 11 align 17
} {
- Fl_Dial {} {
+ Fl_Dial e2aval {
label {A.val}
callback {env->PA_val=(int)o->value();
freeedit->redraw();}
@@ -403,7 +407,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e2adt {
label {A.dt}
callback {env->PA_dt=(int)o->value();
freeedit->redraw();}
@@ -411,7 +415,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e2rval {
label {R.val}
callback {env->PR_val=(int)o->value();
freeedit->redraw();}
@@ -419,7 +423,7 @@ freeedit->redraw();}
code0 {o->value(env->PR_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e2rdt {
label {R.dt}
callback {env->PR_dt=(int)o->value();
freeedit->redraw();}
@@ -427,14 +431,14 @@ freeedit->redraw();}
code0 {o->value(env->PR_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e2envstretch {
label Stretch
callback {env->Penvstretch=(int)o->value();}
tooltip {Envelope stretch (on lower notes makes the envelope longer)} xywh {145 25 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
code0 {o->value(env->Penvstretch);}
class WidgetPDial
}
- Fl_Check_Button {} {
+ Fl_Check_Button e2forcedrelease {
label frcR
callback {env->Pforcedrelease=(int)o->value();}
tooltip {Forced release} xywh {180 25 15 25} down_box DOWN_BOX labelsize 11 align 6
@@ -450,14 +454,14 @@ freeedit->redraw();}
}
Function {make_ADSRfilter_window()} {} {
Fl_Window envADSRfilter {
- xywh {406 296 275 70} type Double color 50 labelfont 1 hide
+ xywh {87 143 275 70} type Double color 50 labelfont 1 hide
class Fl_Group
} {
Fl_Group {} {
label {Filter Envelope}
xywh {0 0 275 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 11 align 17
} {
- Fl_Dial {} {
+ Fl_Dial e3aval {
label {A.val}
callback {env->PA_val=(int)o->value();
freeedit->redraw();}
@@ -465,7 +469,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3adt {
label {A.dt}
callback {env->PA_dt=(int)o->value();
freeedit->redraw();}
@@ -473,7 +477,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3dval {
label {D.val}
callback {env->PD_val=(int)o->value();
freeedit->redraw();}
@@ -481,7 +485,7 @@ freeedit->redraw();}
code0 {o->value(env->PD_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3ddt {
label {D.dt}
callback {env->PD_dt=(int)o->value();
freeedit->redraw();}
@@ -489,7 +493,7 @@ freeedit->redraw();}
code0 {o->value(env->PD_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3rdt {
label {R.dt}
callback {env->PR_dt=(int)o->value();
freeedit->redraw();}
@@ -497,7 +501,7 @@ freeedit->redraw();}
code0 {o->value(env->PR_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3rval {
label {R.val}
callback {env->PR_val=(int)o->value();
freeedit->redraw();}
@@ -505,14 +509,14 @@ freeedit->redraw();}
code0 {o->value(env->PR_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e3envstretch {
label Stretch
callback {env->Penvstretch=(int)o->value();}
tooltip {Envelope stretch (on lower notes makes the envelope longer)} xywh {215 25 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
code0 {o->value(env->Penvstretch);}
class WidgetPDial
}
- Fl_Check_Button {} {
+ Fl_Check_Button e3forcedrelease {
label frcR
callback {env->Pforcedrelease=(int)o->value();}
tooltip {Forced Relase} xywh {250 30 15 20} down_box DOWN_BOX labelsize 11 align 6
@@ -527,15 +531,15 @@ freeedit->redraw();}
}
}
Function {make_ASRbw_window()} {} {
- Fl_Window envASRbw {selected
- xywh {431 279 210 70} type Double hide
+ Fl_Window envASRbw {
+ xywh {224 539 210 70} type Double hide
class Fl_Group
} {
Fl_Group {} {
label {BandWidth Envelope}
xywh {0 0 210 70} box PLASTIC_UP_BOX color 223 labeltype ENGRAVED_LABEL labelsize 11 align 17
} {
- Fl_Dial {} {
+ Fl_Dial e4aval {
label {A.val}
callback {env->PA_val=(int)o->value();
freeedit->redraw();}
@@ -543,7 +547,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e4adt {
label {A.dt}
callback {env->PA_dt=(int)o->value();
freeedit->redraw();}
@@ -551,7 +555,7 @@ freeedit->redraw();}
code0 {o->value(env->PA_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e4rval {
label {R.val}
callback {env->PR_val=(int)o->value();
freeedit->redraw();}
@@ -559,7 +563,7 @@ freeedit->redraw();}
code0 {o->value(env->PR_val);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e4rdt {
label {R.dt}
callback {env->PR_dt=(int)o->value();
freeedit->redraw();}
@@ -567,14 +571,14 @@ freeedit->redraw();}
code0 {o->value(env->PR_dt);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial e4envstretch {
label Stretch
callback {env->Penvstretch=(int)o->value();}
tooltip {Envelope stretch (on lower notes makes the envelope longer)} xywh {145 25 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
code0 {o->value(env->Penvstretch);}
class WidgetPDial
}
- Fl_Check_Button {} {
+ Fl_Check_Button e4forcedrelease {
label frcR
callback {env->Pforcedrelease=(int)o->value();}
tooltip {Forced release} xywh {180 25 15 25} down_box DOWN_BOX labelsize 11 align 6
@@ -590,7 +594,7 @@ freeedit->redraw();}
}
Function {make_free_window()} {} {
Fl_Window envfree {
- xywh {289 383 205 70} type Double color 50 labelfont 1 hide resizable
+ xywh {373 413 205 70} type Double color 50 labelfont 1 hide resizable
class Fl_Group
} {
Fl_Group envfreegroup {
@@ -614,50 +618,29 @@ freeedit->redraw();}
}
Function {init(EnvelopeParams *env_)} {} {
code {env=env_;
+make_ADSR_window();
+make_ASR_window();
+make_ADSRfilter_window();
+make_ASRbw_window();
+make_free_window();
-if (env->Pfreemode==0){
- switch(env->Envmode){
- case(1):
- case(2):
- make_ADSR_window();
- envwindow=envADSR;
- break;
- case(3):
- make_ASR_window();
- envwindow=envASR;
- break;
- case(4):
- make_ADSRfilter_window();
- envwindow=envADSRfilter;
- break;
- case(5):
- make_ASRbw_window();
- envwindow=envASRbw;
- break;
- default:
- break;
- };
-}else{
- make_free_window();
- envwindow=envfree;
- if (env->Envmode==3) envfreegroup->label("Frequency Envelope");
- if (env->Envmode==4) envfreegroup->label("Filter Envelope");
- if (env->Envmode==5) envfreegroup->label("Bandwidth Envelope");
-};
-end();
+make_freemode_edit_window();
-envwindow->resize(this->x(),this->y(),this->w(),this->h());
+envwindow=NULL;
+if (env->Envmode==3) envfreegroup->label("Frequency Envelope");
+if (env->Envmode==4) envfreegroup->label("Filter Envelope");
+if (env->Envmode==5) envfreegroup->label("Bandwidth Envelope");
-make_freemode_edit_window();
freemodeeditwindow->label(this->label());
-if (env->Pfreemode!=0){
- freeeditsmall->setpair(freeedit);
- freeedit->setpair(freeeditsmall);
-};} {}
+
+freeeditsmall->setpair(freeedit);
+freeedit->setpair(freeeditsmall);
+
+
+refresh();} {}
}
- Function {reinit()} {open
- } {
+ Function {reinit()} {} {
code {if (env->Pfreemode!=0){
int answer=fl_ask("Disable the free mode of the Envelope?");
if (env->Pfreemode!=0) freemodebutton->value(1);
@@ -673,17 +656,17 @@ int winx=freemodeeditwindow->x();
int winy=freemodeeditwindow->y();
freemodeeditwindow->hide();
-delete (freemodeeditwindow);
+
envwindow->hide();
Fl_Group *par=envwindow->parent();
par->hide();
-par->remove(envwindow);
-delete (envwindow);
+//par->remove(envwindow);
+//delete (envwindow);
-init(env);
-par->add(envwindow);
-par->end();
+refresh();
+//par->add(envwindow);
+//par->end();
envwindow->show();
par->redraw();
@@ -695,6 +678,107 @@ freemodeeditwindow->show();
if (env->Pfreemode!=0) freemodebutton->value(1);
else freemodebutton->value(0);} {}
}
+ Function {refresh()} {} {
+ code {freemodebutton->value(env->Pfreemode);
+
+sustaincounter->value(env->Penvsustain);
+if (env->Pfreemode==0) sustaincounter->hide();
+ else sustaincounter->show();
+sustaincounter->maximum(env->Penvpoints-2);
+
+envstretchdial->value(env->Penvstretch);
+if (env->Pfreemode==0) envstretchdial->hide();
+ else envstretchdial->show();
+
+linearenvelopecheck->value(env->Plinearenvelope);
+if ((env->Pfreemode==0)||(env->Envmode>2)) linearenvelopecheck->hide();
+ else linearenvelopecheck->show();
+
+forcedreleasecheck->value(env->Pforcedrelease);
+if (env->Pfreemode==0) forcedreleasecheck->hide();
+
+freeedit->redraw();
+
+
+if (env->Pfreemode==0){
+ switch(env->Envmode){
+ case(1):
+ case(2):
+ e1adt->value(env->PA_dt);
+ e1ddt->value(env->PD_dt);
+ e1sval->value(env->PS_val);
+ e1rdt->value(env->PR_dt);
+ e1envstretch->value(env->Penvstretch);
+ e1linearenvelope->value(env->Plinearenvelope);
+ e1forcedrelease->value(env->Pforcedrelease);
+ break;
+ case(3):
+ e2aval->value(env->PA_val);
+ e2adt->value(env->PA_dt);
+ e2rdt->value(env->PR_dt);
+ e2rval->value(env->PR_val);
+ e2envstretch->value(env->Penvstretch);
+ e2forcedrelease->value(env->Pforcedrelease);
+ break;
+ case(4):
+ e3aval->value(env->PA_val);
+ e3adt->value(env->PA_dt);
+ e3dval->value(env->PD_val);
+ e3ddt->value(env->PD_dt);
+ e3rdt->value(env->PR_dt);
+ e3rval->value(env->PR_val);
+ e3envstretch->value(env->Penvstretch);
+ e3forcedrelease->value(env->Pforcedrelease);
+ break;
+ case(5):
+ e4aval->value(env->PA_val);
+ e4adt->value(env->PA_dt);
+ e4rdt->value(env->PR_dt);
+ e4rval->value(env->PR_val);
+ e4envstretch->value(env->Penvstretch);
+ e4forcedrelease->value(env->Pforcedrelease);
+ break;
+ default:
+ break;
+ };
+}else{
+ envfree->redraw();
+};
+
+
+envADSR->hide();
+envASR->hide();
+envADSRfilter->hide();
+envASRbw->hide();
+envfree->hide();
+
+if (env->Pfreemode==0){
+ switch(env->Envmode){
+ case(1):
+ case(2):
+ envwindow=envADSR;
+ break;
+ case(3):
+ envwindow=envASR;
+ break;
+ case(4):
+ envwindow=envADSRfilter;
+ break;
+ case(5):
+ envwindow=envASRbw;
+ break;
+ default:
+ break;
+ };
+}else{
+ envwindow=envfree;
+};
+
+envwindow->resize(this->x(),this->y(),this->w(),this->h());
+
+envwindow->show();} {selected
+ }
+ }
decl {EnvelopeParams *env;} {}
decl {Fl_Group *envwindow;} {}
}
diff --git a/src/UI/FilterUI.fl b/src/UI/FilterUI.fl
@@ -149,7 +149,7 @@ for (i=1;i<lx;i++){
decl {REALTYPE *graphpoints;} {}
}
-class FilterUI {: {public Fl_Group,PresetsUI_}
+class FilterUI {open : {public Fl_Group,PresetsUI_}
} {
Function {FilterUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} {
code {pars=NULL;
@@ -508,7 +508,8 @@ if (nseqpos<pars->Psequencesize) vowel_counter->activate();
vowel_counter->value(pars->Psequence[nseqpos].nvowel);} {}
}
- Function {refresh()} {} {
+ Function {refresh()} {open
+ } {
code {update_formant_window();
formantfiltergraph->redraw();
@@ -520,18 +521,6 @@ filtertype->value(pars->Pcategory);
cfreqdial->value(pars->Pfreq);
qdial->value(pars->Pq);
-/*
-if (velsnsamp!=NULL) {
- velsnsamp=&pars->PFilterVelocityScale;
- vsnsadial->value(pars->PFilterVelocityScale);
-};
-if (velsns!=NULL) {
- velsns=&pars->PFilterVelocityScaleFunction;
- vsnsdial->value(*velsns);
-};
-
-*/
-
freqtrdial->value(pars->Pfreqtrack);
gaindial->value(pars->Pgain);
diff --git a/src/UI/PADnoteUI.fl b/src/UI/PADnoteUI.fl
@@ -214,7 +214,7 @@ class PADnoteUI {: {public PresetsUI_}
} {
Function {make_window()} {} {
Fl_Window padnotewindow {
- label {PAD synth Parameters} selected
+ label {PAD synth Parameters}
xywh {76 165 535 450} type Double hide
} {
Fl_Tabs {} {
@@ -230,7 +230,7 @@ class PADnoteUI {: {public PresetsUI_}
xywh {5 30 90 260} box ENGRAVED_BOX
code0 {if (pars->Pmode!=0) o->deactivate();}
} {
- Fl_Dial {} {
+ Fl_Dial hpbasepar1 {
label Width
callback {pars->Php.base.par1=(int) o->value();
hprofile->redraw();
@@ -239,7 +239,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Php.base.par1);}
class WidgetPDial
}
- Fl_Choice {} {
+ Fl_Choice hpbasetype {
label {Base Type}
callback {pars->Php.base.type=o->value();
hprofile->redraw();
@@ -260,8 +260,8 @@ cbwidget->do_callback();}
xywh {35 35 100 20} labelfont 1 labelsize 10
}
}
- Fl_Dial {} {
- label FreqMult
+ Fl_Dial hpfreqmult {
+ label FreqMlt
callback {pars->Php.freqmult=(int) o->value();
hprofile->redraw();
cbwidget->do_callback();}
@@ -269,7 +269,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Php.freqmult);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial hpmpar1 {
label Str
callback {pars->Php.modulator.par1=(int) o->value();
hprofile->redraw();
@@ -278,7 +278,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Php.modulator.par1);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial hpmfreq {
label SFreq
callback {pars->Php.modulator.freq=(int) o->value();
hprofile->redraw();
@@ -290,7 +290,7 @@ cbwidget->do_callback();}
Fl_Group {} {
xywh {10 160 80 105} box BORDER_BOX
} {
- Fl_Choice {} {
+ Fl_Choice hpamptype {
label AmpMultiplier
callback {pars->Php.amp.type=o->value();
hprofile->redraw();
@@ -315,7 +315,7 @@ cbwidget->do_callback();}
xywh {75 75 100 20} labelfont 1 labelsize 10
}
}
- Fl_Choice {} {
+ Fl_Choice hpampmode {
label AmpMode
callback {pars->Php.amp.mode=o->value();
hprofile->redraw();
@@ -340,7 +340,7 @@ cbwidget->do_callback();}
xywh {90 90 100 20} labelfont 1 labelsize 10
}
}
- Fl_Dial {} {
+ Fl_Dial hpamppar1 {
label Par1
callback {pars->Php.amp.par1=(int) o->value();
hprofile->redraw();
@@ -349,7 +349,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Php.amp.par1);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial hpamppar2 {
label Par2
callback {pars->Php.amp.par2=(int) o->value();
hprofile->redraw();
@@ -359,7 +359,7 @@ cbwidget->do_callback();}
class WidgetPDial
}
}
- Fl_Check_Button {} {
+ Fl_Check_Button hpautoscale {
label autoscale
callback {pars->Php.autoscale=(int) o->value();
hprofile->redraw();
@@ -367,7 +367,7 @@ cbwidget->do_callback();}
xywh {10 270 60 15} down_box DOWN_BOX labelsize 10
code0 {o->value(pars->Php.autoscale);}
}
- Fl_Choice {} {
+ Fl_Choice hponehalf {
callback {pars->Php.onehalf=o->value();
hprofile->redraw();
cbwidget->do_callback();}
@@ -387,7 +387,7 @@ cbwidget->do_callback();}
xywh {35 35 100 20} labelfont 1 labelsize 10
}
}
- Fl_Dial {} {
+ Fl_Dial hpwidth {
label Size
callback {pars->Php.width=(int) o->value();
hprofile->redraw();
@@ -440,7 +440,7 @@ cbwidget->do_callback();}
Fl_Group {} {
xywh {315 295 215 45} box ENGRAVED_BOX
} {
- Fl_Choice {} {
+ Fl_Choice hrpostype {
label OvertonesPosition
callback {pars->Phrpos.type=o->value();
overtonepos->redraw();
@@ -477,7 +477,7 @@ cbwidget->do_callback();}
xywh {120 120 100 20} labelfont 1 labelsize 12
}
}
- Fl_Dial {} {
+ Fl_Dial hrpospar1 {
label Par1
callback {pars->Phrpos.par1=(int) o->value();
overtonepos->redraw();
@@ -486,7 +486,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Phrpos.par1);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial hrpospar2 {
label Par2
callback {pars->Phrpos.par2=(int) o->value();
overtonepos->redraw();
@@ -495,7 +495,7 @@ cbwidget->do_callback();}
code0 {o->value(pars->Phrpos.par2);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial hrpospar3 {
label ForceH
callback {pars->Phrpos.par3=(int) o->value();
overtonepos->redraw();
@@ -505,12 +505,13 @@ cbwidget->do_callback();}
class WidgetPDial
}
}
- Fl_Choice {} {
+ Fl_Choice bwscale {
label {Bandwidth Scale}
callback {pars->Pbwscale=(int) o->value();
cbwidget->do_callback();}
xywh {120 305 80 20} down_box BORDER_BOX labelsize 10 align 5 textsize 12
code0 {o->value(pars->Pbwscale);}
+ code1 {if (pars->Pmode!=0) o->deactivate();}
} {
menuitem {} {
label Normal
@@ -550,7 +551,7 @@ cbwidget->do_callback();}
code0 {PADnoteOvertonePosition *opui=new PADnoteOvertonePosition(o->x(),o->y(),o->w(),o->h(),"");}
code1 {opui->init(pars,master);}
} {}
- Fl_Choice {} {
+ Fl_Choice qsamplesize {
label {Sample Size}
callback {pars->Pquality.samplesize=(int) o->value();
cbwidget->do_callback();}
@@ -586,7 +587,7 @@ cbwidget->do_callback();}
xywh {205 205 100 20} labelfont 1 labelsize 12
}
}
- Fl_Choice {} {
+ Fl_Choice qsmpoct {
label {smp/oct}
callback {pars->Pquality.smpoct=(int) o->value();
cbwidget->do_callback();}
@@ -622,7 +623,7 @@ cbwidget->do_callback();}
xywh {50 50 100 20} labelfont 1 labelsize 12
}
}
- Fl_Choice {} {
+ Fl_Choice qoct {
label {no.oct}
callback {pars->Pquality.oct=(int) o->value();
cbwidget->do_callback();}
@@ -650,7 +651,7 @@ cbwidget->do_callback();}
xywh {50 50 100 20} labelfont 1 labelsize 12
}
}
- Fl_Choice {} {
+ Fl_Choice qbasenote {
label base
callback {pars->Pquality.basenote=(int) o->value();
cbwidget->do_callback();}
@@ -704,7 +705,7 @@ cbwidget->do_callback();}
label {Profile of One Harmonic (Frequency Distribution)}
xywh {160 25 315 20}
}
- Fl_Choice {} {
+ Fl_Choice spectrummode {
label {Spectrum Mode}
callback {pars->Pmode=(int) o->value();
@@ -714,12 +715,14 @@ if (pars->Pmode==0){
bwcents->activate();
hprofile->activate();
hprofile->color(54);
+ bwscale->activate();
} else {
bwprofilegroup->deactivate();
bwdial->deactivate();
bwcents->deactivate();
hprofile->deactivate();
hprofile->color(48);
+ bwscale->activate();
};
cbwidget->do_callback();}
@@ -748,13 +751,13 @@ cbwidget->do_callback();}
label FREQUENCY
xywh {5 275 525 115} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
} {
- Fl_Group {} {
+ Fl_Group freqenv {
label {PADSynth - Frequency Envelope} open
xywh {10 315 205 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->FreqEnvelope);}
class EnvelopeUI
} {}
- Fl_Counter {} {
+ Fl_Counter octave {
label Octave
callback {int k=(int) o->value();
if (k<0) k+=16;
@@ -765,7 +768,7 @@ pars->PCoarseDetune = k*1024+
code1 {if (k>=8) k-=16;}
code2 {o->value(k);}
}
- Fl_Counter {} {
+ Fl_Counter coarsedet {
label {Coarse det.}
callback {int k=(int) o->value();
if (k<0) k+=1024;
@@ -777,13 +780,13 @@ pars->PCoarseDetune = k+
code2 {o->value(k);}
code3 {o->lstep(10);}
}
- Fl_Group {} {
+ Fl_Group freqlfo {
label {Frequency LFO} open
xywh {215 315 230 70} box FLAT_BOX color 47 align 144
code0 {o->init(pars->FreqLfo);}
class LFOUI
} {}
- Fl_Slider {} {
+ Fl_Slider detune {
callback {pars->PDetune=(int)o->value()+8192;
detunevalueoutput->do_callback();}
tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1
@@ -795,7 +798,7 @@ detunevalueoutput->do_callback();}
xywh {12 295 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10
code0 {o->value(getdetune(pars->PDetuneType,0,pars->PDetune));}
}
- Fl_Choice {} {
+ Fl_Choice detunetype {
label {Detune Type}
callback {pars->PDetuneType=(int) o->value()+1;
detunevalueoutput->do_callback();} open
@@ -803,7 +806,7 @@ detunevalueoutput->do_callback();} open
code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");}
code1 {o->value(pars->PDetuneType-1);}
} {}
- Fl_Check_Button {} {
+ Fl_Check_Button hz440 {
label 440Hz
callback {int x=(int) o->value();
pars->Pfixedfreq=x;
@@ -825,66 +828,66 @@ if (x==0) fixedfreqetdial->deactivate();
label AMPLITUDE
xywh {5 25 240 250} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
} {
- Fl_Value_Slider {} {
+ Fl_Value_Slider volume {
label Vol
callback {pars->PVolume=(int)o->value();}
tooltip Volume xywh {10 50 160 15} type {Horz Knob} box FLAT_BOX labelsize 12 align 8 maximum 127 step 1
code0 {o->value(pars->PVolume);}
}
- Fl_Value_Slider {} {
+ Fl_Value_Slider vsns {
label {V.Sns}
callback {pars->PAmpVelocityScaleFunction=(int) o->value();}
tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box FLAT_BOX labelsize 12 align 8 maximum 127 step 1
code0 {o->value(pars->PAmpVelocityScaleFunction);}
}
- Fl_Dial {} {
+ Fl_Dial pan {
label Pan
callback {pars->PPanning=(int) o->value();}
tooltip {Panning (leftmost is Random)} xywh {210 45 30 30} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
code0 {o->value(pars->PPanning);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial pstr {
label {P.Str.}
callback {pars->PPunchStrength=(int) o->value();}
tooltip {Punch Strength} xywh {125 247 25 25} box ROUND_UP_BOX labelsize 11 align 1 maximum 127 step 1
code0 {o->value(pars->PPunchStrength);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial pt {
label {P.t.}
callback {pars->PPunchTime=(int) o->value();}
tooltip {Punch Time (duration)} xywh {155 247 25 25} box ROUND_UP_BOX labelsize 11 align 1 maximum 127 step 1
code0 {o->value(pars->PPunchTime);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial pstc {
label {P.Stc.}
callback {pars->PPunchStretch=(int) o->value();}
tooltip {Punch Stretch} xywh {185 247 25 25} box ROUND_UP_BOX labelsize 11 align 1 maximum 127 step 1
code0 {o->value(pars->PPunchStretch);}
class WidgetPDial
}
- Fl_Dial {} {
+ Fl_Dial pvel {
label {P.Vel.}
callback {pars->PPunchVelocitySensing=(int) o->value();}
tooltip {Punch Velocity Sensing} xywh {215 247 25 25} box ROUND_UP_BOX labelsize 11 align 1 maximum 127 step 1
code0 {o->value(pars->PPunchVelocitySensing);}
class WidgetPDial
}
- Fl_Group {} {
+ Fl_Group ampenv {
label {PADSynth - Amplitude Envelope} open
xywh {10 95 205 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->AmpEnvelope);}
class EnvelopeUI
} {}
- Fl_Group {} {
+ Fl_Group amplfo {
label {Amplitude LFO} open
xywh {10 165 230 70} box FLAT_BOX color 47 align 144
code0 {o->init(pars->AmpLfo);}
class LFOUI
} {}
- Fl_Check_Button {} {
+ Fl_Check_Button stereo {
label Stereo
callback {pars->PStereo=(int) o->value();
hprofile->redraw();}
@@ -896,19 +899,19 @@ hprofile->redraw();}
label FILTER
xywh {245 25 285 250} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
} {
- Fl_Group {} {
+ Fl_Group filterenv {
label {PADSynth - Filter Envelope} open
xywh {250 130 275 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->FilterEnvelope);}
class EnvelopeUI
} {}
- Fl_Group {} {
+ Fl_Group filterlfo {
label {Filter LFO} open
xywh {250 200 230 70} box FLAT_BOX color 47 align 144
code0 {o->init(pars->FilterLfo);}
class LFOUI
} {}
- Fl_Group {} {
+ Fl_Group filterui {
label {PADsynth - Filter} open
xywh {250 55 275 75} box FLAT_BOX color 50 align 144
code0 {o->init(pars->GlobalFilter,&pars->PFilterVelocityScale,&pars->PFilterVelocityScaleFunction);}
@@ -948,6 +951,100 @@ oscui=NULL;
resui=new ResonanceUI(pars->resonance);
make_window();} {}
}
+ Function {refresh()} {} {
+ code {volume->value(pars->PVolume);
+vsns->value(pars->PAmpVelocityScaleFunction);
+pan->value(pars->PPanning);
+
+stereo->value(pars->PStereo);
+
+
+pstr->value(pars->PPunchStrength);
+pt->value(pars->PPunchTime);
+pstc->value(pars->PPunchStretch);
+pvel->value(pars->PPunchVelocitySensing);
+
+detunevalueoutput->value(getdetune(pars->PDetuneType,0,pars->PDetune));
+detune->value(pars->PDetune-8192);
+
+int k=pars->PCoarseDetune/1024;if (k>=8) k-=16;
+octave->value(k);
+
+detunetype->value(pars->PDetuneType-1);
+k=pars->PCoarseDetune%1024;if (k>=512) k-=1024;
+coarsedet->value(k);
+
+hz440->value(pars->Pfixedfreq);
+fixedfreqetdial->value(pars->PfixedfreqET);
+
+amplfo->refresh();
+freqlfo->refresh();
+filterlfo->refresh();
+
+ampenv->refresh();
+freqenv->refresh();
+filterenv->refresh();
+filterui->refresh();
+
+
+/* harmonic structure parametrs */
+
+resui->refresh();
+if (oscui!=NULL) oscui->refresh();
+
+hpbasetype->value(pars->Php.base.type);
+hpbasepar1->value(pars->Php.base.par1);
+hpfreqmult->value(pars->Php.freqmult);
+
+hpmpar1->value(pars->Php.modulator.par1);
+hpmfreq->value(pars->Php.modulator.freq);
+hpwidth->value(pars->Php.width);
+
+hponehalf->value(pars->Php.onehalf);
+hpamptype->value(pars->Php.amp.type);
+hpampmode->value(pars->Php.amp.mode);
+hpamppar1->value(pars->Php.amp.par1);
+hpamppar2->value(pars->Php.amp.par2);
+hpautoscale->value(pars->Php.autoscale);
+
+bwdial->value(pars->Pbandwidth);
+if (pars->Pmode==0){
+ bwprofilegroup->activate();
+ bwdial->activate();
+ bwcents->activate();
+ hprofile->activate();
+ hprofile->color(54);
+ bwscale->activate();
+} else {
+ bwprofilegroup->deactivate();
+ bwdial->deactivate();
+ bwcents->deactivate();
+ hprofile->deactivate();
+ hprofile->color(48);
+ bwscale->activate();
+};
+
+spectrummode->value(pars->Pmode);
+
+qbasenote->value(pars->Pquality.basenote);
+qsmpoct->value(pars->Pquality.smpoct);
+qoct->value(pars->Pquality.oct);
+qsamplesize->value(pars->Pquality.samplesize);
+
+hrpostype->value(pars->Phrpos.type);
+hrpospar1->value(pars->Phrpos.par1);
+hrpospar2->value(pars->Phrpos.par2);
+hrpospar3->value(pars->Phrpos.par3);
+
+hprofile->redraw();
+overtonepos->redraw();
+
+osc->redraw();
+pars->applyparameters(true);
+applybutton->color(FL_GRAY);
+applybutton->parent()->redraw();} {selected
+ }
+ }
Function {~PADnoteUI()} {} {
code {delete(oscui);
delete(resui);
diff --git a/src/UI/SUBnoteUI.fl b/src/UI/SUBnoteUI.fl
@@ -89,6 +89,12 @@ make_window();
harmonic->show();
end();} {}
}
+ Function {refresh()} {} {
+ code {mag->value(127-pars->Phmag[n]);
+if (pars->Phmag[n]==0) mag->selection_color(0);
+bw->value(127-pars->Phrelbw[n]);} {selected
+ }
+ }
Function {~SUBnoteharmonic()} {} {
code {harmonic->hide();
hide();
@@ -102,8 +108,8 @@ class SUBnoteUI {: {public PresetsUI_}
} {
Function {make_window()} {} {
Fl_Window SUBparameters {
- label {SUBsynth Parameters} selected
- xywh {4 225 735 390} type Double hide
+ label {SUBsynth Parameters}
+ xywh {26 214 735 390} type Double hide
} {
Fl_Scroll {} {
xywh {5 140 435 245} type HORIZONTAL box THIN_UP_BOX
@@ -122,26 +128,26 @@ class SUBnoteUI {: {public PresetsUI_}
label AMPLITUDE
xywh {5 5 215 135} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17
} {
- Fl_Value_Slider {} {
+ Fl_Value_Slider vol {
label Vol
callback {pars->PVolume=(int)o->value();}
tooltip Volume xywh {10 25 140 15} type {Horz Knob} box FLAT_BOX labelsize 12 align 8 maximum 127 step 1
code0 {o->value(pars->PVolume);}
}
- Fl_Value_Slider {} {
+ Fl_Value_Slider vsns {
label {V.Sns}
callback {pars->PAmpVelocityScaleFunction=(int) o->value();}
tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box FLAT_BOX labelsize 12 align 8 maximum 127 step 1
code0 {o->value(pars->PAmpVelocityScaleFunction);}
}
- Fl_Dial {} {
+ Fl_Dial pan {
label Pan
callback {pars->PPanning=(int) o->value();}
tooltip {Panning (leftmost is Random)} xywh {185 20 30 30} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
code0 {o->value(pars->PPanning);}
class WidgetPDial
}
- Fl_Group {} {
+ Fl_Group ampenv {
label {SUBsynth - Amplitude Envelope} open
xywh {10 65 205 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->AmpEnvelope);}
@@ -151,13 +157,13 @@ class SUBnoteUI {: {public PresetsUI_}
Fl_Group {} {
xywh {495 325 235 35} box THIN_UP_FRAME
} {
- Fl_Counter {} {
+ Fl_Counter filterstages {
label {Filter Stages}
callback {pars->Pnumstages=(int) o->value();}
tooltip {How many times the noise is filtered} xywh {515 340 45 15} type Simple labelfont 1 labelsize 10 align 1 minimum 1 maximum 5 step 1 textsize 10
code0 {o->value(pars->Pnumstages);}
}
- Fl_Choice {} {
+ Fl_Choice magtype {
label {Mag.Type}
callback {pars->Phmagtype=(int) o->value();}
xywh {585 340 65 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 12
@@ -184,7 +190,7 @@ class SUBnoteUI {: {public PresetsUI_}
xywh {60 60 100 20} labelfont 1 labelsize 12
}
}
- Fl_Choice {} {
+ Fl_Choice start {
label Start
callback {pars->Pstart=(int) o->value();} open
xywh {670 340 50 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 12
@@ -215,7 +221,7 @@ class SUBnoteUI {: {public PresetsUI_}
code1 {if (pars->PFreqEnvelopeEnabled==0) o->deactivate();}
class EnvelopeUI
} {}
- Fl_Check_Button {} {
+ Fl_Check_Button freqee {
label Enabled
callback {pars->PFreqEnvelopeEnabled=o->value();
if (o->value()==0) freqenvelopegroup->deactivate();
@@ -225,30 +231,28 @@ freqsettingsui->redraw();}
xywh {445 68 55 15} down_box DOWN_BOX labelfont 1 labelsize 10
code0 {o->value(pars->PFreqEnvelopeEnabled);}
}
- Fl_Counter {} {
+ Fl_Counter octave {
label Octave
callback {int k=(int) o->value();
if (k<0) k+=16;
pars->PCoarseDetune = k*1024+
pars->PCoarseDetune%1024;}
tooltip Octave xywh {670 50 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 12
- code0 {int k=pars->PCoarseDetune/1024;}
- code1 {if (k>=8) k-=16;}
+ code0 {int k=pars->PCoarseDetune/1024;if (k>=8) k-=16;}
code2 {o->value(k);}
}
- Fl_Counter {} {
+ Fl_Counter coarsedet {
label {Coarse Det.}
callback {int k=(int) o->value();
if (k<0) k+=1024;
pars->PCoarseDetune = k+
(pars->PCoarseDetune/1024)*1024;}
tooltip {Coarse Detune} xywh {655 115 60 20} labelsize 11 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 12
- code0 {int k=pars->PCoarseDetune%1024;}
- code1 {if (k>=512) k-=1024;}
+ code0 {int k=pars->PCoarseDetune%1024;if (k>=512) k-=1024;}
code2 {o->value(k);}
code3 {o->lstep(10);}
}
- Fl_Slider {} {
+ Fl_Slider detune {
callback {pars->PDetune=(int)o->value()+8192;
detunevalueoutput->do_callback();}
tooltip {Fine Detune (cents)} xywh {495 25 230 15} type {Horz Knob} box FLAT_BOX minimum -8192 maximum 8191 step 1
@@ -260,7 +264,7 @@ detunevalueoutput->do_callback();}
xywh {448 25 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10
code0 {o->value(getdetune(pars->PDetuneType,0,pars->PDetune));}
}
- Fl_Check_Button {} {
+ Fl_Check_Button hz440 {
label 440Hz
callback {int x=(int) o->value();
pars->Pfixedfreq=x;
@@ -277,7 +281,7 @@ if (x==0) fixedfreqetdial->deactivate();
code1 {if (pars->Pfixedfreq==0) o->deactivate();}
class WidgetPDial
}
- Fl_Choice {} {
+ Fl_Choice detunetype {
label {Detune Type}
callback {pars->PDetuneType=(int) o->value()+1;
detunevalueoutput->do_callback();} open
@@ -286,7 +290,7 @@ detunevalueoutput->do_callback();} open
code1 {o->value(pars->PDetuneType-1);}
} {}
}
- Fl_Check_Button {} {
+ Fl_Check_Button stereo {
label Stereo
callback {pars->Pstereo=(int) o->value();}
xywh {440 325 55 35} box THIN_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 10
@@ -316,7 +320,7 @@ SUBparameters->redraw();}
code1 {if (pars->PBandWidthEnvelopeEnabled==0) o->deactivate();}
class EnvelopeUI
} {}
- Fl_Check_Button {} {
+ Fl_Check_Button bwee {
label Enabled
callback {pars->PBandWidthEnvelopeEnabled=o->value();
if (o->value()==0) bandwidthenvelopegroup->deactivate();
@@ -326,13 +330,13 @@ bandwidthsettingsui->redraw();}
xywh {225 67 55 15} down_box DOWN_BOX labelfont 1 labelsize 10
code0 {o->value(pars->PBandWidthEnvelopeEnabled);}
}
- Fl_Value_Slider {} {
+ Fl_Value_Slider bandwidth {
label {Band Width}
callback {pars->Pbandwidth=(int) o->value();}
xywh {225 40 115 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 maximum 127 step 1
code0 {o->value(pars->Pbandwidth);}
}
- Fl_Value_Slider {} {
+ Fl_Value_Slider bwidthscale {
label {B.Width Scale}
callback {pars->Pbwscale=(int) o->value()+64;}
tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box FLAT_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1
@@ -344,20 +348,20 @@ bandwidthsettingsui->redraw();}
xywh {440 140 290 185} box THIN_UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 16 align 17
code0 {if (pars->PGlobalFilterEnabled==0) o->deactivate();}
} {
- Fl_Group {} {
+ Fl_Group filterenv {
label {SUBsynth - Filter Envelope} open
xywh {445 250 275 70} box FLAT_BOX color 51 align 144
code0 {o->init(pars->GlobalFilterEnvelope);}
class EnvelopeUI
} {}
- Fl_Group {} {
+ Fl_Group filterui {
label {SUBsynthl - Filter} open
xywh {445 170 275 75} box FLAT_BOX color 50 align 144
code0 {o->init(pars->GlobalFilter,&pars->PGlobalFilterVelocityScale,&pars->PGlobalFilterVelocityScaleFunction);}
class FilterUI
} {}
}
- Fl_Check_Button {} {
+ Fl_Check_Button filtere {
label Enabled
callback {pars->PGlobalFilterEnabled=o->value();
if (o->value()==0) globalfiltergroup->deactivate();
@@ -379,6 +383,58 @@ globalfiltergroup->redraw();}
}
}
}
+ Function {refresh()} {} {
+ code {for (int i=0;i<MAX_SUB_HARMONICS;i++) h[i]->refresh();
+vol->value(pars->PVolume);
+vsns->value(pars->PAmpVelocityScaleFunction);
+pan->value(pars->PPanning);
+
+
+bandwidth->value(pars->Pbandwidth);
+bwidthscale->value(pars->Pbwscale-64);
+bwee->value(pars->PBandWidthEnvelopeEnabled);
+if (pars->PBandWidthEnvelopeEnabled==0) bandwidthenvelopegroup->deactivate();
+ else bandwidthenvelopegroup->activate();
+bwee->show();
+bandwidthsettingsui->redraw();
+
+detunevalueoutput->value(getdetune(pars->PDetuneType,0,pars->PDetune));
+freqee->value(pars->PFreqEnvelopeEnabled);
+if (pars->PFreqEnvelopeEnabled==0) freqenvelopegroup->deactivate();
+ else freqenvelopegroup->activate();
+freqee->show();
+freqsettingsui->redraw();
+
+detune->value(pars->PDetune-8192);
+hz440->value(pars->Pfixedfreq);
+
+fixedfreqetdial->value(pars->PfixedfreqET);
+
+int k=pars->PCoarseDetune/1024;if (k>=8) k-=16;
+octave->value(k);
+
+detunetype->value(pars->PDetuneType-1);
+
+k=pars->PCoarseDetune%1024;if (k>=512) k-=1024;
+coarsedet->value(k);
+
+filtere->value(pars->PGlobalFilterEnabled);
+if (pars->PGlobalFilterEnabled==0) globalfiltergroup->deactivate();
+ else globalfiltergroup->activate();
+filtere->show();
+globalfiltergroup->redraw();
+
+stereo->value(pars->Pstereo);
+filterstages->value(pars->Pnumstages);
+magtype->value(pars->Phmagtype);
+start->value(pars->Pstart);
+
+ampenv->refresh();
+bandwidthenvelopegroup->refresh();
+freqenvelopegroup->refresh();
+filterui->refresh();
+filterenv->refresh();} {}
+ }
Function {SUBnoteUI(SUBnoteParameters *parameters)} {} {
code {pars=parameters;
make_window();} {}
diff --git a/src/main.C b/src/main.C
@@ -620,8 +620,7 @@ long VSTSynth::processEvents(VstEvents *events){
case 0xB: cntl=Midi->getcontroller(data[1]&0x7f);
vmaster->SetController(cmdchan,cntl,data[2]&0x7f);
break;
-// case 0xE: vmaster->SetController(cmdchan,C_pitchwheel,data[1]&0x7f+(data[2]&0x7f)*128);
- case 0xE: vmaster->SetController(cmdchan,C_pitchwheel,data[1]+data[2]*128);
+ case 0xE: vmaster->SetController(cmdchan,C_pitchwheel,data[1]+data[2]*(long int) 128-8192);
break;
};
pthread_mutex_unlock(&vmaster->mutex);