1# data file for the Fltk User Interface Designer (fluid) 2version 1.0302 3header_name {.h} 4code_name {.cc} 5decl {//Copyright (c) 2002-2005 Nasca Octavian Paul} {private local 6} 7 8decl {//License: GNU GPL version 2 or later} {private local 9} 10 11decl {\#include <stdlib.h>} {public local 12} 13 14decl {\#include <stdio.h>} {public local 15} 16 17decl {\#include <string.h>} {public local 18} 19 20decl {\#include <string>} {public local 21} 22 23decl {\#include "Fl_Osc_Dial.H"} {public local 24} 25 26decl {\#include "Fl_Osc_Input.H"} {public local 27} 28 29decl {\#include "PartNameButton.h"} {public local 30} 31 32decl {\#include "EffUI.h"} {public local 33} 34 35decl {\#include "BankUI.h"} {public local 36} 37 38decl {\#include "ADnoteUI.h"} {public local 39} 40 41decl {\#include "SUBnoteUI.h"} {public local 42} 43 44decl {\#include "PADnoteUI.h"} {public local 45} 46 47decl {\#include "../Misc/Config.h"} {public local 48} 49 50decl {\#include "../Misc/Master.h"} {public local 51} 52 53decl {\#include "../Misc/Part.h"} {public local 54} 55 56class 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[10];snprintf(tmp,10,"%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; 77npart=0;} {} 78 } 79 Function {init(int npart_,int neff_)} {} { 80 code {npart=npart_; 81neff=neff_; 82make_window(); 83syseffsend->show(); 84end();} {} 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 108class 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"); 128minkcounter->update(); 129maxkcounter->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"); 136minkcounter->update(); 137maxkcounter->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); 144minkcounter->do_callback(); 145maxkcounter->value(127); 146maxkcounter->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 220if (o->value()==0 && !o->is_osc) 221 answer=fl_choice("Delete the item?","No","Yes",NULL); 222if(!answer) 223 o->value(true); 224 225if (o->value()==0) partkititemgroup->deactivate(); 226else partkititemgroup->activate(); 227o->redraw(); 228partui->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,10,"%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)+"/"; 246partui=partui_; 247make_window(); 248if (n == 0) 249 mutedcheck->deactivate(); 250else 251 deactivate(); 252 253//partkititem->show(); 254end();} {} 255 } 256 Function {~PartKitItem()} {} { 257 code {} {} 258 } 259 decl {int n;} {private local 260 } 261 decl {char label[10];} {private local 262 } 263 decl {class PartUI *partui;} {private local 264 } 265} 266 267class 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', -64);} 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(); 304if (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 code2 {o->range(0,127);} 419 class Fl_Osc_Counter 420 } 421 Fl_Choice {} { 422 label {Mode :} 423 tooltip {Poly, Mono or Legato mode} xywh {80 130 64 18} down_box BORDER_BOX labelfont 1 labelsize 11 textfont 1 textsize 10 424 code0 {o->add("Poly"); o->add("Mono"); o->add("Legato");} 425 code1 {o->init("polyType");} 426 class Fl_Osc_Choice 427 } {} 428 } 429 Fl_Check_Button partenablebutton { 430 label Enabled 431 callback {if (o->value()==0) partgroupui->deactivate(); 432 else partgroupui->activate();} 433 xywh {90 5 75 20} down_box DOWN_BOX labelfont 1 labelsize 11 434 code0 {o->init("Penabled");} 435 class Fl_Osc_Check 436 } 437 } 438 Fl_Window ctlwindow { 439 label Controllers 440 private xywh {777 376 500 135} type Double box NO_BOX 441 class Fl_Osc_Window visible 442 } { 443 Fl_Box {} { 444 xywh {0 0 0 0} 445 code0 {ctlwindow->init(osc,"/part"+to_s(npart)+"/ctl/");} 446 } 447 Fl_Check_Button {} { 448 label Expr 449 tooltip {Expression enable} xywh {155 58 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 450 code0 {o->init("expression.receive");} 451 class Fl_Osc_Check 452 } 453 Fl_Dial {} { 454 label PanDpth 455 tooltip {Panning Depth} xywh {10 55 30 30} labelsize 10 maximum 127 step 1 456 code0 {o->init("panning.depth");o->reset_value=64;} 457 class Fl_Osc_Dial 458 } 459 Fl_Dial {} { 460 label FltCut 461 tooltip {Filter Cutoff depth} xywh {90 55 30 30} labelsize 10 maximum 127 step 1 462 code0 {o->init("filtercutoff.depth");o->reset_value=64;} 463 class Fl_Osc_Dial 464 } 465 Fl_Dial {} { 466 label FltQ 467 tooltip {Filter Q depth} xywh {50 55 30 30} labelsize 10 maximum 127 step 1 468 code0 {o->init("filterq.depth");o->reset_value=64;} 469 class Fl_Osc_Dial 470 } 471 Fl_Dial {} { 472 label BwDpth 473 tooltip {BandWidth depth} xywh {125 10 30 30} labelsize 10 maximum 127 step 1 474 code0 {o->init("bandwidth.depth");o->reset_value=64;} 475 class Fl_Osc_Dial 476 } 477 Fl_Dial {} { 478 label ModWh 479 tooltip {Modulation Wheel depth} xywh {50 10 30 30} labelsize 10 maximum 127 step 1 480 code0 {o->init("modwheel.depth");o->reset_value=80;} 481 class Fl_Osc_Dial 482 } 483 Fl_Check_Button benddir { 484 label Downward 485 callback {if (o->value()) {bendrng->oscMove("pitchwheel.bendrange_down");} 486else {bendrng->oscMove("pitchwheel.bendrange");}} 487 xywh {205 37 69 15} down_box DOWN_BOX labelsize 10 488 } 489 Fl_Counter bendrng { 490 label {PWheelB.Rng (% semitone)} 491 tooltip {Pitch Wheel Bend Range (cents of semitone)} xywh {165 15 110 20} labelsize 10 align 1 minimum -6400 maximum 6400 step 1 492 code0 {o->init("pitchwheel.bendrange", 'i');} 493 code1 {o->lstep(100);} 494 class Fl_Osc_Counter 495 } 496 Fl_Check_Button bendsplt { 497 label Split 498 callback {if(o->value()) {benddir->activate();} 499 else {benddir->deactivate(); benddir->value(0); benddir->do_callback();}} 500 xywh {167 37 38 15} down_box DOWN_BOX labelsize 10 501 code0 {o->init("pitchwheel.is_split");} 502 class Fl_Osc_Check 503 } 504 Fl_Check_Button {} { 505 label FMamp 506 tooltip {FM amplitude enable} xywh {205 58 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 507 code0 {o->init("fmamp.receive");} 508 class Fl_Osc_Check 509 } 510 Fl_Check_Button {} { 511 label Vol 512 tooltip {Volume enable} xywh {155 83 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 513 code0 {o->init("volume.receive");} 514 class Fl_Osc_Check 515 } 516 Fl_Check_Button {} { 517 label Sustain 518 callback {//TODO 519 /*if (ctl.sustain.receive==0) { 520 ReleaseSustainedKeys(); 521 ctl.setsustain(0); 522 };*/} 523 tooltip {Sustain pedal enable} xywh {205 83 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 524 code0 {o->init("sustain.receive");} 525 class Fl_Osc_Check 526 } 527 Fl_Button {} { 528 label Close 529 callback {ctlwindow->hide();} 530 xywh {400 110 95 20} box THIN_UP_BOX 531 } 532 Fl_Button {} { 533 label {Reset all controllers} 534 callback {o->oscWrite("defaults");//part->SetController(C_resetallcontrollers,0); 535 ctlwindow->update(); 536 } 537 xywh {5 110 210 20} box THIN_UP_BOX 538 class Fl_Osc_Button 539 } 540 Fl_Group {} { 541 label Portamento open 542 xywh {280 15 160 90} box UP_FRAME labelsize 10 543 class Fl_Osc_Group 544 } { 545 Fl_Check_Button {} { 546 label Rcv 547 tooltip {Receive Portamento Controllers} xywh {285 20 40 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10 548 code0 {o->init("portamento.receive");} 549 class Fl_Osc_Check 550 } 551 Fl_Dial {} { 552 label time 553 tooltip {Portamento time} xywh {285 60 25 25} labelsize 10 maximum 127 step 1 554 code0 {o->init("portamento.time");o->reset_value=64;} 555 class Fl_Osc_Dial 556 } 557 Fl_Counter {} { 558 label thresh 559 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 560 code0 {o->init("portamento.pitchthresh");} 561 class Fl_Osc_Counter 562 } 563 Fl_Check_Button {} { 564 label {th.type} 565 tooltip {Threshold type (min/max)} xywh {365 70 15 15} down_box DOWN_BOX labelsize 10 align 2 566 code0 {o->init("portamento.pitchthreshtype");} 567 class Fl_Osc_Check 568 } 569 Fl_Box {} { 570 label {x100 cnt.} 571 xywh {340 50 55 15} labelsize 10 align 16 572 } 573 Fl_Dial {} { 574 label {t.dn/up} 575 tooltip {Portamento time stretch (up/down)} xywh {315 60 25 25} labelsize 10 maximum 127 step 1 576 code0 {o->init("portamento.updowntimestretch");o->reset_value=64;} 577 class Fl_Osc_Dial 578 } 579 Fl_Dial propta { 580 label {Prp.Rate} 581 tooltip {Distance required to double change from nonpropotinal portamento time} xywh {405 20 25 25} labelsize 9 maximum 127 step 1 582 code0 {o->init("portamento.propRate");o->reset_value=80;} 583 class Fl_Osc_Dial 584 } 585 Fl_Dial proptb { 586 label {Prp.Dpth} 587 tooltip {The difference from nonproportinal portamento} xywh {405 60 25 25} labelsize 9 maximum 127 step 1 588 code0 {o->init("portamento.propDepth");o->reset_value=90;} 589 class Fl_Osc_Dial 590 } 591 Fl_Check_Button {} { 592 label {Proprt.} 593 callback {if(o->value()){propta->activate();proptb->activate();} 594else {propta->deactivate();proptb->deactivate();}} 595 tooltip {Enable Proportinal Portamento (over fixed Portamento)} xywh {285 40 50 15} box THIN_UP_BOX down_box DOWN_BOX labelsize 9 596 code0 {o->init("portamento.proportional");} 597 class Fl_Osc_Check 598 } 599 } 600 Fl_Group {} { 601 label Resonance 602 xywh {445 15 50 90} box UP_FRAME labelsize 10 603 class Fl_Osc_Group 604 } { 605 Fl_Dial {} { 606 label BWdpth 607 tooltip {BandWidth controller depth} xywh {455 60 25 25} labelsize 10 maximum 127 step 1 608 code0 {o->init("resonancebandwidth.depth");o->reset_value=64;} 609 class Fl_Osc_Dial 610 } 611 Fl_Dial {} { 612 label CFdpth 613 tooltip {Center Frequency controller Depth} xywh {455 20 25 25} labelsize 10 maximum 127 step 1 614 code0 {o->init("resonancecenter.depth");o->reset_value=64;} 615 class Fl_Osc_Dial 616 } 617 } 618 Fl_Check_Button {} { 619 label {Exp MWh} 620 tooltip {Exponential modulation wheel} xywh {10 15 40 25} down_box DOWN_BOX labelsize 10 align 148 621 code0 {o->init("modwheel.exponential");} 622 class Fl_Osc_Check 623 } 624 Fl_Check_Button {} { 625 label {Exp BW} 626 tooltip {Exponential BandWidth Controller} xywh {85 15 35 25} down_box DOWN_BOX labelsize 10 align 148 627 code0 {o->init("bandwidth.exponential");} 628 class Fl_Osc_Check 629 } 630 } 631 Fl_Window partfx { 632 label {Part's Insert Effects} 633 private xywh {569 775 390 145} type Double box NO_BOX 634 class Fl_Osc_Window visible 635 } { 636 Fl_Box {} { 637 xywh {0 0 0 0} 638 code0 {partfx->init(osc, part_path);} 639 } 640 Fl_Counter inseffnocounter { 641 label {FX No.} 642 callback {ninseff=(int) o->value()-1; 643 insefftype->oscMove("partefx"+to_s(ninseff)+"/efftype"); 644 inseffectuigroup->reext("partefx"+to_s(ninseff)+"/"); 645 bypasseff->oscMove("Pefxbypass"+to_s(ninseff)); 646 sendtochoice->oscMove("Pefxroute"+to_s(ninseff)); 647/*insefftype->value(part->partefx[ninseff]->geteffect());*/ 648//insefftype->do_callback(); 649inseffectui->refresh(); 650int x=127;/*part->Pefxroute[ninseff];*/ 651if (x==127) x=1; 652 653sendtochoice->value(x);} 654 xywh {5 110 80 20} type Simple labelfont 1 align 6 minimum 1 maximum 127 step 1 textfont 1 655 code0 {o->bounds(1,NUM_PART_EFX);} 656 code1 {o->value(ninseff+1);} 657 } 658 Fl_Choice insefftype { 659 label EffType 660 callback {inseffectui->efftype = o->value(); 661inseffectui->refresh();} 662 xywh {155 110 70 15} down_box BORDER_BOX labelsize 10 align 6 663 code0 {o->init(("partefx"+to_s(ninseff)+"/efftype").c_str());} 664 class Fl_Osc_Choice 665 } { 666 MenuItem {} { 667 label {No Effect} 668 xywh {35 35 100 20} labelfont 1 labelsize 10 669 } 670 MenuItem {} { 671 label Reverb 672 xywh {45 45 100 20} labelfont 1 labelsize 10 673 } 674 MenuItem {} { 675 label Echo 676 xywh {55 55 100 20} labelfont 1 labelsize 10 677 } 678 MenuItem {} { 679 label Chorus 680 xywh {65 65 100 20} labelfont 1 labelsize 10 681 } 682 MenuItem {} { 683 label Phaser 684 xywh {70 70 100 20} labelfont 1 labelsize 10 685 } 686 MenuItem {} { 687 label AlienWah 688 xywh {80 80 100 20} labelfont 1 labelsize 10 689 } 690 MenuItem {} { 691 label Distortion 692 xywh {90 90 100 20} labelfont 1 labelsize 10 693 } 694 MenuItem {} { 695 label EQ 696 xywh {100 100 100 20} labelfont 1 labelsize 10 697 } 698 MenuItem {} { 699 label DynFilter 700 xywh {110 110 100 20} labelfont 1 labelsize 10 701 } 702 } 703 Fl_Group inseffectuigroup { 704 xywh {5 5 380 100} box FLAT_BOX color 48 705 class Fl_Osc_Group 706 } { 707 Fl_Box {} { 708 xywh {0 0 0 0} 709 code0 {inseffectuigroup->ext = "partefx0/";} 710 } 711 Fl_Group inseffectui { 712 xywh {5 5 380 95} 713 code0 {o->init(true);} 714 class EffUI 715 } {} 716 } 717 Fl_Button {} { 718 label Close 719 callback {partfx->hide();} 720 xywh {325 115 60 20} box THIN_UP_BOX 721 } 722 Fl_Choice sendtochoice { 723 label {Send To.} 724 callback {(void)o;/*int x=(int) o->value(); 725part->Pefxroute[ninseff]=x; 726if (x==2) part->partefx[ninseff]->setdryonly(true); 727 else part->partefx[ninseff]->setdryonly(false);*/} 728 xywh {235 110 80 15} down_box BORDER_BOX labelsize 10 align 6 729 code0 {/*int x=part->Pefxroute[ninseff]; if (x==127) x=1;*/} 730 code1 {o->init(("Pefxroute"+to_s(ninseff)).c_str());} 731 class Fl_Osc_Choice 732 } { 733 MenuItem {} { 734 label {Next Effect} 735 xywh {45 45 100 20} labelfont 1 labelsize 10 736 } 737 MenuItem {} { 738 label {Part Out} 739 xywh {55 55 100 20} labelfont 1 labelsize 10 740 } 741 MenuItem {} { 742 label {Dry Out} 743 xywh {65 65 100 20} labelfont 1 labelsize 10 744 } 745 } 746 Fl_Check_Button bypasseff { 747 label bypass 748 tooltip {if the effect is not used (is bypassed)} xywh {90 110 60 15} down_box DOWN_BOX labelsize 11 749 code0 {o->init("Pefxbypass"+to_s(ninseff));} 750 class Fl_Osc_Check 751 } 752 Fl_Button {} { 753 label C 754 callback {presetsui->copy(partfx->loc()+"partefx"+to_s(ninseff)+"/");} 755 xywh {90 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 756 } 757 Fl_Button {} { 758 label P 759 callback {presetsui->paste(partfx->loc()+"partefx"+to_s(ninseff)+"/",inseffectui);} 760 xywh {120 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 761 } 762 } 763 Fl_Window instrumentkitlist { 764 label {Instrument Kit} 765 xywh {601 611 670 370} type Double box NO_BOX 766 class Fl_Osc_Window visible 767 } { 768 Fl_Box {} { 769 xywh {0 0 0 0} 770 code0 {instrumentkitlist->init(osc, "/part"+to_s(npart)+"/");} 771 } 772 Fl_Button {} { 773 label {Close Window} 774 callback {instrumentkitlist->hide();} 775 xywh {255 350 160 20} box THIN_UP_BOX 776 } 777 Fl_Scroll kitlist {open 778 xywh {0 15 670 330} type VERTICAL box UP_FRAME 779 } { 780 Fl_Pack {} { 781 xywh {0 20 670 320} 782 code0 {for (int i=0;i<NUM_KIT_ITEMS;i++){partkititem[i]=new PartKitItem(0,0,670,20);partkititem[i]->init(i,this);}} 783 } {} 784 } 785 Fl_Box {} { 786 label {No.} 787 xywh {5 0 25 15} labelfont 1 labelsize 11 align 18 788 } 789 Fl_Box {} { 790 label {M.} 791 xywh {55 0 25 15} labelfont 1 labelsize 11 align 18 792 } 793 Fl_Box {} { 794 label {Min.k} 795 xywh {235 0 40 15} labelfont 1 labelsize 11 align 18 796 } 797 Fl_Box {} { 798 label {Max.k} 799 xywh {345 0 40 15} labelfont 1 labelsize 11 align 18 800 } 801 Fl_Box {} { 802 label ADsynth 803 xywh {405 0 50 15} labelfont 1 labelsize 11 align 18 804 } 805 Fl_Box {} { 806 label SUBsynth 807 xywh {470 0 60 15} labelfont 1 labelsize 11 align 18 808 } 809 Fl_Choice {} { 810 label Mode 811 callback {if (o->value()==0) { 812 for (int i=1;i<NUM_KIT_ITEMS;i++) 813 partkititem[i]->deactivate(); 814 partkititem[0]->mutedcheck->deactivate(); 815 } else { 816 for (int i=1;i<NUM_KIT_ITEMS;i++) 817 partkititem[i]->activate(); 818 partkititem[0]->mutedcheck->activate(); };} 819 xywh {35 350 70 15} down_box BORDER_BOX labelsize 11 textfont 1 textsize 11 820 code0 {o->init("Pkitmode");} 821 class Fl_Osc_Choice 822 } { 823 MenuItem {} { 824 label OFF 825 xywh {0 0 100 20} labelfont 1 labelsize 11 826 } 827 MenuItem {} { 828 label MULTI 829 xywh {10 10 100 20} labelfont 1 labelsize 11 830 } 831 MenuItem {} { 832 label SINGLE 833 xywh {20 20 100 20} labelfont 1 labelsize 11 834 } 835 } 836 Fl_Check_Button {} { 837 label {Drum mode} 838 xywh {125 350 80 15} down_box DOWN_BOX labelsize 10 839 code0 {o->init("Pdrummode");} 840 class Fl_Osc_Check 841 } 842 Fl_Button {} { 843 label Comments 844 callback {instrumenteditwindow->show();} 845 xywh {481 350 106 20} box THIN_UP_BOX 846 } 847 Fl_Button {} { 848 label Effects 849 callback {partfx->show();} selected 850 xywh {600 350 70 20} box THIN_UP_BOX 851 } 852 853 Fl_Box {} { 854 label {FX.r.} 855 xywh {620 0 30 15} labelfont 1 labelsize 11 align 18 856 } 857 Fl_Box {} { 858 label PADsynth 859 xywh {540 0 60 15} labelfont 1 labelsize 11 align 18 860 } 861 } 862 Fl_Window instrumenteditwindow { 863 label {Instrument Edit} open 864 xywh {262 621 395 360} type Double box NO_BOX 865 class Fl_Osc_Window visible 866 } { 867 Fl_Box {} { 868 xywh {0 0 0 0} 869 code0 {instrumenteditwindow->init(osc, "/part"+to_s(npart)+"/");} 870 } 871 Fl_Group editgroup { 872 xywh {0 220 395 110} box UP_FRAME 873 class Fl_Osc_Group 874 } { 875 Fl_Box {} { 876 xywh {0 220 0 0} 877 code0 {editgroup->ext = "kit0/";} 878 } 879 Fl_Group {} { 880 label PADsynth 881 xywh {205 245 100 80} box ENGRAVED_FRAME labelfont 1 882 } { 883 Fl_Button padeditbutton { 884 label Edit 885 callback {showparameters(0,2);} 886 xywh {215 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 887 } 888 Fl_Check_Button padsynenabledcheck { 889 label Enabled 890 callback {if (o->value()==0) padeditbutton->deactivate(); 891 else padeditbutton->activate();} 892 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 893 code1 {o->init("Ppadenabled");} 894 class Fl_Osc_Check 895 } 896 } 897 Fl_Group {} { 898 label ADsynth 899 xywh {5 245 100 80} box ENGRAVED_FRAME labelfont 1 900 } { 901 Fl_Check_Button adsynenabledcheck { 902 label Enabled 903 callback {if (o->value()==0) adeditbutton->deactivate(); 904 else adeditbutton->activate();} 905 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 906 code1 {o->init("Padenabled");} 907 class Fl_Osc_Check 908 } 909 Fl_Button adeditbutton { 910 label Edit 911 callback { 912 if (Fl::event_shift()) { 913 showvoiceparams(0, true); 914 } else if (Fl::event_ctrl()) { 915 showvoiceparams(0, false); 916 } else 917 showparameters(0,0); 918 } 919 xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 920 } 921 } 922 Fl_Group {} { 923 label SUBsynth 924 xywh {105 245 100 80} box ENGRAVED_FRAME labelfont 1 925 } { 926 Fl_Check_Button subsynenabledcheck { 927 label Enabled 928 callback {if (o->value()==0) subeditbutton->deactivate(); 929 else subeditbutton->activate();} 930 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 931 code1 {o->init("Psubenabled");} 932 class Fl_Osc_Check 933 } 934 Fl_Button subeditbutton { 935 label Edit 936 callback {showparameters(0,1);} 937 xywh {115 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128 938 } 939 } 940 Fl_Button {} { 941 label {Kit Edit} 942 callback {instrumentkitlist->show();} 943 xywh {310 245 80 35} color 51 selection_color 51 labelfont 1 align 128 944 } 945 Fl_Button {} { 946 label Effects 947 callback {partfx->show();} 948 xywh {310 290 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 949 } 950 } 951 Fl_Group {} { 952 xywh {0 5 395 215} box UP_FRAME 953 } { 954 Fl_Input {} { 955 label {Author and Copyright} 956 xywh {5 60 385 50} type Multiline color 124 labelsize 10 align 5 957 code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);} 958 code1 {o->init("info.Pauthor");} 959 callback { o->oscWrite(o->ext, "s", o->value()); } 960 class Fl_Osc_Input 961 } 962 Fl_Input {} { 963 label Comments 964 xywh {5 125 385 90} type Multiline color 124 labelsize 11 align 5 965 code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);} 966 code1 {o->init("info.Pcomments");} 967 callback { o->oscWrite(o->ext, "s", o->value()); } 968 class Fl_Osc_Input 969 } 970 Fl_Choice {} { 971 label {Type:} 972 xywh {5 25 155 20} down_box BORDER_BOX labelfont 1 labelsize 11 align 5 textsize 10 973 code0 {o->init("info.Ptype");} 974 class Fl_Osc_Choice 975 } { 976 MenuItem {} { 977 label {--------------------------} 978 xywh {20 20 100 20} labelfont 1 labelsize 11 979 } 980 MenuItem {} { 981 label Piano 982 xywh {10 10 100 20} labelfont 1 labelsize 11 983 } 984 MenuItem {} { 985 label {Chromatic Percussion} 986 xywh {20 20 100 20} labelfont 1 labelsize 11 987 } 988 MenuItem {} { 989 label Organ 990 xywh {30 30 100 20} labelfont 1 labelsize 11 991 } 992 MenuItem {} { 993 label Guitar 994 xywh {40 40 100 20} labelfont 1 labelsize 11 995 } 996 MenuItem {} { 997 label Bass 998 xywh {50 50 100 20} labelfont 1 labelsize 11 999 } 1000 MenuItem {} { 1001 label {Solo Strings} 1002 xywh {60 60 100 20} labelfont 1 labelsize 11 1003 } 1004 MenuItem {} { 1005 label Ensemble 1006 xywh {70 70 100 20} labelfont 1 labelsize 11 1007 } 1008 MenuItem {} { 1009 label Brass 1010 xywh {80 80 100 20} labelfont 1 labelsize 11 1011 } 1012 MenuItem {} { 1013 label Reed 1014 xywh {90 90 100 20} labelfont 1 labelsize 11 1015 } 1016 MenuItem {} { 1017 label Pipe 1018 xywh {100 100 100 20} labelfont 1 labelsize 11 1019 } 1020 MenuItem {} { 1021 label {Synth Lead} 1022 xywh {110 110 100 20} labelfont 1 labelsize 11 1023 } 1024 MenuItem {} { 1025 label {Synth Pad} 1026 xywh {120 120 100 20} labelfont 1 labelsize 11 1027 } 1028 MenuItem {} { 1029 label {Synth Effects} 1030 xywh {130 130 100 20} labelfont 1 labelsize 11 1031 } 1032 MenuItem {} { 1033 label Ethnic 1034 xywh {140 140 100 20} labelfont 1 labelsize 11 1035 } 1036 MenuItem {} { 1037 label Percussive 1038 xywh {150 150 100 20} labelfont 1 labelsize 11 1039 } 1040 MenuItem {} { 1041 label {Sound Effects} 1042 xywh {160 160 100 20} labelfont 1 labelsize 11 1043 } 1044 } 1045 } 1046 Fl_Button {} { 1047 label Close 1048 callback {instrumenteditwindow->hide();} 1049 xywh {150 335 95 25} box THIN_UP_BOX 1050 } 1051 } 1052 } 1053 Function {PartUI(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {open 1054 } { 1055 code {adnoteui=NULL; 1056subnoteui=NULL; 1057padnoteui=NULL; 1058lastkititem=-1;} {} 1059 } 1060 Function {init(std::string part_path_, int npart_,BankUI *bankui_, std::string loc_, Fl_Osc_Interface *osc_)} {open 1061 } { 1062 code {assert(osc_); 1063assert(!loc_.empty()); 1064 1065bankui=bankui_; 1066part_path = part_path_; 1067base = part_path; 1068npart=npart_; 1069ninseff=0; 1070osc=osc_; 1071loc=loc_; 1072 1073make_window(); 1074\#ifdef NTK_GUI 1075adsynenabledcheck->selection_color(55); 1076subsynenabledcheck->selection_color(55); 1077padsynenabledcheck->selection_color(55); 1078\#endif 1079partgroup->position(this->parent()->x()+2,this->parent()->y()+2); 1080partgroup->show(); 1081end(); 1082 1083 1084//if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show(); 1085} {} 1086 } 1087 Function {cleanuplastkit(int kititem)} {open return_type int 1088 } { 1089 code { 1090if (kititem==lastkititem) 1091 return 0; 1092delete adnoteui; 1093delete subnoteui; 1094delete padnoteui; 1095adnoteui=NULL;subnoteui=NULL;padnoteui=NULL; 1096lastkititem=kititem; 1097 1098if(kititem>=NUM_KIT_ITEMS) return 1;//bad kit item 1099if(kititem<0) return 1; 1100return 0; 1101} {}} 1102 1103 1104 Function {showparameters(int kititem,int engine)} {open 1105 } { 1106 code { 1107if (engine==-1){//this is used if I want to clear the engine from the part 1108 //if (kititem==lastkititem) kititem=-1; 1109 //else kititem=lastkititem; 1110 delete adnoteui; 1111 delete subnoteui; 1112 delete padnoteui; 1113 adnoteui=NULL;subnoteui=NULL;padnoteui=NULL; 1114 return; 1115} 1116 1117 if (cleanuplastkit(kititem)) 1118 return; 1119 1120if(!adnoteui && engine==0)//adsynenabledcheck->value()) 1121 adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc); 1122 1123if(!subnoteui && engine==1)//subsynenabledcheck->value()) 1124 subnoteui=new SUBnoteUI(osc, loc+"kit"+to_s(kititem)+"/subpars/"); 1125 1126if(!padnoteui && engine==2)//padsynenabledcheck->value()) 1127 padnoteui=new PADnoteUI(loc+"kit"+to_s(kititem)+"/padpars/", osc); 1128 1129if (engine==0&&adnoteui) adnoteui->ADnoteGlobalParameters->show(); 1130if (engine==1&&subnoteui) subnoteui->SUBparameters->show(); 1131if (engine==2&&padnoteui) padnoteui->padnotewindow->show();} {} 1132 } 1133 Function {showvoiceparams(int kititem, bool voicelist)} {open 1134 } { 1135 code { 1136if (cleanuplastkit(kititem)) 1137 return; 1138if(adnoteui || 1139 (adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc))) { 1140 if(voicelist) 1141 adnoteui->ADnoteVoiceList->show(); 1142 else { 1143 if (adnoteui->advoice->mod_type->value() == 0) 1144 adnoteui->advoice->voiceFMparametersgroup->deactivate(); 1145 else 1146 adnoteui->advoice->voiceFMparametersgroup->activate(); 1147 adnoteui->ADnoteVoice->show(); 1148 }}} {}} 1149 1150 Function {~PartUI()} {} { 1151 code {delete adnoteui; 1152delete subnoteui; 1153delete padnoteui; 1154 1155partgroup->hide(); 1156//delete(partgroup); 1157 1158ctlwindow->hide(); 1159delete(ctlwindow); 1160 1161partfx->hide(); 1162delete(partfx); 1163 1164instrumentkitlist->hide(); 1165delete(instrumentkitlist); 1166 1167instrumenteditwindow->hide(); 1168delete(instrumenteditwindow);} {} 1169 } 1170 decl {BankUI *bankui;} {private local 1171 } 1172 decl {ADnoteUI *adnoteui;} {selected public local 1173 } 1174 decl {SUBnoteUI *subnoteui;} {private local 1175 } 1176 decl {PADnoteUI *padnoteui;} {private local 1177 } 1178 decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {private local 1179 } 1180 decl {int npart;} {private local 1181 } 1182 decl {int ninseff;} {private local 1183 } 1184 decl {int lastkititem;} {private local 1185 } 1186 decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {private local 1187 } 1188 decl {std::string part_path;} {private local 1189 } 1190 decl {std::string loc;} {private local 1191 } 1192 decl {Fl_Osc_Interface *osc;} {private local 1193 } 1194 Function {rebase(std::string new_loc)} {open 1195 } { 1196 code { 1197 loc = new_loc; 1198 partgroupui->rebase(new_loc); 1199ctlwindow->rebase(new_loc+"ctl/"); 1200partfx->rebase(new_loc); 1201instrumentkitlist->rebase(new_loc); 1202instrumenteditwindow->rebase(new_loc); 1203partenablebutton->rebase(new_loc); 1204int next_part = 0; 1205const char *tmp = new_loc.c_str(); 1206while(*tmp && !isdigit(*tmp)) tmp++; 1207next_part = atoi(tmp); 1208for (int i=0;i<NUM_SYS_EFX;i++) 1209 psyef[i]->rebase(next_part); 1210} {selected 1211 } 1212 } 1213} 1214