zynaddsubfx

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

commit 0546e8b72946b41e07db5efeb1faf57ff44280b3
parent 9a2a7babd63280fc1d13dcfba461bb77ed0af918
Author: paulnasca <paulnasca>
Date:   Fri,  2 Jul 2004 18:35:34 +0000

*** empty log message ***

Diffstat:
MChangeLog | 2+-
Msrc/Effects/DynamicFilter.C | 102++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
Msrc/UI/EffUI.fl | 27++++++++++++++++++++++-----
3 files changed, 122 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -601,5 +601,5 @@ - Inceput sa scriu un nou efect (DynamicFilter) 01 Iul 2004 - Corectata o mica eroare la EffectUI care facea ca efectele sa nu apara activate - Continuat de scris la DynamicFiter (mai este doar de salvat parametrii si de auto-update la filtru) -02 Iul 2004 - Continuat la DynamicFilter (adaugata auto-update) +02 Iul 2004 - Continuat la DynamicFilter (adaugata auto-update, adaugat preset-uri) diff --git a/src/Effects/DynamicFilter.C b/src/Effects/DynamicFilter.C @@ -171,13 +171,109 @@ void DynamicFilter::reinitfilter(){ void DynamicFilter::setpreset(unsigned char npreset){ const int PRESET_SIZE=10; - const int NUM_PRESETS=1; + const int NUM_PRESETS=5; unsigned char presets[NUM_PRESETS][PRESET_SIZE]={ - //DynamicFilter1 - {127,64,80,0,0,64,0,80,0,60}}; + //WahWah + {127,64,80,0,0,64,0,80,0,60}, + //AutoWah + {127,64,70,0,0,80,70,0,0,60}, + //Sweep + {100,64,30,0,0,50,80,0,0,60}, + //VocalMorph1 + {127,64,80,0,0,64,0,80,0,60}, + //VocalMorph1 + {127,64,50,0,0,96,50,00,0,60}}; if (npreset>=NUM_PRESETS) npreset=NUM_PRESETS-1; for (int n=0;n<PRESET_SIZE;n++) changepar(n,presets[npreset][n]); + +// filterpars->defaults(); + switch(npreset){ + case 0: + filterpars->Pcategory=0; + filterpars->Ptype=2; + filterpars->Pfreq=64; + filterpars->Pq=64; + filterpars->Pstages=1; + filterpars->Pgain=64; + break; + case 1: + filterpars->Pcategory=2; + filterpars->Ptype=0; + filterpars->Pfreq=64; + filterpars->Pq=64; + filterpars->Pstages=0; + filterpars->Pgain=64; + break; + case 2: + filterpars->Pcategory=0; + filterpars->Ptype=4; + filterpars->Pfreq=64; + filterpars->Pq=64; + filterpars->Pstages=2; + filterpars->Pgain=64; + break; + case 3: + filterpars->Pcategory=1; + filterpars->Ptype=0; + filterpars->Pfreq=64; + filterpars->Pq=70; + filterpars->Pstages=1; + filterpars->Pgain=64; + + filterpars->Psequencesize=2; + // "I" + filterpars->Pvowels[0].formants[0].freq=34; + filterpars->Pvowels[0].formants[0].amp=127; + filterpars->Pvowels[0].formants[0].q=64; + filterpars->Pvowels[0].formants[1].freq=99; + filterpars->Pvowels[0].formants[1].amp=122; + filterpars->Pvowels[0].formants[1].q=64; + filterpars->Pvowels[0].formants[2].freq=108; + filterpars->Pvowels[0].formants[2].amp=112; + filterpars->Pvowels[0].formants[2].q=64; + // "A" + filterpars->Pvowels[1].formants[0].freq=61; + filterpars->Pvowels[1].formants[0].amp=127; + filterpars->Pvowels[1].formants[0].q=64; + filterpars->Pvowels[1].formants[1].freq=71; + filterpars->Pvowels[1].formants[1].amp=121; + filterpars->Pvowels[1].formants[1].q=64; + filterpars->Pvowels[1].formants[2].freq=99; + filterpars->Pvowels[1].formants[2].amp=117; + filterpars->Pvowels[1].formants[2].q=64; + break; + case 4: + filterpars->Pcategory=1; + filterpars->Ptype=0; + filterpars->Pfreq=64; + filterpars->Pq=70; + filterpars->Pstages=1; + filterpars->Pgain=64; + + filterpars->Psequencesize=2; + filterpars->Pnumformants=2; + filterpars->Pvowelclearness=0; + + filterpars->Pvowels[0].formants[0].freq=70; + filterpars->Pvowels[0].formants[0].amp=127; + filterpars->Pvowels[0].formants[0].q=64; + filterpars->Pvowels[0].formants[1].freq=80; + filterpars->Pvowels[0].formants[1].amp=122; + filterpars->Pvowels[0].formants[1].q=64; + + filterpars->Pvowels[1].formants[0].freq=20; + filterpars->Pvowels[1].formants[0].amp=127; + filterpars->Pvowels[1].formants[0].q=64; + filterpars->Pvowels[1].formants[1].freq=100; + filterpars->Pvowels[1].formants[1].amp=121; + filterpars->Pvowels[1].formants[1].q=64; + break; + }; + +// for (int i=0;i<5;i++){ +// printf("freq=%d amp=%d q=%d\n",filterpars->Pvowels[0].formants[i].freq,filterpars->Pvowels[0].formants[i].amp,filterpars->Pvowels[0].formants[i].q); +// }; if (insertion==0) changepar(0,presets[npreset][0]/2);//lower the volume if this is system effect Ppreset=npreset; diff --git a/src/UI/EffUI.fl b/src/UI/EffUI.fl @@ -152,7 +152,7 @@ return(log(freq/20.0)/log(1000.0));} {} decl {int maxdB;} {} } -class EffUI {: {public Fl_Group} +class EffUI {open : {public Fl_Group} } { Function {EffUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { code {eff=NULL; @@ -1098,7 +1098,8 @@ eqgraph->redraw();} } } } - Function {make_dynamicfilter_window()} {} { + Function {make_dynamicfilter_window()} {selected + } { Fl_Window effdynamicfilterwindow { xywh {100 558 380 95} type Double box PLASTIC_UP_BOX color 221 labelfont 1 hide class Fl_Group @@ -1106,13 +1107,29 @@ eqgraph->redraw();} Fl_Choice dfp { label Preset callback {eff->changepreset((int)o->value()); -refresh(eff);} open +refresh(eff);} xywh {10 15 90 15} down_box BORDER_BOX color 14 selection_color 0 labelfont 1 labelsize 10 labelcolor 0 align 5 textfont 1 textsize 10 textcolor 7 } { menuitem {} { - label cucurigu + label WahWah xywh {30 30 100 20} labelfont 1 labelsize 10 labelcolor 7 } + menuitem {} { + label AutoWah + xywh {40 40 100 20} labelfont 1 labelsize 10 labelcolor 7 + } + menuitem {} { + label Sweep + xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + } + menuitem {} { + label VocalMorph1 + xywh {50 50 100 20} labelfont 1 labelsize 10 labelcolor 7 + } + menuitem {} { + label VocalMorph2 + xywh {60 60 100 20} labelfont 1 labelsize 10 labelcolor 7 + } } Fl_Text_Display {} { label DynFilter @@ -1194,7 +1211,7 @@ refresh(eff);} open } Function {make_filter_window()} {} { Fl_Window filterwindow { - label {Filter Parameters for DynFilter Eff.} selected + label {Filter Parameters for DynFilter Eff.} xywh {212 170 290 110} type Double hide } { Fl_Group {} {