zynaddsubfx

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

commit 354d630f80b785ce4b412f1af8d431c18804cec2
parent df2d25bc39c6405eae20d0217825ee896999b6d6
Author: fundamental <[email protected]>
Date:   Sat, 29 May 2010 13:01:47 -0400

Phaser: merging presets

Diffstat:
Msrc/Effects/APhaser.cpp | 34++++++++++++++++++++--------------
Msrc/Effects/Phaser.cpp | 34++++++++++++++++++++--------------
Msrc/UI/EffUI.fl | 69++++++++++++++++++++++++++++++++++++++++++---------------------------
3 files changed, 82 insertions(+), 55 deletions(-)

diff --git a/src/Effects/APhaser.cpp b/src/Effects/APhaser.cpp @@ -264,21 +264,25 @@ void Analog_Phaser::setdepth(unsigned char Pdepth) void Analog_Phaser::setpreset(unsigned char npreset) { - const int PRESET_SIZE = 14; - const int NUM_PRESETS = 6; + const int PRESET_SIZE = 15; + const int NUM_PRESETS = 12; unsigned char presets[NUM_PRESETS][PRESET_SIZE] = { - //Phaser1 - {64, 64, 14, 0, 1, 64, 64, 40, 4, 10, 0, 110, 1, 20}, - //Phaser2 - {64, 64, 14, 5, 1, 64, 70, 40, 6, 10, 0, 110, 1, 20}, - //Phaser3 - {64, 64, 9, 0, 0, 64, 60, 40, 8, 10, 0, 40, 0, 20}, - //Phaser4 - {64, 64, 14, 10, 0, 64, 45, 80, 7, 10, 1, 110, 1, 20}, - //Phaser5 - {25, 64, 127, 10, 0, 64, 25, 16, 8, 100, 0, 25, 0, 20}, - //Phaser6 - {64, 64, 1, 10, 1, 64, 70, 40, 12, 10, 0, 110, 1, 20} + //Phaser + //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + {64, 64, 36, 0, 0, 64, 110, 64, 1, 0, 0, 20, 0, 0, 0}, + {64, 64, 35, 0, 0, 88, 40, 64, 3, 0, 0, 20, 0, 0, 0}, + {64, 64, 31, 0, 0, 66, 68, 107, 2, 0, 0, 20, 0, 0, 0}, + {39, 64, 22, 0, 0, 66, 67, 10, 5, 0, 1, 20, 0, 0, 0}, + {64, 64, 20, 0, 1, 110, 67, 78, 10, 0, 0, 20, 0, 0, 0}, + {64, 64, 53, 100, 0, 58, 37, 78, 3, 0, 0, 20, 0, 0, 0} + //APhaser + //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + {64, 64, 14, 0, 1, 64, 64, 40, 4, 10, 0, 110, 1, 20, 1}, + {64, 64, 14, 5, 1, 64, 70, 40, 6, 10, 0, 110, 1, 20, 1}, + {64, 64, 9, 0, 0, 64, 60, 40, 8, 10, 0, 40, 0, 20, 1}, + {64, 64, 14, 10, 0, 64, 45, 80, 7, 10, 1, 110, 1, 20, 1}, + {25, 64, 127, 10, 0, 64, 25, 16, 8, 100, 0, 25, 0, 20, 1}, + {64, 64, 1, 10, 1, 64, 70, 40, 12, 10, 0, 110, 1, 20, 1} }; if(npreset >= NUM_PRESETS) npreset = NUM_PRESETS - 1; @@ -372,6 +376,8 @@ unsigned char Analog_Phaser::getpar(int npar) const return Phyper; case 13: return Pdistortion; + case 14: + return 1; default: return 0; } diff --git a/src/Effects/Phaser.cpp b/src/Effects/Phaser.cpp @@ -176,21 +176,25 @@ void Phaser::setphase(unsigned char Pphase) void Phaser::setpreset(unsigned char npreset) { - const int PRESET_SIZE = 12; - const int NUM_PRESETS = 6; + const int PRESET_SIZE = 15; + const int NUM_PRESETS = 12; unsigned char presets[NUM_PRESETS][PRESET_SIZE] = { - //Phaser1 - {64, 64, 36, 0, 0, 64, 110, 64, 1, 0, 0, 20}, - //Phaser2 - {64, 64, 35, 0, 0, 88, 40, 64, 3, 0, 0, 20}, - //Phaser3 - {64, 64, 31, 0, 0, 66, 68, 107, 2, 0, 0, 20}, - //Phaser4 - {39, 64, 22, 0, 0, 66, 67, 10, 5, 0, 1, 20}, - //Phaser5 - {64, 64, 20, 0, 1, 110, 67, 78, 10, 0, 0, 20}, - //Phaser6 - {64, 64, 53, 100, 0, 58, 37, 78, 3, 0, 0, 20} + //Phaser + //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + {64, 64, 36, 0, 0, 64, 110, 64, 1, 0, 0, 20, 0, 0, 0}, + {64, 64, 35, 0, 0, 88, 40, 64, 3, 0, 0, 20, 0, 0, 0}, + {64, 64, 31, 0, 0, 66, 68, 107, 2, 0, 0, 20, 0, 0, 0}, + {39, 64, 22, 0, 0, 66, 67, 10, 5, 0, 1, 20, 0, 0, 0}, + {64, 64, 20, 0, 1, 110, 67, 78, 10, 0, 0, 20, 0, 0, 0}, + {64, 64, 53, 100, 0, 58, 37, 78, 3, 0, 0, 20, 0, 0, 0} + //APhaser + //0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 + {64, 64, 14, 0, 1, 64, 64, 40, 4, 10, 0, 110, 1, 20, 1}, + {64, 64, 14, 5, 1, 64, 70, 40, 6, 10, 0, 110, 1, 20, 1}, + {64, 64, 9, 0, 0, 64, 60, 40, 8, 10, 0, 40, 0, 20, 1}, + {64, 64, 14, 10, 0, 64, 45, 80, 7, 10, 1, 110, 1, 20, 1}, + {25, 64, 127, 10, 0, 64, 25, 16, 8, 100, 0, 25, 0, 20, 1}, + {64, 64, 1, 10, 1, 64, 70, 40, 12, 10, 0, 110, 1, 20, 1} }; if(npreset >= NUM_PRESETS) npreset = NUM_PRESETS - 1; @@ -273,6 +277,8 @@ unsigned char Phaser::getpar(int npar) const return Poutsub; case 11: return Pphase; + case 14: + return 0; default: return 0; } diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl @@ -585,7 +585,7 @@ refresh(eff);} } Function {make_phaser_window()} {open } { - Fl_Window effphaserwindow {open + Fl_Window effphaserwindow {open selected xywh {75 25 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 class Fl_Group visible } { @@ -593,7 +593,7 @@ refresh(eff);} label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 70 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 100 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} @@ -648,6 +648,20 @@ refresh(eff);} tooltip {LFO randomness} xywh {120 45 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 when 4 maximum 127 class WidgetPDial } + Fl_Choice phaserp4 { + label LFO + callback {eff->seteffectpar(4,(int) o->value());} + tooltip {LFO function} xywh {245 55 40 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 130 textsize 8 + } { + MenuItem {} { + label SIN + xywh {15 15 100 20} labelfont 1 labelsize 10 + } + MenuItem {} { + label TRI + xywh {25 25 100 20} labelfont 1 labelsize 10 + } + } Fl_Dial phaserp5 { label {St.df} callback {eff->seteffectpar(5,(int) o->value());} @@ -666,6 +680,12 @@ refresh(eff);} tooltip Feedback xywh {185 45 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 class WidgetPDial } + Fl_Counter phaserp8 { + label Stages + callback {eff->seteffectpar(8,(int) o->value());} + xywh {290 55 35 15} type Simple labelfont 1 labelsize 11 minimum 0 maximum 127 step 1 + code0 {o->range(1,MAX_PHASER_STAGES);} + } Fl_Dial phaserp9 { label {L/R} callback {eff->seteffectpar(9,(int) o->value());} @@ -677,32 +697,27 @@ refresh(eff);} callback {eff->seteffectpar(10,(int) o->value());} tooltip {inverts output} xywh {200 10 74 20} box THIN_UP_BOX down_box DOWN_BOX color 230 labelfont 1 labelsize 10 } - Fl_Choice phaserp4 { - label LFO - callback {eff->seteffectpar(4,(int) o->value());} - tooltip {LFO function} xywh {245 55 40 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 130 textsize 8 - } { - MenuItem {} { - label SIN - xywh {15 15 100 20} labelfont 1 labelsize 10 - } - MenuItem {} { - label TRI - xywh {25 25 100 20} labelfont 1 labelsize 10 - } - } - Fl_Counter phaserp8 { - label Stages - callback {eff->seteffectpar(8,(int) o->value());} - xywh {290 55 35 15} type Simple labelfont 1 labelsize 11 minimum 0 maximum 127 step 1 - code0 {o->range(1,MAX_PHASER_STAGES);} - } Fl_Dial phaserp11 { label Phase callback {eff->seteffectpar(11,(int) o->value());} xywh {155 5 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 maximum 127 class WidgetPDial } + Fl_Check_Button {} { + label Analog + xywh {305 35 70 15} down_box DOWN_BOX + } + Fl_Dial aphaser13 { + label dist + callback {eff->seteffectpar(13,(int) o->value());} + tooltip Distortion xywh {340 50 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 + class WidgetPDial + } + Fl_Check_Button aphaser12 { + label {hyp.} + callback {eff->seteffectpar(12,(int) o->value());} + tooltip hyper xywh {245 35 55 15} down_box DOWN_BOX + } } } Function {make_analog_phaser_window()} {open @@ -715,7 +730,7 @@ refresh(eff);} label Preset callback {eff->changepreset((int)o->value()); refresh(eff);} - xywh {10 15 70 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 align 5 textfont 1 textsize 10 textcolor 7 + xywh {10 15 105 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} @@ -811,7 +826,7 @@ refresh(eff);} Fl_Dial aphaser9 { label offset callback {eff->seteffectpar(9,(int) o->value());} - tooltip offset xywh {155 5 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 + tooltip offset xywh {215 45 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 class WidgetPDial } Fl_Check_Button aphaser10 { @@ -821,8 +836,8 @@ refresh(eff);} } Fl_Dial aphaser11 { label Width - callback {eff->seteffectpar(11,(int) o->value());} selected - xywh {215 45 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 maximum 127 + callback {eff->seteffectpar(11,(int) o->value());} + xywh {155 5 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 maximum 127 class WidgetPDial } Fl_Check_Button aphaser12 { @@ -833,7 +848,7 @@ refresh(eff);} Fl_Dial aphaser13 { label dist callback {eff->seteffectpar(13,(int) o->value());} - tooltip Distortion xywh {85 5 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 + tooltip Distortion xywh {335 50 25 25} box ROUND_UP_BOX labelfont 1 labelsize 11 maximum 127 class WidgetPDial } Fl_Check_Button {} {