commit 1a0c92c010a49df455f2a1a81fb10e25d34bb36c
parent 00a0998353e2354bb5954e5f7c30456539a4d4e2
Author: paulnasca <paulnasca>
Date: Sun, 6 Jun 2004 19:40:37 +0000
*** empty log message ***
Diffstat:
5 files changed, 35 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -566,5 +566,7 @@
- Merge partial playerul
26 Mai 2004 - Playerul merge bine cu un canal midi (rezolvata problema cu timing-ul)
03 Iun 2004 - Adaugata partea de play speed la interfata
+06 Iun 2004 - Adaugata functia sigmoid la distorsionare
+
diff --git a/src/Effects/Distorsion.C b/src/Effects/Distorsion.C
@@ -239,7 +239,7 @@ void Distorsion::changepar(int npar,unsigned char value){
break;
case 4: Plevel=value;
break;
- case 5: if (value>12) value=12;//this must be increased if more distorsion types are added
+ case 5: if (value>13) value=13;//this must be increased if more distorsion types are added
Ptype=value;
break;
case 6: if (value>1) value=1;
diff --git a/src/Misc/Util.C b/src/Misc/Util.C
@@ -195,6 +195,17 @@ void waveshapesmps(int n,REALTYPE *smps,unsigned char type,unsigned char drive){
else smps[i]=-2.0;
};
break;
+ case 14:ws=pow(ws,5.0)*80.0+0.0001;//sigmoid
+ if (ws>10.0) tmpv=0.5;
+ else tmpv=0.5-1.0/(exp(ws)+1.0);
+ for (i=0;i<n;i++) {
+ REALTYPE tmp=smps[i]*ws;
+ if (tmp<-10.0) tmp=-10.0;
+ else if (tmp>10.0) tmp=10.0;
+ tmp=0.5-1.0/(exp(tmp)+1.0);
+ smps[i]=tmp/tmpv;
+ };
+ break;
//update to Distorsion::changepar (Ptype max) if there is added more waveshapings functions
};
diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl
@@ -507,7 +507,7 @@ pthread_mutex_unlock(&master->mutex);
oscildisplaygroup->redraw();
basefuncdisplaygroup->redraw();
-oldosc->redraw();} selected
+oldosc->redraw();}
tooltip {Use this Oscillator as base function} xywh {15 310 85 20} box THIN_UP_BOX labelfont 1 labelsize 12
}
Fl_Button {} {
@@ -549,7 +549,7 @@ oldosc->redraw();}
callback {oscil->Pwaveshapingfunction=(int) o->value();
basefuncdisplaygroup->redraw();
oscildisplaygroup->redraw();
-oldosc->redraw();}
+oldosc->redraw();} open
tooltip {Waveshaping function} xywh {175 310 55 20} down_box BORDER_BOX labelsize 10 textsize 10
code0 {o->value(oscil->Pwaveshapingfunction);}
} {
@@ -609,6 +609,10 @@ oldosc->redraw();}
label Pow2
xywh {95 95 100 20} labelfont 1 labelsize 10
}
+ menuitem {} {
+ label Sgm selected
+ xywh {90 90 100 20} labelfont 1 labelsize 10
+ }
}
Fl_Value_Slider {} {
callback {oscil->Pwaveshaping=(int)o->value()+64;
@@ -704,7 +708,7 @@ oldosc->redraw();}
code0 {for (int i=0;i<MAX_AD_HARMONICS;i++){h[i]=new ADOscilharmonic(0,0,20,o->h(),"");h[i]->init(oscil,i,oscildisplaygroup,oldosc,master);}}
} {}
}
- Fl_Group basefuncmodulation {open
+ Fl_Group basefuncmodulation {
xywh {615 278 115 25} box ENGRAVED_BOX
code0 {if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodulation->deactivate();}
} {
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.0104
+version 1.0200
header_name {.h}
code_name {.cc}
decl {//Copyright (c) 2002-2004 Nasca Octavian Paul} {}
@@ -161,7 +161,7 @@ delete (effwindow);} {}
}
Function {make_null_window()} {} {
Fl_Window effnullwindow {
- xywh {287 379 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {287 379 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Text_Display {} {
@@ -172,7 +172,7 @@ delete (effwindow);} {}
}
Function {make_reverb_window()} {} {
Fl_Window effreverbwindow {
- xywh {328 433 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {328 433 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Text_Display {} {
@@ -339,7 +339,7 @@ eff->seteffectpar(11,x);}
}
Function {make_echo_window()} {} {
Fl_Window effechowindow {
- xywh {82 542 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {82 542 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {
@@ -444,7 +444,7 @@ cbwidget->do_callback();}
}
Function {make_chorus_window()} {} {
Fl_Window effchoruswindow {
- xywh {210 263 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {210 263 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {
@@ -594,7 +594,7 @@ cbwidget->do_callback();}
}
Function {make_phaser_window()} {} {
Fl_Window effphaserwindow {
- xywh {277 263 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {277 263 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {
@@ -729,7 +729,7 @@ cbwidget->do_callback();}
}
Function {make_alienwah_window()} {} {
Fl_Window effalienwahwindow {
- xywh {230 283 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {230 283 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {
@@ -849,8 +849,8 @@ cbwidget->do_callback();}
}
}
Function {make_distorsion_window()} {} {
- Fl_Window effdistorsionwindow {selected
- xywh {87 411 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ Fl_Window effdistorsionwindow {
+ xywh {87 411 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {
@@ -997,6 +997,10 @@ cbwidget->do_callback();}
label Pow2
xywh {85 85 100 20} labelfont 1 labelsize 10
}
+ menuitem {} {
+ label Sgm
+ xywh {95 95 100 20} labelfont 1 labelsize 10
+ }
}
Fl_Check_Button {} {
label {Neg.}
@@ -1020,7 +1024,7 @@ cbwidget->do_callback();}
}
Function {make_eq_window()} {} {
Fl_Window effeqwindow {
- xywh {248 307 380 95} box PLASTIC_UP_BOX color 221 labelfont 1 hide
+ xywh {248 307 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide
class Fl_Group
} {
Fl_Choice {} {