commit deaa5ba46b070deaeb79c5abdfc91bca0a909788
parent 44217f459ddc140476697272df56790909831a92
Author: paulnasca <paulnasca>
Date: Mon, 14 Jun 2004 20:35:50 +0000
*** empty log message ***
Diffstat:
4 files changed, 18 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -575,4 +575,5 @@
- Adaugat posibilitatea de swap la instrumentele din bank
14 Iun 2004 - Adaugat __DATE__ si __TIME__ sa stiu cand s-a compilat
- Modificat interfata la PartUI
-
+ - Imbunatatit modulatia basefunc la OscilGen (adaugat inca un parametru si inca un tip de modulatie ("power"))
+ - Adaugat inca o noua functie basefunc la OscilGen (sqr=atan(sin(x)*a))
diff --git a/src/Synth/OscilGen.C b/src/Synth/OscilGen.C
@@ -65,7 +65,7 @@ void OscilGen::defaults(){
Pbasefuncmodulation=0;
Pbasefuncmodulationpar1=64;
- Pbasefuncmodulationpar2=0;
+ Pbasefuncmodulationpar2=64;
Pbasefuncmodulationpar3=32;
Pwaveshapingfunction=0;
@@ -192,6 +192,11 @@ REALTYPE OscilGen::basefunc_chebyshev(REALTYPE x,REALTYPE a){
a=a*a*a*30.0+1.0;
return(cos(acos(x*2.0-1.0)*a));
};
+
+REALTYPE OscilGen::basefunc_sqr(REALTYPE x,REALTYPE a){
+ a=a*a*a*a*160.0+0.001;
+ return(-atan(sin(x*2.0*PI)*a));
+};
/*
* Base Functions - END
*/
@@ -263,13 +268,15 @@ void OscilGen::getbasefunction(REALTYPE *smps){
break;
case 12:smps[i]=basefunc_chebyshev(t,par);
break;
+ case 13:smps[i]=basefunc_sqr(t,par);
+ break;
default:smps[i]=-sin(2.0*PI*i/OSCIL_SIZE);
};
};
};
/*
- * Filter the basefunction
+ * Filter the oscillator
*/
void OscilGen::oscilfilter(){
if (Pfiltertype==0) return;
diff --git a/src/Synth/OscilGen.h b/src/Synth/OscilGen.h
@@ -129,6 +129,7 @@ class OscilGen{
REALTYPE basefunc_chirp(REALTYPE x,REALTYPE a);
REALTYPE basefunc_absstretchsine(REALTYPE x,REALTYPE a);
REALTYPE basefunc_chebyshev(REALTYPE x,REALTYPE a);
+ REALTYPE basefunc_sqr(REALTYPE x,REALTYPE a);
//Internal Data
unsigned char oldbasefunc,oldbasepar,oldhmagtype,oldwaveshapingfunction,oldwaveshaping,oldnormalizemethod;
diff --git a/src/UI/ADnoteUI.fl b/src/UI/ADnoteUI.fl
@@ -289,7 +289,7 @@ class ADOscilEditor {} {
Function {make_window()} {} {
Fl_Window osceditUI {
label {ADsynth Oscillator Editor}
- xywh {96 94 750 590} type Double hide
+ xywh {96 94 750 590} type Double visible
} {
Fl_Group oscildisplaygroup {
xywh {15 5 360 300} box ENGRAVED_FRAME
@@ -433,6 +433,10 @@ if ((oscil->Pcurrentbasefunc==0)||(oscil->Pcurrentbasefunc==127)) basefuncmodula
label Chebyshev
xywh {112 112 100 20} labelfont 1 labelsize 12
}
+ menuitem {} {
+ label Sqr selected
+ xywh {122 122 100 20} labelfont 1 labelsize 12
+ }
}
Fl_Box {} {
label {Base Func.}
@@ -474,7 +478,7 @@ oldosc->redraw();}
xywh {70 70 100 20} labelfont 1 labelsize 10
}
menuitem {} {
- label Pow selected
+ label Pow
xywh {80 80 100 20} labelfont 1 labelsize 10
}
}