Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1345 lines
49KB

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