zynaddsubfx

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

PartUI.fl (40175B)


      1 # data file for the Fltk User Interface Designer (fluid)
      2 version 1.0302 
      3 header_name {.h} 
      4 code_name {.cc}
      5 decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local
      6 } 
      7 
      8 decl {//License: GNU GPL version 2 or later} {private local
      9 } 
     10 
     11 decl {\#include <stdlib.h>} {public local
     12 } 
     13 
     14 decl {\#include <stdio.h>} {public local
     15 } 
     16 
     17 decl {\#include <string.h>} {public local
     18 } 
     19 
     20 decl {\#include <string>} {public local
     21 } 
     22 
     23 decl {\#include "Fl_Osc_Dial.H"} {public local
     24 } 
     25 
     26 decl {\#include "Fl_Osc_Input.H"} {public local
     27 } 
     28 
     29 decl {\#include "PartNameButton.h"} {public local
     30 } 
     31 
     32 decl {\#include "EffUI.h"} {public local
     33 } 
     34 
     35 decl {\#include "BankUI.h"} {public local
     36 } 
     37 
     38 decl {\#include "ADnoteUI.h"} {public local
     39 } 
     40 
     41 decl {\#include "SUBnoteUI.h"} {public local
     42 } 
     43 
     44 decl {\#include "PADnoteUI.h"} {public local
     45 } 
     46 
     47 decl {\#include "../Misc/Config.h"} {public local
     48 } 
     49 
     50 decl {\#include "../Misc/Master.h"} {public local
     51 } 
     52 
     53 decl {\#include "../Misc/Part.h"} {public local
     54 } 
     55 
     56 class PartSysEffSend {open : {public Fl_Group}
     57 } {
     58   Function {make_window()} {open private
     59   } {
     60     Fl_Window syseffsend {
     61       private xywh {604 244 100 100} type Double box NO_BOX
     62       class Fl_Group visible
     63     } {
     64       Fl_Dial widget {
     65         label 01
     66         xywh {0 0 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 align 130 maximum 127 step 1
     67         code0 {o->size(25,25);}
     68         code1 {o->alt_init("/","Psysefxvol"+to_s(neff)+"/part"+to_s(npart));}
     69         code2 {o->mark_dead();}
     70         code3 {char tmp[12];snprintf(tmp,sizeof(tmp),"%d",neff+1);o->copy_label(tmp);}
     71         class Fl_Osc_Dial
     72       }
     73     }
     74   }
     75   Function {PartSysEffSend(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} {
     76     code {neff=0;
     77 npart=0;} {}
     78   }
     79   Function {init(int npart_,int neff_)} {} {
     80     code {npart=npart_;
     81 neff=neff_;
     82 make_window();
     83 syseffsend->show();
     84 end();} {}
     85   }
     86   Function {rebase(int part)} {} {
     87     code {
     88     auto *osc = widget->osc;
     89     std::string old = "Psysefxvol"+to_s(neff)+"/part"+to_s(npart);
     90     std::string next = "Psysefxvol"+to_s(neff)+"/part"+to_s(part);
     91     widget->ext      = next;
     92     osc->renameLink("/"+old, "/"+next, widget);
     93     osc->requestValue("/"+next);
     94     npart = part;
     95     } {}
     96   }
     97 
     98   Function {~PartSysEffSend()} {} {
     99     code {syseffsend->hide();
    100 //delete(syseffsend);} {}
    101   }
    102   decl {int neff;} {private local
    103   }
    104   decl {int npart;} {private local
    105   }
    106 } 
    107 
    108 class PartKitItem {open : {public Fl_Osc_Group}
    109 } {
    110   Function {make_window()} {open private
    111   } {
    112     Fl_Window partkititem {
    113       private xywh {488 521 670 100} type Double box NO_BOX
    114       class Fl_Osc_Group visible
    115     } {
    116       Fl_Group partkititemgroup {
    117         private xywh {55 0 605 20}
    118         class Fl_Osc_Group
    119       } {
    120         Fl_Counter minkcounter {
    121           xywh {225 0 55 15} type Simple minimum 0 maximum 128 step 1
    122           code0 {o->init("Pminkey");}
    123           class Fl_Osc_Counter
    124         }
    125         Fl_Button {} {
    126           label m
    127           callback {o->oscWrite("captureMin");
    128 minkcounter->update();
    129 maxkcounter->update();}
    130           tooltip {set the minimum key to the last pressed key} xywh {285 3 15 12} box THIN_UP_BOX labelsize 10
    131           class Fl_Osc_Button
    132         }
    133         Fl_Button {} {
    134           label M
    135           callback {o->oscWrite("captureMax");
    136 minkcounter->update();
    137 maxkcounter->update();}
    138           tooltip {set the maximum key to the last pressed key} xywh {315 3 15 12} box THIN_UP_BOX labelsize 10
    139           class Fl_Osc_Button
    140         }
    141         Fl_Button {} {
    142           label R
    143           callback {minkcounter->value(0);
    144 minkcounter->do_callback();
    145 maxkcounter->value(127);
    146 maxkcounter->do_callback();}
    147           tooltip {reset the minimum key to 0 and maximum key to 127} xywh {300 3 15 12} box THIN_UP_BOX labelfont 1 labelsize 10
    148         }
    149         Fl_Button adeditbutton {
    150           label edit
    151           callback {
    152           if (Fl::event_shift())
    153               partui->showvoiceparams(n, true);
    154           else if (Fl::event_ctrl())
    155               partui->showvoiceparams(n, false);
    156           else
    157               partui->showparameters(n,0);
    158           }
    159           xywh {420 0 40 15} box THIN_UP_BOX labelsize 11
    160         }
    161         Fl_Button subeditbutton {
    162           label edit
    163           callback {partui->showparameters(n,1);}
    164           xywh {490 0 40 15} box THIN_UP_BOX labelsize 11
    165         }
    166         Fl_Check_Button mutedcheck {
    167           xywh {60 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
    168           code0 {o->init("Pmuted");}
    169           class Fl_Osc_Check
    170         }
    171         Fl_Counter maxkcounter {
    172           xywh {335 0 55 15} type Simple minimum 0 maximum 128 step 1
    173           code0 {o->init("Pmaxkey");}
    174           class Fl_Osc_Counter
    175         }
    176         Fl_Input labelbutton {
    177           label {Bass Drum}
    178           xywh {90 0 130 15} box THIN_DOWN_BOX labelfont 1 labelsize 10 align 20
    179           code0 {o->init("Pname");}
    180           callback { o->oscWrite(o->ext, "s", o->value()); }
    181           class Fl_Osc_Input
    182         }
    183         Fl_Check_Button adcheck {
    184           callback {if (o->value()!=0) adeditbutton->activate();
    185        else  adeditbutton->deactivate();}
    186           private xywh {400 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
    187           code0 {o->init("Padenabled");}
    188           class Fl_Osc_Check
    189         }
    190         Fl_Check_Button subcheck {
    191           callback {if(o->value()!=0) subeditbutton->activate();
    192        else  subeditbutton->deactivate();}
    193           private xywh {470 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
    194           code0 {o->init("Psubenabled");}
    195           class Fl_Osc_Check
    196         }
    197         Fl_Choice sendtoeffect {
    198           xywh {615 0 45 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
    199           code0 {char nrstr[10]; for(int i=0;i<NUM_PART_EFX;i++){sprintf(nrstr,"FX%d",i+1);o->add(nrstr);};o->add("OFF");}
    200           code1 {o->init("Psendtoparteffect");//TODO check semantics}
    201           class Fl_Osc_Choice
    202         } {}
    203         Fl_Button padeditbutton {
    204           label edit
    205           callback {partui->showparameters(n,2);}
    206           xywh {560 0 40 15} box THIN_UP_BOX labelsize 11
    207         }
    208         Fl_Check_Button padcheck {
    209           callback {if (o->value()!=0) padeditbutton->activate();
    210        else padeditbutton->deactivate();}
    211           private xywh {540 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
    212           code0 {o->init("Ppadenabled");}
    213           class Fl_Osc_Check
    214         }
    215       }
    216       Fl_Check_Button enabledcheck {
    217         label 01
    218         callback {int answer=1;
    219         //TODO special case
    220 if (o->value()==0 && !o->is_osc)
    221     answer=fl_choice("Delete the item?","No","Yes",NULL);
    222 if(!answer)
    223     o->value(true);
    224 
    225 if (o->value()==0) partkititemgroup->deactivate();
    226 else partkititemgroup->activate();
    227 o->redraw();
    228 partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0}
    229         private xywh {30 0 20 15} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 4
    230         code0 {snprintf(label,sizeof(label),"%d",n+1);o->label(label);}
    231         code1 {o->init("Penabled");}
    232         code2 {if (n==0) o->deactivate();}
    233         class Fl_Osc_Check
    234       }
    235     }
    236   }
    237   Function {PartKitItem(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {} {
    238     code {n=0;} {}
    239   }
    240   Function {refresh()} {} {
    241     code {this->redraw();} {}
    242   }
    243   Function {init(int n_,class PartUI *partui_)} {} {
    244     code {n=n_;
    245         ext = "kit"+to_s(n)+"/";
    246 partui=partui_;
    247 make_window();
    248 if (n == 0)
    249     mutedcheck->deactivate();
    250 else
    251     deactivate();
    252 
    253 //partkititem->show();
    254 end();} {}
    255   }
    256   Function {~PartKitItem()} {} {
    257     code {} {}
    258   }
    259   decl {int n;} {private local
    260   }
    261   decl {char label[12];} {private local
    262   }
    263   decl {class PartUI *partui;} {private local
    264   }
    265 } 
    266 
    267 class PartUI {open : {public Fl_Osc_Group}
    268 } {
    269   Function {make_window()} {open private
    270   } {
    271     Fl_Window partgroup {
    272       private xywh {703 379 385 180} type Double box NO_BOX
    273       class Fl_Group visible
    274     } {
    275       Fl_Group partgroupui {open
    276         xywh {0 0 385 180}
    277         class Fl_Osc_Group
    278       } {
    279         Fl_Dial {} {
    280           label Pan
    281           xywh {50 40 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
    282           code0 {o->init("Ppanning"); o->reset_value=64;}
    283           class Fl_Osc_Dial
    284         }
    285         Fl_Counter {} {
    286           label KeyShift
    287           xywh {195 45 90 20} labelsize 11 align 1 minimum -64 maximum 64 step 1
    288           code0 {o->lstep(12);}
    289           code1 {o->init("Pkeyshift", 'i', 0);}
    290           class Fl_Osc_Counter
    291         }
    292         Fl_Scroll {} {open
    293           xywh {166 91 125 49} box UP_BOX labelfont 1 labelsize 10 align 21
    294         } {
    295           Fl_Pack {} {open
    296             xywh {171 96 115 35} type HORIZONTAL
    297             code0 {o->spacing(5);}
    298             code1 {for (int i=0;i<NUM_SYS_EFX;i++){psyef[i]=new PartSysEffSend(0,0,25,35,"");psyef[i]->init(npart,i);}}
    299           } {}
    300         }
    301         Fl_Button {} {
    302           label {Grand Piano}
    303           callback {int event=Fl::event_button();
    304 if (event==FL_RIGHT_MOUSE){
    305    const char *tmp=fl_input("Instrument name:",o->label());
    306    if (tmp!=NULL)
    307        o->oscWrite("Pname", "s", tmp);
    308 } else {
    309   if (event==FL_LEFT_MOUSE) bankui->show();
    310        else instrumenteditwindow->show();
    311 };}
    312           tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information}
    313           xywh {195 5 185 20} box UP_FRAME down_box DOWN_FRAME labelfont 1 labelsize 11 align 84
    314           code0 {/*o->label((char *)part->Pname);*/}
    315           code1 {o->ext = "Pname";o->oscRegister("Pname");}
    316           class PartNameButton
    317         }
    318         Fl_Box {} {
    319           label {To Sys.Efx.}
    320           xywh {166 81 95 10} labelfont 1 labelsize 10
    321         }
    322         Fl_Check_Button {} {
    323           label NoteOn
    324           tooltip {set if the part receives NoteOn messages} xywh {10 155 65 20} down_box DOWN_BOX labelfont 1 labelsize 11
    325           code0 {o->init("Pnoteon");}
    326           class Fl_Osc_Check
    327         }
    328         Fl_Counter minkcounter {
    329           label {Min.k}
    330           callback {if (minkcounter->value() > maxkcounter->value()) o->textcolor(FL_RED);
    331  else o->textcolor(FL_BLACK);}
    332           tooltip {Minimum key (that the part receives NoteOn messages)} xywh {295 125 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10
    333           code0 {o->init("Pminkey");}
    334           class Fl_Osc_Counter
    335         }
    336         Fl_Counter maxkcounter {
    337           label {Max.k}
    338           callback {if (minkcounter->value() > maxkcounter->value()) o->textcolor(FL_RED);
    339  else o->textcolor(FL_BLACK);}
    340           tooltip {Maximum key (that the part receives NoteOn messages)} xywh {340 125 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10
    341           code0 {o->init("Pmaxkey");}
    342           class Fl_Osc_Counter
    343         }
    344         Fl_Dial {} {
    345           label Volume
    346           tooltip {Part Volume} xywh {10 35 30 30} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
    347           code0 {o->init("Pvolume"); o->reset_value=96;}
    348           class Fl_Osc_Dial
    349         }
    350         Fl_Dial {} {
    351           label {Vel.Ofs.}
    352           tooltip {Velocity Offset} xywh {135 40 25 25} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
    353           code0 {o->init("Pveloffs"); o->reset_value=64;}
    354           class Fl_Osc_Dial
    355         }
    356         Fl_Dial {} {
    357           label {Vel.Sns.}
    358           tooltip {Velocity Sensing Function} xywh {95 40 25 25} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
    359           code0 {o->init("Pvelsns"); o->reset_value=64;}
    360           class Fl_Osc_Dial
    361         }
    362         Fl_Button {} {
    363           label Controllers
    364           callback {ctlwindow->show();}
    365           xywh {295 90 85 30} labelfont 1 labelsize 11
    366         }
    367         Fl_Check_Button {} {
    368           label Portamento
    369           tooltip {Enable/Disable the portamento} xywh {95 155 88 20} down_box DOWN_BOX labelfont 1 labelsize 11
    370           code0 {o->init("ctl/portamento.portamento");}
    371           class Fl_Osc_Check
    372         }
    373         Fl_Button {} {
    374           label {Edit instrument}
    375           callback {
    376           if (Fl::event_shift() || Fl::event_ctrl())
    377               instrumentkitlist->show();
    378           else
    379               instrumenteditwindow->show();
    380           }
    381           xywh {15 90 130 30} color 52 labelfont 1 labelsize 13
    382         }
    383         Fl_Button {} {
    384           label m
    385           callback {o->oscWrite("captureMin");
    386           o->oscWrite("Pminkey");
    387           o->oscWrite("Pmaxkey");}
    388           tooltip {set the minimum key to the last pressed key} xywh {315 155 15 12} box THIN_UP_BOX labelsize 10
    389           class Fl_Osc_Button
    390         }
    391         Fl_Button {} {
    392           label M
    393           callback {o->oscWrite("captureMax");
    394           o->oscWrite("Pminkey");
    395           o->oscWrite("Pmaxkey");}
    396           tooltip {set the maximum key to the last pressed key} xywh {345 155 15 12} box THIN_UP_BOX labelsize 10
    397           class Fl_Osc_Button
    398         }
    399         Fl_Button {} {
    400           label R
    401           callback {o->oscWrite("Pminkey", "i", 0);
    402           o->oscWrite("Pmaxkey", "i", 127);}
    403           tooltip {reset the minimum key to 0 and maximum key to 127} xywh {330 155 15 12} box THIN_UP_BOX labelfont 1 labelsize 10
    404           class Fl_Osc_Button
    405         }
    406         Fl_Choice {} {
    407           label {MIDI Chn.Rcv.}
    408           tooltip {receive from Midi channel} xywh {310 45 70 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
    409           code0 {char nrstr[10]; for(int i=0;i<NUM_MIDI_CHANNELS;i++){sprintf(nrstr,"Chn%d",i+1);if (i!=9) o->add(nrstr); else o->add("Drms10");};}
    410           code1 {o->init("Prcvchn");}
    411           class Fl_Osc_Choice
    412         } {}
    413         Fl_Counter keylimitlist {
    414           label KLmt
    415           tooltip {Key Limit} xywh {215 155 50 20} labelsize 10 align 8 textfont 1 textsize 10
    416           code0 {o->init("Pkeylimit",'i');}
    417           code1 {o->step(1.0,10.0);}
    418           class Fl_Osc_Counter
    419         }
    420         Fl_Choice {} {
    421           label {Mode :}
    422           tooltip {Poly, Mono or Legato mode} xywh {80 130 64 18} down_box BORDER_BOX labelfont 1 labelsize 11 textfont 1 textsize 10
    423           code0 {o->add("Poly"); o->add("Mono"); o->add("Legato");}
    424           code1 {o->init("polyType");}
    425           class Fl_Osc_Choice
    426         } {}
    427       }
    428       Fl_Check_Button partenablebutton {
    429         label Enabled
    430         callback {if (o->value()==0) partgroupui->deactivate();
    431     else partgroupui->activate();}
    432         xywh {90 5 75 20} down_box DOWN_BOX labelfont 1 labelsize 11
    433         code0 {o->init("Penabled");}
    434         class Fl_Osc_Check
    435       }
    436     }
    437     Fl_Window ctlwindow {
    438       label Controllers
    439       private xywh {777 376 500 135} type Double box NO_BOX
    440       class Fl_Osc_Window visible
    441     } {
    442       Fl_Box {} {
    443         xywh {0 0 0 0}
    444         code0 {ctlwindow->init(osc,"/part"+to_s(npart)+"/ctl/");}
    445       }
    446       Fl_Check_Button {} {
    447         label Expr
    448         tooltip {Expression enable} xywh {155 58 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
    449         code0 {o->init("expression.receive");}
    450         class Fl_Osc_Check
    451       }
    452       Fl_Dial {} {
    453         label PanDpth
    454         tooltip {Panning Depth} xywh {10 55 30 30} labelsize 10 maximum 127 step 1
    455         code0 {o->init("panning.depth");o->reset_value=64;}
    456         class Fl_Osc_Dial
    457       }
    458       Fl_Dial {} {
    459         label FltCut
    460         tooltip {Filter Cutoff depth} xywh {90 55 30 30} labelsize 10 maximum 127 step 1
    461         code0 {o->init("filtercutoff.depth");o->reset_value=64;}
    462         class Fl_Osc_Dial
    463       }
    464       Fl_Dial {} {
    465         label FltQ
    466         tooltip {Filter Q depth} xywh {50 55 30 30} labelsize 10 maximum 127 step 1
    467         code0 {o->init("filterq.depth");o->reset_value=64;}
    468         class Fl_Osc_Dial
    469       }
    470       Fl_Dial {} {
    471         label BwDpth
    472         tooltip {BandWidth depth} xywh {125 10 30 30} labelsize 10 maximum 127 step 1
    473         code0 {o->init("bandwidth.depth");o->reset_value=64;}
    474         class Fl_Osc_Dial
    475       }
    476       Fl_Dial {} {
    477         label ModWh
    478         tooltip {Modulation Wheel depth} xywh {50 10 30 30} labelsize 10 maximum 127 step 1
    479         code0 {o->init("modwheel.depth");o->reset_value=80;}
    480         class Fl_Osc_Dial
    481       }
    482       Fl_Check_Button benddir {
    483         label Downward
    484         callback {if (o->value()) {bendrng->oscMove("pitchwheel.bendrange_down");}
    485 else {bendrng->oscMove("pitchwheel.bendrange");}}
    486         xywh {205 37 69 15} down_box DOWN_BOX labelsize 10
    487       }
    488       Fl_Counter bendrng {
    489         label {PWheelB.Rng (% semitone)}
    490         tooltip {Pitch Wheel Bend Range (cents of semitone)} xywh {165 15 110 20} labelsize 10 align 1 minimum -6400 maximum 6400 step 1
    491         code0 {o->init("pitchwheel.bendrange", 'i');}
    492         code1 {o->lstep(100);}
    493         class Fl_Osc_Counter
    494       }
    495       Fl_Check_Button bendsplt {
    496         label Split
    497         callback {if(o->value()) {benddir->activate();}
    498             else {benddir->deactivate(); benddir->value(0); benddir->do_callback();}}
    499         xywh {167 37 38 15} down_box DOWN_BOX labelsize 10
    500         code0 {o->init("pitchwheel.is_split");}
    501         class Fl_Osc_Check
    502       }
    503       Fl_Check_Button {} {
    504         label FMamp
    505         tooltip {FM amplitude enable} xywh {205 58 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
    506         code0 {o->init("fmamp.receive");}
    507         class Fl_Osc_Check
    508       }
    509       Fl_Check_Button {} {
    510         label Vol
    511         tooltip {Volume enable} xywh {155 83 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
    512         code0 {o->init("volume.receive");}
    513         class Fl_Osc_Check
    514       }
    515       Fl_Check_Button {} {
    516         label Sustain
    517         callback {//TODO
    518             /*if (ctl.sustain.receive==0) {
    519                 ReleaseSustainedKeys();
    520                 ctl.setsustain(0);
    521             };*/}
    522         tooltip {Sustain pedal enable} xywh {205 83 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
    523         code0 {o->init("sustain.receive");}
    524         class Fl_Osc_Check
    525       }
    526       Fl_Button {} {
    527         label Close
    528         callback {ctlwindow->hide();}
    529         xywh {400 110 95 20} box THIN_UP_BOX
    530       }
    531       Fl_Button {} {
    532         label {Reset all controllers}
    533         callback {o->oscWrite("defaults");//part->SetController(C_resetallcontrollers,0);
    534         ctlwindow->update();
    535         }
    536         xywh {5 110 210 20} box THIN_UP_BOX
    537         class Fl_Osc_Button
    538       }
    539       Fl_Group {} {
    540         label Portamento open
    541         xywh {280 15 160 90} box UP_FRAME labelsize 10
    542         class Fl_Osc_Group
    543       } {
    544         Fl_Check_Button {} {
    545           label Rcv
    546           tooltip {Receive Portamento Controllers} xywh {285 20 40 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
    547           code0 {o->init("portamento.receive");}
    548           class Fl_Osc_Check
    549         }
    550         Fl_Dial {} {
    551           label time
    552           tooltip {Portamento time} xywh {285 60 25 25} labelsize 10 maximum 127 step 1
    553           code0 {o->init("portamento.time");o->reset_value=64;}
    554           class Fl_Osc_Dial
    555         }
    556         Fl_Counter {} {
    557           label thresh
    558           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
    559           code0 {o->init("portamento.pitchthresh");}
    560           class Fl_Osc_Counter
    561         }
    562         Fl_Check_Button {} {
    563           label {th.type}
    564           tooltip {Threshold type (min/max)} xywh {365 70 15 15} down_box DOWN_BOX labelsize 10 align 2
    565           code0 {o->init("portamento.pitchthreshtype");}
    566           class Fl_Osc_Check
    567         }
    568         Fl_Box {} {
    569           label {x100 cnt.}
    570           xywh {340 50 55 15} labelsize 10 align 16
    571         }
    572         Fl_Dial {} {
    573           label {t.dn/up}
    574           tooltip {Portamento time stretch (up/down)} xywh {315 60 25 25} labelsize 10 maximum 127 step 1
    575           code0 {o->init("portamento.updowntimestretch");o->reset_value=64;}
    576           class Fl_Osc_Dial
    577         }
    578         Fl_Dial propta {
    579           label {Prp.Rate}
    580           tooltip {Distance required to double change from nonpropotinal portamento time} xywh {405 20 25 25} labelsize 9 maximum 127 step 1
    581           code0 {o->init("portamento.propRate");o->reset_value=80;}
    582           class Fl_Osc_Dial
    583         }
    584         Fl_Dial proptb {
    585           label {Prp.Dpth}
    586           tooltip {The difference from nonproportinal portamento} xywh {405 60 25 25} labelsize 9 maximum 127 step 1
    587           code0 {o->init("portamento.propDepth");o->reset_value=90;}
    588           class Fl_Osc_Dial
    589         }
    590         Fl_Check_Button {} {
    591           label {Proprt.}
    592           callback {if(o->value()){propta->activate();proptb->activate();}
    593 else {propta->deactivate();proptb->deactivate();}}
    594           tooltip {Enable Proportinal Portamento (over fixed Portamento)} xywh {285 40 50 15} box THIN_UP_BOX down_box DOWN_BOX labelsize 9
    595           code0 {o->init("portamento.proportional");}
    596           class Fl_Osc_Check
    597         }
    598       }
    599       Fl_Group {} {
    600         label Resonance
    601         xywh {445 15 50 90} box UP_FRAME labelsize 10
    602         class Fl_Osc_Group
    603       } {
    604         Fl_Dial {} {
    605           label BWdpth
    606           tooltip {BandWidth controller depth} xywh {455 60 25 25} labelsize 10 maximum 127 step 1
    607           code0 {o->init("resonancebandwidth.depth");o->reset_value=64;}
    608           class Fl_Osc_Dial
    609         }
    610         Fl_Dial {} {
    611           label CFdpth
    612           tooltip {Center Frequency controller Depth} xywh {455 20 25 25} labelsize 10 maximum 127 step 1
    613           code0 {o->init("resonancecenter.depth");o->reset_value=64;}
    614           class Fl_Osc_Dial
    615         }
    616       }
    617       Fl_Check_Button {} {
    618         label {Exp MWh}
    619         tooltip {Exponential modulation wheel} xywh {10 15 40 25} down_box DOWN_BOX labelsize 10 align 148
    620         code0 {o->init("modwheel.exponential");}
    621         class Fl_Osc_Check
    622       }
    623       Fl_Check_Button {} {
    624         label {Exp BW}
    625         tooltip {Exponential BandWidth Controller} xywh {85 15 35 25} down_box DOWN_BOX labelsize 10 align 148
    626         code0 {o->init("bandwidth.exponential");}
    627         class Fl_Osc_Check
    628       }
    629     }
    630     Fl_Window partfx {
    631       label {Part's Insert Effects}
    632       private xywh {569 775 390 145} type Double box NO_BOX
    633       class Fl_Osc_Window visible
    634     } {
    635       Fl_Box {} {
    636         xywh {0 0 0 0}
    637         code0 {partfx->init(osc, part_path);}
    638       }
    639       Fl_Counter inseffnocounter {
    640         label {FX No.}
    641         callback {ninseff=(int) o->value()-1;
    642         insefftype->oscMove("partefx"+to_s(ninseff)+"/efftype");
    643         inseffectuigroup->reext("partefx"+to_s(ninseff)+"/");
    644         bypasseff->oscMove("Pefxbypass"+to_s(ninseff));
    645         sendtochoice->oscMove("Pefxroute"+to_s(ninseff));
    646 /*insefftype->value(part->partefx[ninseff]->geteffect());*/
    647 //insefftype->do_callback();
    648 inseffectui->refresh();
    649 int x=127;/*part->Pefxroute[ninseff];*/
    650 if (x==127) x=1;
    651 
    652 sendtochoice->value(x);}
    653         xywh {5 110 80 20} type Simple labelfont 1 align 6 minimum 1 maximum 127 step 1 textfont 1
    654         code0 {o->bounds(1,NUM_PART_EFX);}
    655         code1 {o->value(ninseff+1);}
    656       }
    657       Fl_Choice insefftype {
    658         label EffType
    659         callback {inseffectui->efftype = o->value();
    660 inseffectui->refresh();}
    661         xywh {155 110 70 15} down_box BORDER_BOX labelsize 10 align 6
    662         code0 {o->init(("partefx"+to_s(ninseff)+"/efftype").c_str());}
    663         class Fl_Osc_Choice
    664       } {
    665         MenuItem {} {
    666           label {No Effect}
    667           xywh {35 35 100 20} labelfont 1 labelsize 10
    668         }
    669         MenuItem {} {
    670           label Reverb
    671           xywh {45 45 100 20} labelfont 1 labelsize 10
    672         }
    673         MenuItem {} {
    674           label Echo
    675           xywh {55 55 100 20} labelfont 1 labelsize 10
    676         }
    677         MenuItem {} {
    678           label Chorus
    679           xywh {65 65 100 20} labelfont 1 labelsize 10
    680         }
    681         MenuItem {} {
    682           label Phaser
    683           xywh {70 70 100 20} labelfont 1 labelsize 10
    684         }
    685         MenuItem {} {
    686           label AlienWah
    687           xywh {80 80 100 20} labelfont 1 labelsize 10
    688         }
    689         MenuItem {} {
    690           label Distortion
    691           xywh {90 90 100 20} labelfont 1 labelsize 10
    692         }
    693         MenuItem {} {
    694           label EQ
    695           xywh {100 100 100 20} labelfont 1 labelsize 10
    696         }
    697         MenuItem {} {
    698           label DynFilter
    699           xywh {110 110 100 20} labelfont 1 labelsize 10
    700         }
    701       }
    702       Fl_Group inseffectuigroup {
    703         xywh {5 5 380 100} box FLAT_BOX color 48
    704         class Fl_Osc_Group
    705       } {
    706         Fl_Box {} {
    707           xywh {0 0 0 0}
    708           code0 {inseffectuigroup->ext = "partefx0/";}
    709         }
    710         Fl_Group inseffectui {
    711           xywh {5 5 380 95}
    712           code0 {o->init(true);}
    713           class EffUI
    714         } {}
    715       }
    716       Fl_Button {} {
    717         label Close
    718         callback {partfx->hide();}
    719         xywh {325 115 60 20} box THIN_UP_BOX
    720       }
    721       Fl_Choice sendtochoice {
    722         label {Send To.}
    723         callback {(void)o;/*int x=(int) o->value();
    724 part->Pefxroute[ninseff]=x;
    725 if (x==2) part->partefx[ninseff]->setdryonly(true);
    726         else part->partefx[ninseff]->setdryonly(false);*/}
    727         xywh {235 110 80 15} down_box BORDER_BOX labelsize 10 align 6
    728         code0 {/*int x=part->Pefxroute[ninseff]; if (x==127) x=1;*/}
    729         code1 {o->init(("Pefxroute"+to_s(ninseff)).c_str());}
    730         class Fl_Osc_Choice
    731       } {
    732         MenuItem {} {
    733           label {Next Effect}
    734           xywh {45 45 100 20} labelfont 1 labelsize 10
    735         }
    736         MenuItem {} {
    737           label {Part Out}
    738           xywh {55 55 100 20} labelfont 1 labelsize 10
    739         }
    740         MenuItem {} {
    741           label {Dry Out}
    742           xywh {65 65 100 20} labelfont 1 labelsize 10
    743         }
    744       }
    745       Fl_Check_Button bypasseff {
    746         label bypass
    747         tooltip {if the effect is not used (is bypassed)} xywh {90 110 60 15} down_box DOWN_BOX labelsize 11
    748         code0 {o->init("Pefxbypass"+to_s(ninseff));}
    749         class Fl_Osc_Check
    750       }
    751       Fl_Button {} {
    752         label C
    753         callback {presetsui->copy(partfx->loc()+"partefx"+to_s(ninseff)+"/");}
    754         xywh {90 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
    755       }
    756       Fl_Button {} {
    757         label P
    758         callback {presetsui->paste(partfx->loc()+"partefx"+to_s(ninseff)+"/",inseffectui);}
    759         xywh {120 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
    760       }
    761     }
    762     Fl_Window instrumentkitlist {
    763       label {Instrument Kit}
    764       xywh {601 611 670 370} type Double box NO_BOX
    765       class Fl_Osc_Window visible
    766     } {
    767       Fl_Box {} {
    768         xywh {0 0 0 0}
    769         code0 {instrumentkitlist->init(osc, "/part"+to_s(npart)+"/");}
    770       }
    771       Fl_Button {} {
    772         label {Close Window}
    773         callback {instrumentkitlist->hide();}
    774         xywh {255 350 160 20} box THIN_UP_BOX
    775       }
    776       Fl_Scroll kitlist {open
    777         xywh {0 15 670 330} type VERTICAL box UP_FRAME
    778       } {
    779         Fl_Pack {} {
    780           xywh {0 20 670 320}
    781           code0 {for (int i=0;i<NUM_KIT_ITEMS;i++){partkititem[i]=new PartKitItem(0,0,670,20);partkititem[i]->init(i,this);}}
    782         } {}
    783       }
    784       Fl_Box {} {
    785         label {No.}
    786         xywh {5 0 25 15} labelfont 1 labelsize 11 align 18
    787       }
    788       Fl_Box {} {
    789         label {M.}
    790         xywh {55 0 25 15} labelfont 1 labelsize 11 align 18
    791       }
    792       Fl_Box {} {
    793         label {Min.k}
    794         xywh {235 0 40 15} labelfont 1 labelsize 11 align 18
    795       }
    796       Fl_Box {} {
    797         label {Max.k}
    798         xywh {345 0 40 15} labelfont 1 labelsize 11 align 18
    799       }
    800       Fl_Box {} {
    801         label ADsynth
    802         xywh {405 0 50 15} labelfont 1 labelsize 11 align 18
    803       }
    804       Fl_Box {} {
    805         label SUBsynth
    806         xywh {470 0 60 15} labelfont 1 labelsize 11 align 18
    807       }
    808       Fl_Choice {} {
    809         label Mode
    810         callback {if (o->value()==0) {
    811                  for (int i=1;i<NUM_KIT_ITEMS;i++)
    812                    partkititem[i]->deactivate();
    813                  partkititem[0]->mutedcheck->deactivate();
    814         } else {
    815                  for (int i=1;i<NUM_KIT_ITEMS;i++)
    816                    partkititem[i]->activate();
    817                  partkititem[0]->mutedcheck->activate(); };}
    818         xywh {35 350 70 15} down_box BORDER_BOX labelsize 11 textfont 1 textsize 11
    819         code0 {o->init("Pkitmode");}
    820         class Fl_Osc_Choice
    821       } {
    822         MenuItem {} {
    823           label OFF
    824           xywh {0 0 100 20} labelfont 1 labelsize 11
    825         }
    826         MenuItem {} {
    827           label MULTI
    828           xywh {10 10 100 20} labelfont 1 labelsize 11
    829         }
    830         MenuItem {} {
    831           label SINGLE
    832           xywh {20 20 100 20} labelfont 1 labelsize 11
    833         }
    834       }
    835       Fl_Check_Button {} {
    836         label {Drum mode}
    837         xywh {125 350 80 15} down_box DOWN_BOX labelsize 10
    838         code0 {o->init("Pdrummode");}
    839         class Fl_Osc_Check
    840       }
    841       Fl_Button {} {
    842         label Comments
    843         callback {instrumenteditwindow->show();}
    844         xywh {481 350 106 20} box THIN_UP_BOX
    845       }
    846       Fl_Button {} {
    847         label Effects
    848         callback {partfx->show();} selected
    849         xywh {600 350 70 20} box THIN_UP_BOX
    850       }
    851 
    852       Fl_Box {} {
    853         label {FX.r.}
    854         xywh {620 0 30 15} labelfont 1 labelsize 11 align 18
    855       }
    856       Fl_Box {} {
    857         label PADsynth
    858         xywh {540 0 60 15} labelfont 1 labelsize 11 align 18
    859       }
    860     }
    861     Fl_Window instrumenteditwindow {
    862       label {Instrument Edit} open
    863       xywh {262 621 395 360} type Double box NO_BOX
    864       class Fl_Osc_Window visible
    865     } {
    866       Fl_Box {} {
    867         xywh {0 0 0 0}
    868         code0 {instrumenteditwindow->init(osc, "/part"+to_s(npart)+"/");}
    869       }
    870       Fl_Group editgroup {
    871         xywh {0 220 395 110} box UP_FRAME
    872         class Fl_Osc_Group
    873       } {
    874         Fl_Box {} {
    875           xywh {0 220 0 0}
    876           code0 {editgroup->ext = "kit0/";}
    877         }
    878         Fl_Group {} {
    879           label PADsynth
    880           xywh {205 245 100 80} box ENGRAVED_FRAME labelfont 1
    881         } {
    882           Fl_Button padeditbutton {
    883             label Edit
    884             callback {showparameters(0,2);}
    885             xywh {215 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
    886           }
    887           Fl_Check_Button padsynenabledcheck {
    888             label Enabled
    889             callback {if (o->value()==0) padeditbutton->deactivate();
    890                 else padeditbutton->activate();}
    891             tooltip {enable/disable PADsynth} xywh {215 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
    892             code1 {o->init("Ppadenabled");}
    893             class Fl_Osc_Check
    894           }
    895         }
    896         Fl_Group {} {
    897           label ADsynth
    898           xywh {5 245 100 80} box ENGRAVED_FRAME labelfont 1
    899         } {
    900           Fl_Check_Button adsynenabledcheck {
    901             label Enabled
    902             callback {if (o->value()==0) adeditbutton->deactivate();
    903      else adeditbutton->activate();}
    904             tooltip {enable/disable ADsynth} xywh {15 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
    905             code1 {o->init("Padenabled");}
    906             class Fl_Osc_Check
    907           }
    908           Fl_Button adeditbutton {
    909             label Edit
    910             callback {
    911             if (Fl::event_shift()) {
    912                 showvoiceparams(0, true);
    913             } else if (Fl::event_ctrl()) {
    914                 showvoiceparams(0, false);
    915             } else
    916                 showparameters(0,0);
    917             }
    918             xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
    919           }
    920         }
    921         Fl_Group {} {
    922           label SUBsynth
    923           xywh {105 245 100 80} box ENGRAVED_FRAME labelfont 1
    924         } {
    925           Fl_Check_Button subsynenabledcheck {
    926             label Enabled
    927             callback {if (o->value()==0) subeditbutton->deactivate();
    928      else subeditbutton->activate();}
    929             tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
    930             code1 {o->init("Psubenabled");}
    931             class Fl_Osc_Check
    932           }
    933           Fl_Button subeditbutton {
    934             label Edit
    935             callback {showparameters(0,1);}
    936             xywh {115 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
    937           }
    938         }
    939         Fl_Button {} {
    940           label {Kit Edit}
    941           callback {instrumentkitlist->show();}
    942           xywh {310 245 80 35} color 51 selection_color 51 labelfont 1 align 128
    943         }
    944         Fl_Button {} {
    945           label Effects
    946           callback {partfx->show();}
    947           xywh {310 290 80 35} color 51 selection_color 51 labelfont 1 labelsize 13
    948         }
    949       }
    950       Fl_Group {} {
    951         xywh {0 5 395 215} box UP_FRAME
    952       } {
    953         Fl_Input {} {
    954           label {Author and Copyright}
    955           xywh {5 60 385 50} type Multiline color 124 labelsize 10 align 5
    956           code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);}
    957           code1 {o->init("info.Pauthor");}
    958           callback { o->oscWrite(o->ext, "s", o->value()); }
    959           class Fl_Osc_Input
    960         }
    961         Fl_Input {} {
    962           label Comments
    963           xywh {5 125 385 90} type Multiline color 124 labelsize 11 align 5
    964           code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);}
    965           code1 {o->init("info.Pcomments");}
    966           callback { o->oscWrite(o->ext, "s", o->value()); }
    967           class Fl_Osc_Input
    968         }
    969         Fl_Choice {} {
    970           label {Type:}
    971           xywh {5 25 155 20} down_box BORDER_BOX labelfont 1 labelsize 11 align 5 textsize 10
    972           code0 {o->init("info.Ptype");}
    973           class Fl_Osc_Choice
    974         } {
    975           MenuItem {} {
    976             label {--------------------------}
    977             xywh {20 20 100 20} labelfont 1 labelsize 11
    978           }
    979           MenuItem {} {
    980             label Piano
    981             xywh {10 10 100 20} labelfont 1 labelsize 11
    982           }
    983           MenuItem {} {
    984             label {Chromatic Percussion}
    985             xywh {20 20 100 20} labelfont 1 labelsize 11
    986           }
    987           MenuItem {} {
    988             label Organ
    989             xywh {30 30 100 20} labelfont 1 labelsize 11
    990           }
    991           MenuItem {} {
    992             label Guitar
    993             xywh {40 40 100 20} labelfont 1 labelsize 11
    994           }
    995           MenuItem {} {
    996             label Bass
    997             xywh {50 50 100 20} labelfont 1 labelsize 11
    998           }
    999           MenuItem {} {
   1000             label {Solo Strings}
   1001             xywh {60 60 100 20} labelfont 1 labelsize 11
   1002           }
   1003           MenuItem {} {
   1004             label Ensemble
   1005             xywh {70 70 100 20} labelfont 1 labelsize 11
   1006           }
   1007           MenuItem {} {
   1008             label Brass
   1009             xywh {80 80 100 20} labelfont 1 labelsize 11
   1010           }
   1011           MenuItem {} {
   1012             label Reed
   1013             xywh {90 90 100 20} labelfont 1 labelsize 11
   1014           }
   1015           MenuItem {} {
   1016             label Pipe
   1017             xywh {100 100 100 20} labelfont 1 labelsize 11
   1018           }
   1019           MenuItem {} {
   1020             label {Synth Lead}
   1021             xywh {110 110 100 20} labelfont 1 labelsize 11
   1022           }
   1023           MenuItem {} {
   1024             label {Synth Pad}
   1025             xywh {120 120 100 20} labelfont 1 labelsize 11
   1026           }
   1027           MenuItem {} {
   1028             label {Synth Effects}
   1029             xywh {130 130 100 20} labelfont 1 labelsize 11
   1030           }
   1031           MenuItem {} {
   1032             label Ethnic
   1033             xywh {140 140 100 20} labelfont 1 labelsize 11
   1034           }
   1035           MenuItem {} {
   1036             label Percussive
   1037             xywh {150 150 100 20} labelfont 1 labelsize 11
   1038           }
   1039           MenuItem {} {
   1040             label {Sound Effects}
   1041             xywh {160 160 100 20} labelfont 1 labelsize 11
   1042           }
   1043         }
   1044       }
   1045       Fl_Button {} {
   1046         label Close
   1047         callback {instrumenteditwindow->hide();}
   1048         xywh {150 335 95 25} box THIN_UP_BOX
   1049       }
   1050     }
   1051   }
   1052   Function {PartUI(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {open
   1053   } {
   1054     code {adnoteui=NULL;
   1055 subnoteui=NULL;
   1056 padnoteui=NULL;
   1057 lastkititem=-1;} {}
   1058   }
   1059   Function {init(std::string part_path_, int npart_,BankUI *bankui_, std::string loc_, Fl_Osc_Interface *osc_)} {open
   1060   } {
   1061     code {assert(osc_);
   1062 assert(!loc_.empty());
   1063 
   1064 bankui=bankui_;
   1065 part_path = part_path_;
   1066 base = part_path;
   1067 npart=npart_;
   1068 ninseff=0;
   1069 osc=osc_;
   1070 loc=loc_;
   1071 
   1072 make_window();
   1073 \#ifdef NTK_GUI
   1074 adsynenabledcheck->selection_color(55);
   1075 subsynenabledcheck->selection_color(55);
   1076 padsynenabledcheck->selection_color(55);
   1077 \#endif
   1078 partgroup->position(this->parent()->x()+2,this->parent()->y()+2);
   1079 partgroup->show();
   1080 end();
   1081 
   1082 
   1083 //if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show();
   1084 } {}
   1085   }
   1086   Function {cleanuplastkit(int kititem)} {open return_type int
   1087   } {
   1088     code {
   1089 if (kititem==lastkititem)
   1090   return 0;
   1091 delete adnoteui;
   1092 delete subnoteui;
   1093 delete padnoteui;
   1094 adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
   1095 lastkititem=kititem;
   1096 
   1097 if(kititem>=NUM_KIT_ITEMS) return 1;//bad kit item
   1098 if(kititem<0) return 1;
   1099 return 0;
   1100 } {}}
   1101 
   1102 
   1103   Function {showparameters(int kititem,int engine)} {open
   1104   } {
   1105     code {
   1106 if (engine==-1){//this is used if I want to clear the engine from the part
   1107     //if (kititem==lastkititem) kititem=-1;
   1108     //else kititem=lastkititem;
   1109     delete adnoteui;
   1110     delete subnoteui;   
   1111     delete padnoteui;
   1112     adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
   1113     return;
   1114 }
   1115 
   1116     if (cleanuplastkit(kititem))
   1117         return;
   1118 
   1119 if(!adnoteui  && engine==0)//adsynenabledcheck->value())
   1120     adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc);
   1121 
   1122 if(!subnoteui && engine==1)//subsynenabledcheck->value()) 
   1123     subnoteui=new SUBnoteUI(osc, loc+"kit"+to_s(kititem)+"/subpars/");
   1124 
   1125 if(!padnoteui && engine==2)//padsynenabledcheck->value()) 
   1126     padnoteui=new PADnoteUI(loc+"kit"+to_s(kititem)+"/padpars/", osc);
   1127 
   1128 if (engine==0&&adnoteui) adnoteui->ADnoteGlobalParameters->show();
   1129 if (engine==1&&subnoteui) subnoteui->SUBparameters->show();
   1130 if (engine==2&&padnoteui) padnoteui->padnotewindow->show();} {}
   1131   }
   1132   Function {showvoiceparams(int kititem, bool voicelist)} {open
   1133   } {
   1134     code {
   1135 if (cleanuplastkit(kititem))
   1136     return;
   1137 if(adnoteui ||
   1138    (adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc))) {
   1139     if(voicelist)
   1140         adnoteui->ADnoteVoiceList->show();
   1141     else {
   1142         if (adnoteui->advoice->mod_type->value() == 0)
   1143             adnoteui->advoice->voiceFMparametersgroup->deactivate();
   1144         else
   1145             adnoteui->advoice->voiceFMparametersgroup->activate();
   1146         adnoteui->ADnoteVoice->show();
   1147     }}} {}}
   1148 
   1149   Function {~PartUI()} {} {
   1150     code {delete adnoteui;
   1151 delete subnoteui;
   1152 delete padnoteui;
   1153 
   1154 partgroup->hide();
   1155 //delete(partgroup);
   1156 
   1157 ctlwindow->hide();
   1158 delete(ctlwindow);
   1159 
   1160 partfx->hide();
   1161 delete(partfx);
   1162 
   1163 instrumentkitlist->hide();
   1164 delete(instrumentkitlist);
   1165 
   1166 instrumenteditwindow->hide();
   1167 delete(instrumenteditwindow);} {}
   1168   }
   1169   decl {BankUI *bankui;} {private local
   1170   }
   1171   decl {ADnoteUI *adnoteui;} {selected public local
   1172   }
   1173   decl {SUBnoteUI *subnoteui;} {private local
   1174   }
   1175   decl {PADnoteUI *padnoteui;} {private local
   1176   }
   1177   decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {private local
   1178   }
   1179   decl {int npart;} {private local
   1180   }
   1181   decl {int ninseff;} {private local
   1182   }
   1183   decl {int lastkititem;} {private local
   1184   }
   1185   decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {private local
   1186   }
   1187   decl {std::string part_path;} {private local
   1188   }
   1189   decl {std::string loc;} {private local
   1190   }
   1191   decl {Fl_Osc_Interface *osc;} {private local
   1192   }
   1193   Function {rebase(std::string new_loc)} {open
   1194   } {
   1195     code {
   1196     loc = new_loc;
   1197     partgroupui->rebase(new_loc);
   1198 ctlwindow->rebase(new_loc+"ctl/");
   1199 partfx->rebase(new_loc);
   1200 instrumentkitlist->rebase(new_loc);
   1201 instrumenteditwindow->rebase(new_loc);
   1202 partenablebutton->rebase(new_loc);
   1203 int next_part = 0;
   1204 const char *tmp = new_loc.c_str();
   1205 while(*tmp && !isdigit(*tmp)) tmp++;
   1206 next_part = atoi(tmp);
   1207 for (int i=0;i<NUM_SYS_EFX;i++)
   1208     psyef[i]->rebase(next_part);
   1209 } {selected
   1210     }
   1211   }
   1212 }