zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit 763bb2cc091d4a8383639803ff69ea7b16b9fe4d
parent 065124e8379403cc7a43b25334432bf0ddba0808
Author: paulnasca <paulnasca>
Date:   Sat, 19 Jun 2004 09:22:40 +0000

*** empty log message ***

Diffstat:
MChangeLog | 1+
Msrc/Params/Controller.C | 11++++++++++-
Msrc/Params/Controller.h | 1+
Msrc/UI/PartUI.fl | 44+++++++++++++++++++++++++-------------------
4 files changed, 37 insertions(+), 20 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -584,6 +584,7 @@ 18 Iun 2004 - Incercata interpolarea cubica dar am vazut ca nu merita pentru ca OSCIL_SIZE e suficient de mare si pentru o interpolare liniara - Separat OscilGenUI din ADnoteUI - Inceput sa scriu modulul de sinteza PADnote +19 Iun 2004 - Adaugat modul liniar de controller bandwidth si modificat modul liniar la controllerul modulation wheel diff --git a/src/Params/Controller.C b/src/Params/Controller.C @@ -39,6 +39,7 @@ void Controller::defaults(){ filtercutoff.depth=64; filterq.depth=64; bandwidth.depth=64; + bandwidth.exponential=0; modwheel.depth=80; modwheel.exponential=0; fmamp.receive=1; @@ -118,13 +119,21 @@ void Controller::setfilterq(int value){ void Controller::setbandwidth(int value){ bandwidth.data=value; - bandwidth.relbw=pow(25.0,(value-64.0)/64.0*(bandwidth.depth/64.0)); + if (bandwidth.exponential==0) { + REALTYPE tmp=pow(25.0,pow(bandwidth.depth/127.0,1.5))-1.0; + if ((value<64)&&(bandwidth.depth>=64)) tmp=1.0; + bandwidth.relbw=(value/64.0-1.0)*tmp+1.0; + if (bandwidth.relbw<0.0) bandwidth.relbw=0.0; + } else { + bandwidth.relbw=pow(25.0,(value-64.0)/64.0*(bandwidth.depth/64.0)); + }; }; void Controller::setmodwheel(int value){ modwheel.data=value; if (modwheel.exponential==0) { REALTYPE tmp=pow(25.0,pow(modwheel.depth/127.0,1.5)*2.0)/25.0; + if ((value<64)&&(modwheel.depth>=64)) tmp=1.0; modwheel.relmod=(value/64.0-1.0)*tmp+1.0; if (modwheel.relmod<0.0) modwheel.relmod=0.0; } else modwheel.relmod=pow(25.0,(value-64.0)/64.0*(modwheel.depth/80.0)); diff --git a/src/Params/Controller.h b/src/Params/Controller.h @@ -98,6 +98,7 @@ class Controller{ int data; REALTYPE relbw; unsigned char depth; + unsigned char exponential; } bandwidth; struct {//Modulation Wheel diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -422,12 +422,12 @@ if (part->Penabled==0) partgroupui->deactivate(); } Fl_Window ctlwindow { label Controllers - private xywh {46 404 420 130} type Double hide + private xywh {198 472 460 130} type Double hide } { Fl_Check_Button {} { label Expr callback {part->ctl.expression.receive=(int) o->value();} - tooltip {Expression enable} xywh {125 55 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 + tooltip {Expression enable} xywh {155 55 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(part->ctl.expression.receive);} } Fl_Dial {} { @@ -454,34 +454,34 @@ if (part->Penabled==0) partgroupui->deactivate(); Fl_Dial {} { label BwDpth callback {part->ctl.bandwidth.depth=(int) o->value();} - tooltip {BandWidth depth} xywh {100 10 30 30} labelsize 10 maximum 127 step 1 + tooltip {BandWidth depth} xywh {125 10 30 30} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.bandwidth.depth);} class WidgetPDial } Fl_Dial {} { label ModWh callback {part->ctl.modwheel.depth=(int) o->value();} - tooltip {Modulation Wheel depth} xywh {55 10 30 30} labelsize 10 maximum 127 step 1 + tooltip {Modulation Wheel depth} xywh {50 10 30 30} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.modwheel.depth);} class WidgetPDial } Fl_Counter {} { label {PWheelB.Rng (cents)} callback {part->ctl.pitchwheel.bendrange=(int) o->value();} - tooltip {Pitch Wheel Bend Range (cents)} xywh {135 15 110 20} labelsize 10 align 1 minimum -6400 maximum 6400 step 1 + tooltip {Pitch Wheel Bend Range (cents)} xywh {165 15 110 20} labelsize 10 align 1 minimum -6400 maximum 6400 step 1 code0 {o->value(part->ctl.pitchwheel.bendrange);} code1 {o->lstep(100);} } Fl_Check_Button {} { label FMamp callback {part->ctl.fmamp.receive=(int) o->value();} - tooltip {FM amplitude enable} xywh {175 55 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 + tooltip {FM amplitude enable} xywh {205 55 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(part->ctl.fmamp.receive);} } Fl_Check_Button {} { label Vol callback {part->ctl.volume.receive=(int) o->value();} - tooltip {Volume enable} xywh {125 80 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 + tooltip {Volume enable} xywh {155 80 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(part->ctl.volume.receive);} } Fl_Check_Button {} { @@ -491,13 +491,13 @@ if (part->ctl.sustain.receive==0) { part->RelaseSustainedKeys(); part->ctl.setsustain(0); };} - tooltip {Sustain pedal enable} xywh {175 80 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 + tooltip {Sustain pedal enable} xywh {205 80 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(part->ctl.sustain.receive);} } Fl_Button {} { label Close callback {ctlwindow->hide();} - xywh {300 105 95 20} box THIN_UP_BOX + xywh {330 105 95 20} box THIN_UP_BOX } Fl_Button {} { label {Reset all controllers} @@ -506,62 +506,62 @@ if (part->ctl.sustain.receive==0) { } Fl_Group {} { label Portamento open - xywh {250 15 120 85} box ENGRAVED_FRAME labelfont 1 labelsize 10 + xywh {280 15 120 85} box ENGRAVED_FRAME labelfont 1 labelsize 10 } { Fl_Check_Button {} { label Rcv callback {part->ctl.portamento.receive=(int) o->value();} - tooltip {Receive Portamento Controllers} xywh {255 20 40 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 + tooltip {Receive Portamento Controllers} xywh {285 20 40 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 code0 {o->value(part->ctl.portamento.receive);} } Fl_Dial {} { label time callback {part->ctl.portamento.time=(int) o->value();} - tooltip {Portamento time} xywh {255 60 25 25} labelsize 10 maximum 127 step 1 + tooltip {Portamento time} xywh {285 60 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.portamento.time);} class WidgetPDial } Fl_Counter {} { label thresh callback {part->ctl.portamento.pitchthresh=(int) o->value();} - tooltip {Minimum or max. difference of the notes in order to do the portamento (x 100 cents)} xywh {310 20 50 20} type Simple labelsize 10 minimum 0 maximum 127 step 1 + tooltip {Minimum or max. difference of the notes in order to do the portamento (x 100 cents)} xywh {340 20 50 20} type Simple labelsize 10 minimum 0 maximum 127 step 1 code0 {o->value(part->ctl.portamento.pitchthresh);} } Fl_Check_Button {} { label {th.type} callback {part->ctl.portamento.pitchthreshtype=(int) o->value();} - tooltip {Threshold type (min/max)} xywh {340 70 15 15} down_box DOWN_BOX labelsize 10 align 2 + tooltip {Threshold type (min/max)} xywh {370 70 15 15} down_box DOWN_BOX labelsize 10 align 2 code0 {o->value(part->ctl.portamento.pitchthreshtype);} } Fl_Box {} { label {x100 cnt.} - xywh {310 50 55 15} labelsize 10 align 16 + xywh {340 50 55 15} labelsize 10 align 16 } Fl_Dial {} { label {t.dn/up} callback {int x=(int) o->value(); part->ctl.portamento.updowntimestretch=x;} - tooltip {Portamento time stretch (up/down)} xywh {285 60 25 25} labelsize 10 maximum 127 step 1 + tooltip {Portamento time stretch (up/down)} xywh {315 60 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.portamento.updowntimestretch);} class WidgetPDial } } Fl_Group {} { label Resonance open - xywh {370 15 45 85} box ENGRAVED_BOX labelfont 1 labelsize 10 + xywh {400 15 45 85} box ENGRAVED_BOX labelfont 1 labelsize 10 } { Fl_Dial {} { label BWdpth callback {part->ctl.resonancebandwidth.depth=(int) o->value();} - tooltip {BandWidth controller depth} xywh {380 60 25 25} labelsize 10 maximum 127 step 1 + tooltip {BandWidth controller depth} xywh {410 60 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancebandwidth.depth);} class WidgetPDial } Fl_Dial {} { label CFdpth callback {part->ctl.resonancecenter.depth=(int) o->value();} - tooltip {Center Frequency controller Depth} xywh {380 20 25 25} labelsize 10 maximum 127 step 1 + tooltip {Center Frequency controller Depth} xywh {410 20 25 25} labelsize 10 maximum 127 step 1 code0 {o->value(part->ctl.resonancecenter.depth);} class WidgetPDial } @@ -572,6 +572,12 @@ part->ctl.portamento.updowntimestretch=x;} tooltip {Exponential modulation wheel} xywh {10 15 40 25} down_box DOWN_BOX labelsize 10 align 148 code0 {o->value(part->ctl.modwheel.exponential);} } + Fl_Check_Button {} { + label {Exp BW} + callback {part->ctl.bandwidth.exponential=(int) o->value();} selected + tooltip {Exponential BandWidth Controller} xywh {85 15 35 25} down_box DOWN_BOX labelsize 10 align 148 + code0 {o->value(part->ctl.bandwidth.exponential);} + } } Fl_Window partfx { label {Part's Insert Effects}