zynaddsubfx

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

commit 7e6ec36c520259a6dd143bd218edd7de3206e14b
parent 65ef6e1c124dc3a59d43a5bb367e588f97dc8294
Author: Christopher A. Oliver <caowasteland@gmail.com>
Date:   Sun, 25 Oct 2015 00:37:17 -0400

Add shortcuts to ADvoice edit button to go directly to the params and list.

Diffstat:
Msrc/UI/PartUI.fl | 64++++++++++++++++++++++++++++++++++++++++++++++++++++------------
1 file changed, 52 insertions(+), 12 deletions(-)

diff --git a/src/UI/PartUI.fl b/src/UI/PartUI.fl @@ -136,7 +136,14 @@ maxkcounter->do_callback();} } Fl_Button adeditbutton { label edit - callback {partui->showparameters(n,0);} + callback { + if (Fl::event_shift()) { + partui->showvoiceparams(n, true); + } else if (Fl::event_ctrl()) { + partui->showvoiceparams(n, false); + } else + partui->showparameters(n,0); + } xywh {420 0 40 15} box THIN_UP_BOX labelsize 11 } Fl_Button subeditbutton { @@ -873,7 +880,14 @@ if (x==2) part->partefx[ninseff]->setdryonly(true); } Fl_Button adeditbutton { label Edit - callback {showparameters(0,0);} + callback { + if (Fl::event_shift()) { + showvoiceparams(0, true); + } else if (Fl::event_ctrl()) { + showvoiceparams(0, false); + } else + showparameters(0,0); + } xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 } } @@ -1040,6 +1054,23 @@ end(); //if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show(); } {} } + Function {cleanuplastkit(int kititem)} {open return_type int + } { + code { +if (kititem==lastkititem) + return 0; +delete adnoteui; +delete subnoteui; +delete padnoteui; +adnoteui=NULL;subnoteui=NULL;padnoteui=NULL; +lastkititem=kititem; + +if(kititem>=NUM_KIT_ITEMS) return 1;//bad kit item +if(kititem<0) return 1; +return 0; +}} + + Function {showparameters(int kititem,int engine)} {open } { code { @@ -1053,16 +1084,8 @@ if (engine==-1){//this is used if I want to clear the engine from the part return; } -if (kititem!=lastkititem){ - delete adnoteui; - delete subnoteui; - delete padnoteui; - adnoteui=NULL;subnoteui=NULL;padnoteui=NULL; - lastkititem=kititem; - - if(kititem>=NUM_KIT_ITEMS) return;//bad kit item - if(kititem<0) return; -} + if (cleanuplastkit(kititem)) + return; if(!adnoteui && engine==0)//adsynenabledcheck->value()) adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc); @@ -1077,6 +1100,23 @@ if (engine==0&&adnoteui) adnoteui->ADnoteGlobalParameters->show(); if (engine==1&&subnoteui) subnoteui->SUBparameters->show(); if (engine==2&&padnoteui) padnoteui->padnotewindow->show();} {} } + Function {showvoiceparams(int kititem, bool voicelist)} {open + } { + code { +if (cleanuplastkit(kititem)) + return; +if(adnoteui || + (adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc))) + if(voicelist) + adnoteui->ADnoteVoiceList->show(); + else { + if (adnoteui->advoice->mod_type->value() == 0) + adnoteui->advoice->voiceFMparametersgroup->deactivate(); + else + adnoteui->advoice->voiceFMparametersgroup->activate(); + adnoteui->ADnoteVoice->show(); + }}} + Function {~PartUI()} {} { code {delete adnoteui; delete subnoteui;