ADnoteUI.fl (50069B)
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 "../Params/ADnoteParameters.h"} {public local 12 } 13 decl {\#include "ResonanceUI.h"} {public local 14 } 15 16 decl {\#include "Fl_Osc_Slider.H"} {public local 17 } 18 19 decl {\#include <FL/Fl_Box.H>} {public local 20 } 21 22 decl {\#include <FL/Fl_Group.H>} {public local 23 } 24 25 decl {\#include <cmath>} {private local 26 } 27 28 decl {\#include <cstdio>} {private local 29 } 30 31 decl {\#include <cstdlib>} {private local 32 } 33 34 decl {\#include <cstring>} {private local 35 } 36 37 decl {\#include "Fl_Osc_Pane.H"} {public local 38 } 39 40 decl {\#include "Fl_Osc_Dial.H"} {public local 41 } 42 43 decl {\#include "Fl_Osc_Check.H"} {public local 44 } 45 46 decl {\#include "Fl_Osc_Choice.H"} {public local 47 } 48 49 decl {\#include "Fl_Osc_Slider.H"} {public local 50 } 51 52 decl {\#include "Fl_Osc_VSlider.H"} {public local 53 } 54 55 decl {\#include "Osc_IntModel.h"} {private local 56 } 57 58 decl {\#include "Fl_Oscilloscope.h"} {public local 59 } 60 61 decl {\#include "EnvelopeUI.h"} {public local 62 } 63 64 decl {\#include "LFOUI.h"} {public local 65 } 66 67 decl {\#include "FilterUI.h"} {public local 68 } 69 70 decl {\#include "OscilGenUI.h"} {public local 71 } 72 73 decl {\#include "PresetsUI.h"} {public local 74 } 75 76 decl {\#include "PartUI.h"} {private local 77 } 78 79 decl {\#include "MasterUI.h"} {private local 80 } 81 82 decl {extern class MasterUI *ui;} {private local 83 } 84 85 class PhaseSlider {: {public Fl_Osc_TSlider} 86 } { 87 Function {PhaseSlider(int x,int y, int w, int h, const char *label=0) 88 :Fl_Osc_TSlider(x,y,w,h,label)} {open 89 } { code { 90 set_rounding(1); 91 reset_value=0; 92 set_transform([](float x){return 180.0f*x/64.0f;}); 93 } {}} 94 Function {set_scope(Fl_Oscilloscope *newscope)} { 95 } { code { oscope = newscope; } {} } 96 Function {OSC_value(int i)} {open return_type void 97 } { code { 98 value(64-i); 99 oscope->phase=i; 100 oscope->parent()->redraw(); 101 } {} } 102 Function {cb(void)} {open return_type void 103 } { code { 104 oscWrite(ext, "i", (int)(64-Fl_Slider::value())); 105 if(cb_data.first) 106 cb_data.first(this, cb_data.second); 107 } {} } 108 decl {Fl_Oscilloscope *oscope = NULL; } {private local} 109 } 110 111 112 class ADvoicelistitem {open : {public Fl_Osc_Group} 113 } { 114 Function {make_window()} {open private 115 } { 116 Fl_Window ADnoteVoiceListItem {open 117 private xywh {117 90 670 100} type Double box NO_BOX 118 class Fl_Osc_Group visible 119 } { 120 Fl_Box {} { 121 xywh {0 0 0 0} 122 code0 {ADnoteVoiceListItem->base = loc;} 123 } 124 Fl_Group voicelistitemgroup {open 125 private xywh {0 0 670 25} 126 class Fl_Osc_Group 127 } { 128 Fl_Value_Slider voicevolume { 129 tooltip Volume xywh {132 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 130 code1 {o->init("PVolume"); o->reset_value=100;} 131 class Fl_Osc_VSlider 132 } 133 Fl_Check_Button voiceresonanceenabled { 134 tooltip {Resonance On/Off} xywh {287 7 15 17} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 11 align 4 135 code0 {o->init("Presonance");} 136 class Fl_Osc_Check 137 } 138 Fl_Value_Slider voicelfofreq { 139 tooltip {Frequency LFO amount} xywh {542 5 115 20} type {Horz Knob} box NO_BOX labelsize 8 align 5 maximum 127 step 1 140 code0 {o->init("FreqLfo/Pintensity", 'i');o->reset_value=40;} 141 class Fl_Osc_VSlider 142 } 143 Fl_Dial voicepanning { 144 tooltip {Panning (leftmost is Random)} xywh {257 5 20 20} box ROUND_UP_BOX labelsize 10 align 4 maximum 127 step 1 145 code0 {o->init("PPanning");o->reset_value=64;} 146 class Fl_Osc_Dial 147 } 148 Fl_Group voiceoscil {open 149 xywh {102 5 30 20} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 150 code0 {voiceoscil->ext = "OscilSmp/";} 151 code1 {oscil=new Fl_Oscilloscope(o->x(),o->y()+1,o->w(),o->h(),"");} 152 code2 {oscil->init(false);} 153 class Fl_Osc_Group 154 } {} 155 Fl_Value_Output detunevalueoutput { 156 xywh {307 5 45 20} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 157 code0 {o->init("detunevalue");} 158 class Fl_Osc_Output 159 } 160 Fl_Slider voicedetune { 161 callback {detunevalueoutput->update();} 162 tooltip {Fine Detune (cents)} xywh {357 5 185 20} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 163 code0 {o->init("PDetune",'i');} 164 class Fl_Osc_Slider 165 } 166 Fl_Box whitenoiselabel { 167 label N 168 xywh {107 5 20 20} labelfont 1 labelsize 13 labelcolor 54 hide 169 } 170 Fl_Box pinknoiselabel { 171 label N 172 xywh {107 5 20 20} labelfont 1 labelsize 13 labelcolor 212 hide 173 } 174 } 175 Fl_Check_Button voiceenabled { 176 label 01 177 callback {if (o->value()==0) voicelistitemgroup->deactivate(); 178 else voicelistitemgroup->activate(); 179 o->redraw();} 180 private xywh {30 5 20 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 4 181 code0 {char tmp[12];snprintf(tmp,12,"%d",nvoice+1);o->label(strdup(tmp));} 182 code1 {o->init("Enabled");} 183 class Fl_Osc_Check 184 } 185 Fl_Button {} { 186 label edit 187 callback { 188 class ADnoteUI *adnoteui = ui->partui->adnoteui; 189 adnoteui->ADnoteVoice->show(); 190 adnoteui->currentvoicecounter->value(nvoice+1); 191 adnoteui->currentvoicecounter->do_callback(); 192 class ADvoiceUI *advoice = adnoteui->advoice; 193 if (advoice->mod_type->value() == 0) 194 advoice->voiceFMparametersgroup->deactivate(); 195 else 196 advoice->voiceFMparametersgroup->activate(); 197 } 198 xywh {53 6 40 15} box THIN_UP_BOX labelsize 11 199 } 200 } 201 } 202 Function {ADvoicelistitem(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {open 203 } { 204 code {assert(osc); 205 voice_phase = new Osc_IntModel(osc); 206 voice_phase->callback=[this](int phase) { 207 oscil->phase=phase; 208 voiceoscil->redraw(); 209 return; 210 }; 211 sound_type = new Osc_IntModel(osc); 212 sound_type->callback=[this](int voice_type) { 213 switch (voice_type) { 214 case 0: 215 whitenoiselabel->hide(); 216 pinknoiselabel->hide(); 217 oscil->Overlay = NULL; 218 voiceresonanceenabled->activate(); 219 detunevalueoutput->activate(); 220 voicedetune->activate(); 221 voicelfofreq->activate(); 222 voiceoscil->activate(); 223 return; 224 case 1: 225 whitenoiselabel->show(); 226 pinknoiselabel->hide(); 227 oscil->Overlay = whitenoiselabel; 228 break; 229 default: 230 pinknoiselabel->show(); 231 whitenoiselabel->hide(); 232 oscil->Overlay = pinknoiselabel; 233 } 234 235 voiceresonanceenabled->deactivate(); 236 detunevalueoutput->deactivate(); 237 voicedetune->deactivate(); 238 voicelfofreq->deactivate(); 239 voiceoscil->deactivate(); 240 }; 241 242 ext_oscil = new Osc_IntModel(osc); 243 ext_oscil->callback = [this](int ext) { 244 if(ext == -1) 245 voiceoscil->reext("OscilSmp/"); 246 else 247 voiceoscil->reext("../VoicePar"+to_s(ext)+"/OscilSmp/"); 248 }; 249 nvoice=0;} {} 250 } 251 Function {init(int nvoice_, std::string loc_, Fl_Osc_Interface *osc_)} {open 252 } { 253 code {assert(osc_); 254 assert(!loc_.empty()); 255 voice_phase->doUpdate(loc_ + "Poscilphase"); 256 sound_type->doUpdate(loc_ + "Type"); 257 ext_oscil->doUpdate(loc_ + "Pextoscil"); 258 259 nvoice=nvoice_; 260 loc = loc_; 261 make_window(); 262 ADnoteVoiceListItem->show(); 263 end();} {} 264 } 265 Function {refreshlist()} {open 266 } { 267 code {if (voiceenabled->value()==0) voicelistitemgroup->deactivate(); 268 else voicelistitemgroup->activate(); 269 detunevalueoutput->do_callback(); 270 ADnoteVoiceListItem->redraw();} {} 271 } 272 Function {~ADvoicelistitem()} {} { 273 code {ADnoteVoiceListItem->hide(); 274 delete voice_phase; 275 delete sound_type; 276 delete ext_oscil; 277 } {} 278 } 279 decl {int nvoice;} {private local 280 } 281 decl {class Osc_IntModel *voice_phase;} {private local 282 } 283 decl {class Osc_IntModel *sound_type;} {private local 284 } 285 decl {class Osc_IntModel *ext_oscil;} {private local 286 } 287 decl {Fl_Oscilloscope *oscil;} {private local 288 } 289 decl {std::string loc;} {private local 290 } 291 } 292 293 class ADvoiceUI {open : {public Fl_Group} 294 } { 295 Function {make_window()} {open 296 } { 297 Fl_Window ADnoteVoiceParameters { 298 label Voice open 299 xywh {512 391 765 595} type Double box NO_BOX 300 class Fl_Osc_Group visible 301 } { 302 Fl_Box {} { 303 label label 304 xywh {25 25 35 16} 305 code0 {ADnoteVoiceParameters->base = base+"VoicePar"+to_s(nvoice)+"/";} 306 code1 {ADnoteVoiceParameters->osc = osc_i;} 307 } 308 Fl_Group voiceparametersgroup {open 309 xywh {0 0 770 590} color 48 310 } { 311 Fl_Group voicemodegroup {open 312 xywh {0 5 770 585} color 64 313 } { 314 Fl_Group voiceFMparametersgroup { 315 label MODULATOR open 316 xywh {530 5 230 585} box UP_FRAME color 48 labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 317 } { 318 Fl_Group modfrequency { 319 label {Mod.FREQUENCY} 320 xywh {535 219 220 174} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 321 } { 322 Fl_Group voiceFMfreqenvgroup { 323 label {ADSynth Modulator - Frequency Envelope} 324 xywh {540 315 210 70} box FLAT_BOX color 51 align 144 325 code0 {o->init(ENV_ASR, osc_i, loc, "FMFreqEnvelope/");} 326 class EnvelopeUI 327 } {} 328 Fl_Check_Button {} { 329 label On 330 callback {if (o->value()==0) voiceFMfreqenvgroup->deactivate(); 331 else voiceFMfreqenvgroup->activate(); 332 o->redraw();} 333 tooltip {Forced Release} xywh {545 322 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 334 code0 {o->init("PFMFreqEnvelopeEnabled");} 335 class Fl_Osc_Check 336 } 337 Fl_Counter {} { 338 label {Coarse Det.} 339 tooltip {Coarse Detune} xywh {685 295 60 15} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 340 code0 {o->init("FMcoarsedetune");} 341 code3 {o->lstep(10);} 342 class Fl_Osc_Counter 343 } 344 Fl_Counter {} { 345 label Octave 346 tooltip Octave xywh {625 295 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 347 code0 {o->init("FMoctave");} 348 class Fl_Osc_Counter 349 } 350 Fl_Slider {} { 351 callback {fmdetunevalueoutput->update();} 352 tooltip {Fine Detune (cents)} xywh {590 245 155 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 353 code0 {o->init("PFMDetune", 'i');} 354 class Fl_Osc_Slider 355 } 356 Fl_Value_Output fmdetunevalueoutput { 357 label Detune 358 xywh {540 247 45 18} labelsize 8 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 8 359 code0 {o->init("FMdetunevalue");} 360 class Fl_Osc_Output 361 } 362 Fl_Choice {} { 363 label {Detune Type} 364 callback {fmdetunevalueoutput->update();} open 365 xywh {540 294 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 366 code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} 367 code1 {o->init("PFMDetuneType");} 368 class Fl_Osc_Choice 369 } {} 370 Fl_Check_Button {} { 371 label 440Hz 372 callback {if (o->value()==0) fixedfreqetdial->deactivate(); 373 else fixedfreqetdial->activate();} selected 374 tooltip {Set the modulator base frequency to 440Hz} xywh {683 266 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 375 code0 {o->init("PFMFixedFreq");} 376 class Fl_Osc_Check 377 } 378 } 379 Fl_Group {} { 380 label {Mod.AMPLITUDE} 381 xywh {535 60 220 160} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 382 } { 383 Fl_Value_Slider {} { 384 label Vol 385 tooltip Volume xywh {540 80 155 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 386 code0 {o->init("PFMVolume", 'i');o->reset_value=90;} 387 class Fl_Osc_VSlider 388 } 389 Fl_Value_Slider {} { 390 label {V.Sns} 391 tooltip {Velocity Sensing Function (rightmost to disable)} xywh {540 100 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 392 code0 {o->init("PFMVelocityScaleFunction");o->reset_value=64;} 393 class Fl_Osc_VSlider 394 } 395 Fl_Group voiceFMampenvgroup { 396 label {ADSynth Modulator - Amplitude Envelope} open 397 xywh {540 140 205 70} box FLAT_BOX color 51 align 144 398 code0 {o->init(//pars->VoicePar[nvoice].FMAmpEnvelope, 399 ENV_ADSR, osc_i, loc, "FMAmpEnvelope/");} 400 class EnvelopeUI 401 } {} 402 Fl_Check_Button {} { 403 label On 404 callback {if (o->value()==0) voiceFMampenvgroup->deactivate(); 405 else voiceFMampenvgroup->activate(); 406 o->redraw();} 407 tooltip {Forced Release} xywh {545 150 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 408 code0 {o->init("PFMAmpEnvelopeEnabled");} 409 class Fl_Osc_Check 410 } 411 Fl_Value_Slider {} { 412 label {F.Damp} 413 tooltip {Modulator Damp at Higher frequency} xywh {540 120 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 minimum -64 maximum 63 step 1 414 code0 {o->init("PFMVolumeDamp",'i');} 415 class Fl_Osc_VSlider 416 } 417 } 418 Fl_Group modoscil {open 419 xywh {535 390 220 195} 420 } { 421 Fl_Group fmoscil {open 422 xywh {535 445 220 140} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 423 code0 {fmoscil->base = loc; fmoscil->ext="FMSmp/";fmoscil->osc = osc_i;fmoscil->begin();} 424 code1 {oscFM=new Fl_Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} 425 code2 {//int nv=nvoice; if (pars->VoicePar[nvoice].PextFMoscil>=0) nv=pars->VoicePar[nvoice].PextFMoscil;} 426 code3 {oscFM->parent(fmoscil);oscFM->init(false);oscFM->update();fmoscil->end();} 427 class Fl_Osc_Group 428 } {} 429 Fl_Box {} { 430 label {Mod.Oscillator} 431 xywh {535 393 155 20} labelfont 1 align 20 432 } 433 Fl_Button changeFMoscilbutton { 434 label Change 435 callback {if (oscedit!=NULL) 436 delete(oscedit); 437 438 if(extFMoscil->value() == 0) 439 oscedit=new OscilEditor(true,loc+"FMSmp/", osc_i); 440 else 441 oscedit=new OscilEditor(true,loc+"../VoicePar"+to_s(extFMoscil->value()-1)+"/FMSmp/", osc_i);} 442 xywh {700 398 55 15} box THIN_UP_BOX labelfont 1 labelsize 11 443 code0 {(void)o;/*if (extFMoscil->value()>=0) o->labelcolor(FL_BLUE);*/} 444 } 445 Fl_Slider {} { 446 label Phase 447 xywh {645 425 105 15} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -63 maximum 64 step 1 448 code0 {o->init("PFMoscilphase", 'i'); o->set_scope(oscFM);} 449 class PhaseSlider 450 } 451 Fl_Choice extFMoscil { 452 label Use 453 callback {if ((int) o->value() != 0) { 454 oscFM->init(false); 455 changeFMoscilbutton->labelcolor(FL_BLUE); 456 } else { 457 oscFM->init(false); 458 changeFMoscilbutton->labelcolor(FL_BLACK); 459 }; 460 if(o->value() == 0) 461 fmoscil->rebase(loc); 462 else 463 fmoscil->rebase(loc+"../VoicePar"+to_s(o->value()-1)+"/"); 464 voiceFMparametersgroup->redraw();} open 465 xywh {560 420 75 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 466 code0 {o->add("Internal");} 467 code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtM.%2d",i+1);o->add(tmp);};} 468 code3 {o->init("PextFMoscil",-1);} 469 class Fl_Osc_Choice 470 } {} 471 } 472 Fl_Choice extMod { 473 label {External Mod.} 474 callback {if ((int) o->value() != 0) { 475 modoscil->deactivate(); 476 modfrequency->deactivate(); 477 } else { 478 modoscil->activate(); 479 modfrequency->activate(); 480 }; 481 voiceFMparametersgroup->redraw();} open 482 xywh {635 40 85 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 483 code0 {o->add("OFF");} 484 code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"ExtMod.%2d",i+1);o->add(tmp);};} 485 code2 {o->init("PFMVoice", -1);} 486 code3 {if ((int) o->value() != 0) {modoscil->deactivate();modfrequency->deactivate();}} 487 class Fl_Osc_Choice 488 } {} 489 } 490 Fl_Choice mod_type { 491 label {Type:} 492 callback {if (o->value()==0) voiceFMparametersgroup->deactivate(); 493 else voiceFMparametersgroup->activate(); 494 o->redraw();} 495 xywh {535 40 80 20} down_box BORDER_BOX align 5 496 code0 {o->init("PFMEnabled");} 497 class Fl_Osc_Choice 498 } { 499 MenuItem {} { 500 label OFF 501 xywh {40 40 100 20} labelfont 1 502 } 503 MenuItem {} { 504 label MORPH 505 xywh {50 50 100 20} labelfont 1 506 } 507 MenuItem {} { 508 label RING 509 xywh {60 60 100 20} labelfont 1 510 } 511 MenuItem {} { 512 label PM 513 xywh {70 70 100 20} labelfont 1 514 } 515 MenuItem {} { 516 label FM 517 xywh {80 80 100 20} labelfont 1 518 } 519 MenuItem {} { 520 label PWM 521 xywh {80 80 100 20} labelfont 1 522 } 523 } 524 Fl_Group {} { 525 label FREQUENCY open 526 xywh {5 265 525 120} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 527 } { 528 Fl_Group voicefreqenvgroup { 529 label {ADSynth Voice - Frequency Envelope} open 530 xywh {10 305 205 70} box FLAT_BOX color 51 align 144 531 code0 {o->init(//pars->VoicePar[nvoice].FreqEnvelope, 532 ENV_ASR, osc_i, loc, "FreqEnvelope/");} 533 class EnvelopeUI 534 } {} 535 Fl_Check_Button {} { 536 label On 537 callback {if (o->value()==0) voicefreqenvgroup->deactivate(); 538 else voicefreqenvgroup->activate(); 539 o->redraw();} 540 tooltip {Forced Release} xywh {15 310 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 541 code0 {o->init("PFreqEnvelopeEnabled");} 542 class Fl_Osc_Check 543 } 544 Fl_Group voicefreqlfogroup { 545 label {Frequency LFO } open 546 xywh {220 305 230 70} box FLAT_BOX color 47 align 144 547 code0 {o->init(osc_i, loc,"FreqLfo/");} 548 class LFOUI 549 } {} 550 Fl_Check_Button {} { 551 label On 552 callback {if (o->value()==0) voicefreqlfogroup->deactivate(); 553 else voicefreqlfogroup->activate(); 554 o->redraw();} 555 tooltip {Forced Release} xywh {225 311 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 556 code0 {o->init("PFreqLfoEnabled");} 557 class Fl_Osc_Check 558 } 559 Fl_Counter {} { 560 label Octave 561 tooltip Octave xywh {470 285 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 562 code0 {o->init("octave");} 563 class Fl_Osc_Counter 564 } 565 Fl_Counter {} { 566 label {Coarse Det.} 567 tooltip {Coarse Detune} xywh {455 355 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11 568 code0 {o->init("coarsedetune");} 569 code3 {o->lstep(10);} 570 class Fl_Osc_Counter 571 } 572 Fl_Dial bendadjdial { 573 label Bend 574 tooltip {How the frequency varies according to the pitch wheel} xywh {60 270 15 15} box ROUND_UP_BOX labelsize 10 align 8 minimum -64 maximum 63 step 1 575 code0 {o->init("PBendAdjust");o->reset_value=24;o->set_transform([](float x){return x/24.0f;});o->set_rounding(2);} 576 class Fl_Osc_Dial 577 } 578 Fl_Dial offsethzdial { 579 label Offset 580 tooltip {Offset of frequency in Hz} xywh {110 270 15 15} box ROUND_UP_BOX labelsize 10 align 8 minimum -64 maximum 63 step 1 581 code0 {o->init("POffsetHz"); o->set_rounding(2); o->set_transform([](float x){x/=64; return 15*(x*sqrtf(fabsf(x)));});} 582 class Fl_Osc_Dial 583 } 584 Fl_Slider {} { 585 callback {detunevalueoutput->update();} 586 tooltip {Fine Detune (cents)} xywh {58 287 392 13} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 587 code0 {o->init("PDetune", 'i');} 588 class Fl_Osc_Slider 589 } 590 Fl_Value_Output detunevalueoutput { 591 label Detune 592 code0 {o->init("detunevalue");} 593 xywh {10 287 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 594 class Fl_Osc_Output 595 } 596 Fl_Check_Button {} { 597 label 440Hz 598 callback {if (o->value()==0) fixedfreqetdial->deactivate(); 599 else fixedfreqetdial->activate();} 600 tooltip {Set the voice base frequency to 440Hz} xywh {345 268 55 15} down_box DOWN_BOX labelfont 1 labelsize 11 601 code0 {o->init("Pfixedfreq");} 602 class Fl_Osc_Check 603 } 604 Fl_Dial fixedfreqetdial { 605 label {Eq.T.} 606 tooltip {How the frequency varies according to the keyboard (leftmost for fixed frequency)} xywh {405 270 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1 607 code0 {o->init("PfixedfreqET");} 608 class Fl_Osc_Dial 609 } 610 Fl_Choice {} { 611 label {Detune Type} 612 callback {detunevalueoutput->update();} open 613 xywh {455 320 70 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 614 code0 {o->add("Default");o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} 615 code1 {o->init("PDetuneType");} 616 class Fl_Osc_Choice 617 } {} 618 } 619 Fl_Group voiceoscil { 620 xywh {80 390 445 145} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 621 code0 {voiceoscil->base = loc;voiceoscil->ext="OscilSmp/";voiceoscil->begin();//int nv=nvoice; if (extoscil->value()>=0) nv=extoscil->value();} 622 code1 {osc=new Fl_Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");} 623 code2 {voiceoscil->osc = osc_i;} 624 code3 {osc->parent(voiceoscil); osc->init(false);voiceoscil->end();} 625 class Fl_Osc_Group 626 } {} 627 Fl_Button changevoiceoscilbutton { 628 label Change 629 callback {delete oscedit; 630 if(extoscil->value() == 0) 631 oscedit=new OscilEditor(true,loc+"OscilSmp/", osc_i); 632 else 633 oscedit=new OscilEditor(true,loc+"../VoicePar"+to_s(extoscil->value()-1)+"/OscilSmp/", osc_i);} 634 xywh {5 490 65 20} box THIN_UP_BOX labelfont 1 labelsize 11 635 } 636 Fl_Box {} { 637 label {Voice Oscillator} 638 xywh {5 390 75 35} labelfont 1 labelsize 12 align 128 639 } 640 Fl_Slider {} { 641 label Phase 642 xywh {10 435 65 10} type {Horz Knob} box NO_BOX labelsize 10 align 5 minimum -63 maximum 64 step 1 643 code0 { o->init("Poscilphase", 'i'); o->set_scope(osc); } 644 class PhaseSlider 645 } 646 Fl_Check_Button {} { 647 label {R.} 648 tooltip {Resonance On/Off} xywh {210 5 35 35} box THIN_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 11 649 code0 {o->init("Presonance");} 650 class Fl_Osc_Check 651 } 652 Fl_Choice extoscil { 653 label {Use Oscil.} 654 callback {if ((int) o->value() != 0) { 655 osc->init(false); 656 changevoiceoscilbutton->labelcolor(FL_BLUE); 657 } else { 658 osc->init(false); 659 changevoiceoscilbutton->labelcolor(FL_BLACK); 660 }; 661 if(o->value() == 0) 662 voiceoscil->rebase(loc); 663 else 664 voiceoscil->rebase(loc+"../VoicePar"+to_s(o->value()-1)+"/"); 665 666 voiceparametersgroup->redraw(); 667 voiceonbutton->redraw();} open 668 xywh {5 470 65 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 669 code0 {o->add("Internal");} 670 code1 {char tmp[50]; for (int i=0;i<nvoice;i++) {sprintf(tmp,"Ext.%2d",i+1);o->add(tmp);};} 671 code3 {o->init("Pextoscil",-1);} 672 class Fl_Osc_Choice 673 } {} 674 Fl_Group {} {open 675 xywh {5 540 520 50} box UP_FRAME 676 } { 677 Fl_Dial {} { 678 label Vibrato 679 tooltip Vibrato xywh {364 555 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 680 code0 {o->init("Unison_vibratto");o->reset_value=64;} 681 class Fl_Osc_Dial 682 } 683 Fl_Choice {} { 684 label Invert 685 tooltip {Phase Invert} xywh {445 560 65 15} down_box BORDER_BOX labelsize 11 align 5 textfont 1 textsize 10 686 code0 {o->add("None");o->add("Random");char tmp[100];for (int i=2;i<=5;i++){snprintf(tmp,100,"%d %%",100/i);o->add(tmp);};} 687 code1 {o->init("Unison_invert_phase");} 688 class Fl_Osc_Choice 689 } {} 690 Fl_Slider {} { 691 label {Frequency Spread} 692 callback {unisonspreadoutput->update();} 693 tooltip {Frequency Spread of the Unison} xywh {95 562 125 13} type {Horz Knob} box NO_BOX labelsize 12 align 1 maximum 127 step 1 value 64 694 code0 {o->init("Unison_frequency_spread", 'i');o->reset_value=60;} 695 class Fl_Osc_Slider 696 } 697 Fl_Value_Output unisonspreadoutput { 698 label {(cents)} 699 xywh {225 560 40 15} labelsize 10 align 5 maximum 1000 step 0.1 textfont 1 textsize 10 700 code0 {o->init("unisonFrequencySpreadCents");//o->value(pars->getUnisonFrequencySpreadCents(nvoice));} 701 class Fl_Osc_Output 702 } 703 Fl_Dial {} { 704 label {V.speed} 705 tooltip {Vibrato Average Speed} xywh {406 555 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 706 code0 {o->init("Unison_vibratto_speed");o->reset_value=64;} 707 class Fl_Osc_Dial 708 } 709 Fl_Dial {} { 710 label {Ph.rand} 711 tooltip {Phase randomness} xywh {280 555 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 712 code0 {o->init("Unison_phase_randomness");o->reset_value=127;} 713 class Fl_Osc_Dial 714 } 715 Fl_Dial {} { 716 label Stereo 717 tooltip {Stereo Spread} xywh {322 555 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 718 code0 {o->init("Unison_stereo_spread");o->reset_value=64;} 719 class Fl_Osc_Dial 720 } 721 } 722 } 723 Fl_Group {} { 724 label AMPLITUDE open 725 xywh {5 40 240 220} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 726 } { 727 Fl_Value_Slider {} { 728 label Vol 729 tooltip Volume xywh {10 60 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 730 code0 {o->init("PVolume");o->reset_value=100;} 731 class Fl_Osc_VSlider 732 } 733 Fl_Value_Slider {} { 734 label {V.Sns} 735 tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 80 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 736 code0 {o->init("PAmpVelocityScaleFunction");o->reset_value=127;} 737 class Fl_Osc_VSlider 738 } 739 Fl_Group voiceampenvgroup { 740 label {ADSynth Voice - Amplitude Envelope} open 741 xywh {10 105 205 70} box FLAT_BOX color 51 align 144 742 code0 {o->init(//pars->VoicePar[nvoice].AmpEnvelope, 743 ENV_ADSR, osc_i, loc, "AmpEnvelope/");} 744 class EnvelopeUI 745 } {} 746 Fl_Dial {} { 747 label Pan 748 tooltip {Panning (leftmost is Random)} xywh {212 65 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1 749 code0 {o->init("PPanning");o->reset_value=64;} 750 class Fl_Osc_Dial 751 } 752 Fl_Check_Button {} { 753 label On 754 callback {if (o->value()==0) voiceampenvgroup->deactivate(); 755 else voiceampenvgroup->activate(); 756 o->redraw();} 757 tooltip {Forced Release} xywh {15 110 50 10} down_box DOWN_BOX labelfont 1 labelsize 11 758 code0 {o->init("PAmpEnvelopeEnabled");} 759 class Fl_Osc_Check 760 } 761 Fl_Group voiceamplfogroup { 762 label {Amplitude LFO } open 763 xywh {10 180 230 75} box FLAT_BOX color 47 align 144 764 code0 {o->init(osc_i, loc, "AmpLfo/");} 765 class LFOUI 766 } {} 767 Fl_Check_Button {} { 768 label On 769 callback {if (o->value()==0) voiceamplfogroup->deactivate(); 770 else voiceamplfogroup->activate(); 771 o->redraw();} 772 tooltip {Forced Release} xywh {15 185 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 773 code0 {o->init("PAmpLfoEnabled");} 774 class Fl_Osc_Check 775 } 776 Fl_Check_Button {} { 777 label Minus 778 xywh {10 45 50 10} down_box DOWN_BOX labelfont 1 labelsize 10 779 code0 {o->init("PVolumeminus");} 780 class Fl_Osc_Check 781 } 782 } 783 Fl_Group voicefiltergroup { 784 label FILTER open 785 xywh {245 5 285 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 786 } { 787 Fl_Group {} { 788 label {ADsynth Voice - Filter} open 789 xywh {250 30 275 75} box FLAT_BOX color 50 align 144 790 code0 {o->init(loc + "PFilter", osc_i, loc, "VoiceFilter/");} 791 class FilterUI 792 } {} 793 Fl_Group voicefilterenvgroup { 794 label {ADSynth Voice - Filter Envelope} open 795 xywh {250 115 275 70} box FLAT_BOX color 51 align 144 796 code0 {o->init( 797 ENV_ADSR_FILTER, osc_i, loc, "FilterEnvelope/");} 798 class EnvelopeUI 799 } {} 800 Fl_Check_Button {} { 801 label On 802 callback {if (o->value()==0) voicefilterenvgroup->deactivate(); 803 else voicefilterenvgroup->activate(); 804 o->redraw();} 805 tooltip {Forced Release} xywh {255 119 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 806 code0 {o->init("PFilterEnvelopeEnabled");} 807 class Fl_Osc_Check 808 } 809 Fl_Group voicefilterlfogroup { 810 label {Filter LFO } open 811 xywh {250 190 230 70} box FLAT_BOX color 47 align 144 812 code0 {o->init(osc_i, loc, "FilterLfo/");} 813 class LFOUI 814 } {} 815 Fl_Check_Button {} { 816 label On 817 callback {if (o->value()==0) voicefilterlfogroup->deactivate(); 818 else voicefilterlfogroup->activate(); 819 o->redraw();} 820 tooltip {Forced Release} xywh {255 196 55 10} down_box DOWN_BOX labelfont 1 labelsize 11 821 code0 {o->init("PFilterLfoEnabled");} 822 class Fl_Osc_Check 823 } 824 } 825 Fl_Group activeVoiceID { 826 label 01 827 xywh {5 5 55 35} box THIN_UP_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 22 align 16 828 code0 {char tmp[12];snprintf(tmp,12,"%d",nvoice+1);o->label(strdup(tmp));} 829 } {} 830 Fl_Choice {} { 831 callback {switch (o->value()) { 832 case 0: voicemodegroup->activate(); whitenoiselabel->hide(); pinknoiselabel->hide(); osc->Overlay=NULL; break; 833 case 1: voicemodegroup->deactivate(); whitenoiselabel->show(); pinknoiselabel->hide(); osc->Overlay=whitenoiselabel; break; 834 default: voicemodegroup->deactivate(); whitenoiselabel->hide(); pinknoiselabel->show(); osc->Overlay=pinknoiselabel; break; 835 }} open 836 tooltip {Oscillator Type (sound/noise)} xywh {5 515 65 20} down_box BORDER_BOX labelsize 10 textfont 1 textsize 10 837 code0 {o->init("Type");} 838 class Fl_Osc_Choice 839 } { 840 MenuItem {} { 841 label Sound 842 xywh {5 5 100 20} labelfont 1 labelsize 11 843 } 844 MenuItem {} { 845 label White 846 xywh {15 15 100 20} labelfont 1 labelsize 11 847 } 848 MenuItem {} { 849 label Pink 850 xywh {25 25 100 20} labelfont 1 labelsize 11 851 } 852 } 853 Fl_Check_Button bypassfiltercheckbutton { 854 label {Bypass Global F.} 855 xywh {425 10 100 20} down_box DOWN_BOX labelfont 1 labelsize 10 align 148 856 code0 {o->init("Pfilterbypass");} 857 class Fl_Osc_Check 858 } 859 Fl_Group {} {open 860 xywh {115 5 95 35} box THIN_UP_BOX 861 } { 862 Fl_Value_Slider {} { 863 label Delay 864 tooltip Volume xywh {120 21 84 12} type {Horz Knob} box NO_BOX labelsize 11 align 5 maximum 127 step 1 865 code0 {o->init("PDelay");} 866 class Fl_Osc_VSlider 867 } 868 } 869 Fl_Check_Button {} { 870 label On 871 callback {if (o->value()==0) voicefiltergroup->deactivate(); 872 else voicefiltergroup->activate(); 873 o->redraw(); 874 bypassfiltercheckbutton->redraw();} 875 tooltip {Enable Filter} xywh {250 15 60 15} down_box DOWN_BOX labelfont 1 labelsize 11 876 code0 {o->init("PFilterEnabled");} 877 class Fl_Osc_Check 878 } 879 Fl_Box whitenoiselabel { 880 label {White Noise} 881 xywh {150 430 300 65} labelfont 1 labelsize 50 labelcolor 54 hide 882 } 883 Fl_Box pinknoiselabel { 884 label {Pink Noise} 885 xywh {150 430 300 65} labelfont 1 labelsize 50 labelcolor 212 hide 886 } 887 Fl_Counter {} { 888 label Unison selected 889 tooltip {Unison size} xywh {20 568 65 18} labelfont 1 align 5 minimum 1 maximum 64 step 1 value 1 textfont 1 textsize 11 890 code0 {o->init("Unison_size", 1);} 891 code1 {o->lstep(5);} 892 class Fl_Osc_Counter 893 } 894 } 895 Fl_Check_Button voiceonbutton { 896 label On 897 callback {if (o->value()==0) voiceparametersgroup->deactivate(); 898 else voiceparametersgroup->activate(); 899 o->redraw();} 900 xywh {60 5 55 35} box THIN_UP_BOX down_box DOWN_BOX labelfont 1 labelsize 13 901 code0 {o->init("Enabled");} 902 class Fl_Osc_Check 903 } 904 } 905 } 906 Function {ADvoiceUI(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} { 907 code {nvoice=0; 908 oscedit=NULL;} {} 909 } 910 Function {init(int nvoice_, std::string loc_, Fl_Osc_Interface *osc_)} {open 911 } { 912 code {assert(osc_); 913 assert(!loc_.empty()); 914 nvoice=nvoice_; 915 loc=loc_+"VoicePar"+to_s(nvoice)+"/"; 916 base = loc_; 917 osc_i=osc_; 918 make_window(); 919 end(); 920 ADnoteVoiceParameters->show();} {} 921 } 922 Function {~ADvoiceUI()} {open 923 } { 924 code {ADnoteVoiceParameters->hide(); 925 hide(); 926 delete(oscedit); 927 //delete (ADnoteVoiceParameters);} {} 928 } 929 Function {change_voice(int nvoice_)} {open 930 } { 931 code {nvoice = nvoice_; 932 loc = base+"VoicePar"+to_s(nvoice)+"/"; 933 char tmp[50];snprintf(tmp,12,"%d",nvoice+1); 934 activeVoiceID->label(strdup(tmp)); 935 extoscil->clear(); 936 extoscil->add("Internal"); 937 for (int i=0;i<nvoice;i++) { 938 sprintf(tmp,"Ext.%2d",i+1); 939 extoscil->add(tmp); 940 }; 941 942 extFMoscil->clear(); 943 extFMoscil->add("Internal"); 944 for (int i=0;i<nvoice;i++) { 945 sprintf(tmp,"ExtM.%2d",i+1); 946 extFMoscil->add(tmp); 947 } 948 949 extMod->clear(); 950 extMod->add("OFF"); 951 for (int i=0;i<nvoice;i++) { 952 sprintf(tmp,"ExtMod.%2d",i+1); 953 extMod->add(tmp); 954 } 955 ADnoteVoiceParameters->rebase(base+"VoicePar"+to_s(nvoice)+"/");} {selected 956 } 957 } 958 decl {int nvoice;} {private local 959 } 960 decl {OscilEditor *oscedit;} {private local 961 } 962 decl {Fl_Oscilloscope *osc;} {private local 963 } 964 decl {Fl_Oscilloscope *oscFM;} {private local 965 } 966 decl {std::string loc;} {private local 967 } 968 decl {std::string base;} {private local 969 } 970 decl {Fl_Osc_Interface *osc_i;} {private local 971 } 972 } 973 974 class ADnoteUI {open : {public PresetsUI_} 975 } { 976 Function {make_window()} {open private 977 } { 978 Fl_Window ADnoteGlobalParameters { 979 label {ADsynth Global Parameters of the Instrument} open 980 xywh {688 551 540 430} type Double 981 class Fl_Osc_Window visible 982 } { 983 Fl_Box {} { 984 xywh {0 0 0 0} 985 code0 {ADnoteGlobalParameters->init(osc, loc + "GlobalPar/");} 986 } 987 Fl_Group {} { 988 label FREQUENCY open 989 xywh {5 280 530 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 990 } { 991 Fl_Group freqenv { 992 label {ADSynth Global - Frequency Envelope} open 993 xywh {10 320 205 70} box FLAT_BOX color 51 align 144 994 code0 {o->init(ENV_ASR, osc, loc, "GlobalPar/FreqEnvelope/");} 995 class EnvelopeUI 996 } {} 997 Fl_Counter octave { 998 label Octave 999 tooltip Octave xywh {455 300 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11 1000 code0 {o->init("octave");} 1001 class Fl_Osc_Counter 1002 } 1003 Fl_Counter coarsedet { 1004 label {Coarse det.} 1005 tooltip {Coarse Detune} xywh {460 370 60 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11 1006 code0 {o->init("coarsedetune");} 1007 code3 {o->lstep(10);} 1008 class Fl_Osc_Counter 1009 } 1010 Fl_Group freqlfo { 1011 label {Frequency LFO } open 1012 xywh {220 320 230 70} box FLAT_BOX color 47 align 144 1013 code0 {o->init(osc, loc, "GlobalPar/FreqLfo/");} 1014 class LFOUI 1015 } {} 1016 Fl_Slider detune { 1017 callback {detunevalueoutput->update();} 1018 tooltip {Fine Detune (cents)} xywh {60 300 385 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1 1019 code0 {o->init("PDetune", 'i');} 1020 class Fl_Osc_Slider 1021 } 1022 Fl_Value_Output detunevalueoutput { 1023 label Detune 1024 xywh {12 300 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10 1025 code0 {o->init("detunevalue");} 1026 class Fl_Osc_Output 1027 } 1028 Fl_Choice detunetype { 1029 label {Detune Type} 1030 callback {detunevalueoutput->update(); 1031 ui->partui->adnoteui->advoice->detunevalueoutput->update(); 1032 ui->partui->adnoteui->advoice->fmdetunevalueoutput->update(); 1033 } open 1034 xywh {455 340 75 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10 1035 code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");} 1036 code1 {o->init("PDetuneType",1);} 1037 class Fl_Osc_Choice 1038 } {} 1039 Fl_Dial {} { 1040 label relBW 1041 callback {for (int i=0;i<NUM_VOICES;i++){ 1042 voicelistitem[i]->refreshlist(); 1043 };} 1044 tooltip {Bandwidth - how the relative fine detune of the voice are changed} xywh {505 295 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 1045 code0 {o->init("PBandwidth");o->reset_value=64;} 1046 class Fl_Osc_Dial 1047 } 1048 } 1049 Fl_Group {} { 1050 label AMPLITUDE open 1051 xywh {5 5 240 260} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 1052 } { 1053 Fl_Value_Slider volume { 1054 label Vol 1055 tooltip Volume xywh {10 30 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 1056 code0 {o->init("PVolume");o->reset_value=90;} 1057 class Fl_Osc_VSlider 1058 } 1059 Fl_Value_Slider vsns { 1060 label {V.Sns} 1061 tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1 1062 code0 {o->init("PAmpVelocityScaleFunction");o->reset_value=64;} 1063 class Fl_Osc_VSlider 1064 } 1065 Fl_Dial pan { 1066 label Pan 1067 tooltip {Panning (leftmost is Random)} xywh {210 25 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1 1068 code0 {o->init("PPanning");o->reset_value=64;} 1069 class Fl_Osc_Dial 1070 } 1071 Fl_Dial {} { 1072 label De-pop selected 1073 tooltip {Pop suppression} xywh {208 228 20 20} type Float labelsize 10 maximum 127 step 1 textfont 1 textsize 11 1074 code0 {o->init("Fadein_adjustment");o->reset_value=20;} 1075 class Fl_Osc_Dial 1076 } 1077 1078 Fl_Dial pstr { 1079 label {P.Str.} 1080 tooltip {Punch Strength} xywh {78 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 1081 code0 {o->init("PPunchStrength");} 1082 class Fl_Osc_Dial 1083 } 1084 Fl_Dial pt { 1085 label {P.t.} 1086 tooltip {Punch Time (duration)} xywh {108 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 1087 code0 {o->init("PPunchTime");o->reset_value=60;} 1088 class Fl_Osc_Dial 1089 } 1090 Fl_Dial pstc { 1091 label {P.Stc.} 1092 tooltip {Punch Stretch} xywh {138 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 1093 code0 {o->init("PPunchStretch");o->reset_value=64;} 1094 class Fl_Osc_Dial 1095 } 1096 Fl_Dial pvel { 1097 label {P.Vel.} 1098 tooltip {Punch Velocity Sensing} xywh {168 237 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1 1099 code0 {o->init("PPunchVelocitySensing");o->reset_value=72;} 1100 class Fl_Osc_Dial 1101 } 1102 Fl_Group ampenv { 1103 label {ADSynth Global - Amplitude Envelope} open 1104 xywh {10 75 205 70} box FLAT_BOX color 51 align 144 1105 code0 {o->init(ENV_ADSR, osc, loc, "GlobalPar/AmpEnvelope/");} 1106 class EnvelopeUI 1107 } {} 1108 Fl_Group amplfo { 1109 label {Amplitude LFO } open 1110 xywh {10 150 230 70} box FLAT_BOX color 47 align 144 1111 code0 {o->init(osc, loc, "GlobalPar/AmpLfo/");} 1112 class LFOUI 1113 } {} 1114 Fl_Check_Button rndgrp { 1115 label {Rnd Grp} 1116 tooltip {How the Harmonic Amplitude is applied to voices that use the same oscillator} xywh {7 241 65 18} down_box DOWN_BOX labelsize 11 1117 code0 {o->init("Hrandgrouping");} 1118 class Fl_Osc_Check 1119 } 1120 } 1121 Fl_Group {} { 1122 label FILTER open 1123 xywh {250 5 285 265} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17 1124 } { 1125 Fl_Group filterenv { 1126 label {ADSynth Global - Filter Envelope} open 1127 xywh {255 118 275 70} box FLAT_BOX color 51 align 144 1128 code0 {o->init(ENV_ADSR_FILTER, osc, loc, "GlobalPar/FilterEnvelope/");} 1129 class EnvelopeUI 1130 } {} 1131 Fl_Group filterlfo { 1132 label {Filter LFO} open 1133 xywh {255 195 230 70} box FLAT_BOX color 47 align 144 1134 code0 {o->init(osc, loc, "GlobalPar/FilterLfo/");} 1135 class LFOUI 1136 } {} 1137 Fl_Group filterui { 1138 label {ADsynth Global - Filter} open 1139 xywh {255 35 275 75} box FLAT_BOX color 50 align 144 1140 code0 {o->init(loc + "GlobalPar/PFilter", 1141 osc, loc, "GlobalPar/GlobalFilter/");} 1142 class FilterUI 1143 } {} 1144 } 1145 Fl_Check_Button stereo { 1146 label Stereo 1147 xywh {7 223 65 18} down_box DOWN_BOX labelsize 11 1148 code0 {o->init("PStereo");} 1149 class Fl_Osc_Check 1150 } 1151 Fl_Button {} { 1152 label {Show Voice List} 1153 callback {for (int i=0;i<NUM_VOICES;i++){ 1154 voicelistitem[i]->refreshlist(); 1155 } 1156 ADnoteVoiceList->show();} 1157 xywh {180 400 125 25} labelsize 12 1158 } 1159 Fl_Button {} { 1160 label {Show Voice Parameters} 1161 callback { 1162 if (advoice->mod_type->value() == 0) 1163 advoice->voiceFMparametersgroup->deactivate(); 1164 else 1165 advoice->voiceFMparametersgroup->activate(); 1166 ADnoteVoice->show();} 1167 xywh {5 400 170 25} labelsize 12 1168 } 1169 Fl_Button {} { 1170 label Close 1171 callback {ADnoteGlobalParameters->hide();} 1172 xywh {475 400 60 25} box THIN_UP_BOX 1173 } 1174 Fl_Button {} { 1175 label Resonance 1176 callback {resui->resonancewindow->redraw(); 1177 resui->resonancewindow->show();} 1178 tooltip Resonance xywh {309 400 86 25} box THIN_UP_BOX labelsize 12 1179 } 1180 Fl_Button {} { 1181 label C 1182 callback {presetsui->copy(loc);} 1183 xywh {405 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 1184 } 1185 Fl_Button {} { 1186 label P 1187 callback {presetsui->paste(loc,this);} 1188 xywh {435 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 1189 } 1190 } 1191 Fl_Window ADnoteVoice { 1192 label {ADsynth Voice Parameters} open 1193 xywh {48 361 765 630} type Double 1194 class Fl_Osc_Window visible 1195 } { 1196 Fl_Box {} { 1197 xywh {0 0 0 0} 1198 code0 {ADnoteVoice->init(osc,loc);} 1199 } 1200 Fl_Group advoice {open 1201 xywh {0 0 765 595} 1202 code0 {o->init(nvoice,loc, osc);} 1203 code1 {o->show();} 1204 class ADvoiceUI 1205 } {} 1206 Fl_Button {} { 1207 label {Close} 1208 callback {ADnoteVoice->hide();} 1209 xywh {700 601 60 25} box THIN_UP_BOX 1210 } 1211 Fl_Counter currentvoicecounter { 1212 label {Current Voice} 1213 callback {nvoice=(int)o->value()-1; 1214 advoice->change_voice(nvoice);} 1215 xywh {10 601 130 25} type Simple labelfont 1 align 8 minimum 0 maximum 2 step 1 value 1 textfont 1 textsize 13 1216 code0 {o->bounds(1,NUM_VOICES);} 1217 } 1218 Fl_Button {} { 1219 label C 1220 callback {presetsui->copy(ADnoteVoice->loc(),nvoice);} 1221 xywh {630 609 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 1222 } 1223 Fl_Button {} { 1224 label P 1225 callback {presetsui->paste(ADnoteVoice->loc(),this,nvoice);} 1226 xywh {660 609 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55 1227 } 1228 Fl_Button {} { 1229 label {Show ADsynth} 1230 callback {ADnoteGlobalParameters->show();} 1231 xywh {280 601 110 25} labelfont 0 labelsize 12 1232 } 1233 Fl_Button {} { 1234 label {Show Voice List} 1235 callback { 1236 for (int i=0;i<NUM_VOICES;i++){ 1237 voicelistitem[i]->refreshlist(); 1238 } 1239 ADnoteVoiceList->show(); 1240 } 1241 xywh {400 601 130 25} labelfont 0 labelsize 12 1242 } 1243 } 1244 Fl_Window ADnoteVoiceList { 1245 label {ADsynth Voices list} open 1246 xywh {6 263 670 260} type Double hide 1247 class Fl_Osc_Window 1248 } { 1249 Fl_Box {} { 1250 xywh {0 0 0 0} 1251 code0 {ADnoteVoiceList->init(osc, loc);} 1252 } 1253 Fl_Text_Display {} { 1254 label {No.} 1255 xywh {17 15 30 10} box NO_BOX labelfont 1 labelsize 11 1256 } 1257 Fl_Text_Display {} { 1258 label Vol 1259 xywh {190 15 30 10} box NO_BOX labelfont 1 labelsize 11 1260 } 1261 Fl_Text_Display {} { 1262 label Detune 1263 xywh {431 15 25 10} box NO_BOX labelfont 1 labelsize 11 1264 } 1265 Fl_Text_Display {} { 1266 label Pan 1267 xywh {253 15 30 10} box NO_BOX labelfont 1 labelsize 11 1268 } 1269 Fl_Text_Display {} { 1270 label {Vib. Depth} selected 1271 xywh {600 15 30 10} box NO_BOX labelfont 1 labelsize 11 1272 } 1273 Fl_Text_Display {} { 1274 label {R.} 1275 xywh {285 15 25 10} box NO_BOX labelfont 1 labelsize 11 1276 } 1277 Fl_Button {} { 1278 label {Close} 1279 callback {ADnoteVoiceList->hide();} 1280 xywh {271 237 80 20} 1281 } 1282 Fl_Scroll {} {open 1283 xywh {0 15 670 220} type VERTICAL box THIN_UP_BOX 1284 } { 1285 Fl_Pack {} {open 1286 xywh {0 20 670 210} 1287 code0 {o->begin();for (int i=0;i<NUM_VOICES;i++){voicelistitem[i]=new ADvoicelistitem(0,0,670,25,"");voicelistitem[i]->init(i,loc+"VoicePar"+to_s(i)+"/",osc);}o->end();} 1288 } {} 1289 } 1290 Fl_Button {} { 1291 label {Edit ADsynth} 1292 callback {ui->partui->adnoteui->ADnoteGlobalParameters->show();} 1293 xywh {5 237 106 20} labelsize 12 1294 } 1295 } 1296 } 1297 Function {ADnoteUI(std::string loc_, Fl_Osc_Interface *osc_)} {open 1298 } { 1299 code {assert(osc_); 1300 assert(!loc_.empty()); 1301 1302 nvoice=0; 1303 resui=new ResonanceUI(osc_, loc_+"GlobalPar/Reson/"); 1304 loc=loc_; 1305 osc=osc_; 1306 make_window();} {} 1307 } 1308 Function {~ADnoteUI()} {open 1309 } { 1310 code {ADnoteVoiceList->hide(); 1311 ADnoteGlobalParameters->hide(); 1312 ADnoteVoice->hide(); 1313 delete ADnoteVoiceList; 1314 delete ADnoteGlobalParameters; 1315 delete ADnoteVoice; 1316 delete resui;} {} 1317 } 1318 Function {refresh()} {open 1319 } { 1320 code {amplfo->refresh(); 1321 freqlfo->refresh(); 1322 filterlfo->refresh(); 1323 1324 ampenv->refresh(); 1325 freqenv->refresh(); 1326 filterenv->refresh(); 1327 filterui->refresh(); 1328 1329 for (int i=0;i<NUM_VOICES;i++) voicelistitem[i]->refreshlist(); 1330 1331 resui->refresh(); 1332 currentvoicecounter->do_callback();} {} 1333 } 1334 decl {ResonanceUI *resui;} {private local 1335 } 1336 decl {int nvoice;} {private local 1337 } 1338 decl {ADvoicelistitem *voicelistitem[NUM_VOICES];} {private local 1339 } 1340 decl {std::string loc;} {private local 1341 } 1342 decl {Fl_Osc_Interface *osc;} {private local 1343 } 1344 }