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.

1322 lines
47KB

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