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.

1296 lines
46KB

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