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.

1225 lines
44KB

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