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.

494 lines
16KB

  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 <stdlib.h>} {public local
  10. }
  11. decl {\#include <stdio.h>} {public local
  12. }
  13. decl {\#include <string.h>} {public local
  14. }
  15. decl {\#include "../globals.h"} {public local
  16. }
  17. decl {\#include "Fl_Osc_VSlider.H"} {public local
  18. }
  19. decl {\#include "Fl_Osc_TSlider.H"} {public local
  20. }
  21. decl {\#include "Fl_Osc_Dial.H"} {public local
  22. }
  23. decl {\#include "EnvelopeUI.h"} {public local
  24. }
  25. decl {\#include "FilterUI.h"} {public local
  26. }
  27. decl {\#include "../Misc/Util.h"} {public local
  28. }
  29. decl {\#include "../Params/SUBnoteParameters.h"} {public local
  30. }
  31. decl {\#include "PresetsUI.h"} {public local
  32. }
  33. class SUBSlider {: {public Fl_Osc_TSlider}
  34. } {
  35. Function {SUBSlider(int x,int y, int w, int h, const char *label=0)
  36. :Fl_Osc_TSlider(x,y,w,h,label)} {open
  37. } { code {} {}}
  38. Function {OSC_value(char c)} {open return_type void
  39. } { code {
  40. value(127-c);
  41. selection_color(value() == reset_value ? 0 : 222);
  42. } {} }
  43. Function {cb(void)} {open return_type void
  44. } {
  45. code {
  46. selection_color(value() == reset_value ? 0 : 222);
  47. oscWrite(ext, "c", (int)(127-Fl_Slider::value()));
  48. if(cb_data.first)
  49. cb_data.first(this, cb_data.second);
  50. } {}
  51. }
  52. }
  53. class SUBnoteharmonic {: {public Fl_Osc_Group}
  54. } {
  55. Function {make_window()} {private
  56. } {
  57. Fl_Window harmonic {
  58. xywh {329 403 90 305} type Double hide
  59. class Fl_Osc_Group
  60. } {
  61. Fl_Slider mag {
  62. tooltip {harmonic's magnitude} xywh {0 15 10 135} type {Vert Knob} box FLAT_BOX selection_color 0 maximum 127 step 1 value 127
  63. class SUBSlider
  64. }
  65. Fl_Slider bw {
  66. tooltip {harmonic's bandwidth} xywh {0 157 10 130} type {Vert Knob} box FLAT_BOX selection_color 222 maximum 127 step 1 value 64
  67. class SUBSlider
  68. }
  69. Fl_Box {} {
  70. xywh {10 219 5 5} box FLAT_BOX color 45
  71. code0 {if (n+1==MAX_SUB_HARMONICS) o->hide();}
  72. }
  73. Fl_Box {} {
  74. label 01
  75. xywh {0 288 10 15} labelfont 1 labelsize 9 align 20
  76. code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
  77. }
  78. Fl_Box {} {
  79. label 01
  80. xywh {0 0 10 15} labelfont 1 labelsize 9 align 20
  81. code0 {char tmp[10];snprintf(tmp,10,"%d",n+1);o->label(strdup(tmp));}
  82. }
  83. }
  84. }
  85. Function {SUBnoteharmonic(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {} {
  86. code {n=0;} {}
  87. }
  88. Function {init(int n_)} {} {
  89. code {n=n_;
  90. make_window();
  91. harmonic->show();
  92. mag->reset_value=127;
  93. mag->ext = "Phmag" + to_s(n);
  94. mag->oscRegister(mag->ext.c_str());
  95. mag->setTransform(-1, 127);
  96. bw->reset_value=63;
  97. bw->ext = "Phrelbw" + to_s(n);
  98. bw->oscRegister(bw->ext.c_str());
  99. bw->setTransform(-1, 63);
  100. osc->requestValue(base+"Phrelbw"+to_s(n));
  101. end();} {}
  102. }
  103. Function {refresh()} {} {
  104. code {// request values for the widgets
  105. mag->oscWrite(mag->ext);
  106. bw->oscWrite(bw->ext);} {}
  107. }
  108. Function {~SUBnoteharmonic()} {} {
  109. code {harmonic->hide();
  110. hide();
  111. //delete(harmonic);} {}
  112. }
  113. decl {int n;} {private local
  114. }
  115. }
  116. class SUBnoteUI {open : {public PresetsUI_}
  117. } {
  118. Function {make_window()} {open
  119. } {
  120. Fl_Window SUBparameters {
  121. label {SUBsynth Parameters} open
  122. xywh {542 511 735 475} type Double
  123. class Fl_Osc_Window visible
  124. } {
  125. Fl_Box {} {
  126. xywh {0 0 0 0} box FLAT_BOX color 45
  127. code0 {SUBparameters->init(osc, loc);}
  128. }
  129. Fl_Scroll {} {
  130. label scroll open
  131. xywh {5 140 434 330} type HORIZONTAL box FLAT_BOX labeltype NO_LABEL
  132. } {
  133. Fl_Pack harmonics {open
  134. xywh {5 145 425 325} type HORIZONTAL
  135. code0 {for (int i=0;i<MAX_SUB_HARMONICS;i++){h[i]=new SUBnoteharmonic(0,0,15,o->h(),"");h[i]->init(i);}}
  136. } {}
  137. }
  138. Fl_Button {} {
  139. label Close
  140. callback {SUBparameters->hide();}
  141. xywh {670 446 60 25} box THIN_UP_BOX
  142. }
  143. Fl_Group {} {
  144. label AMPLITUDE open
  145. xywh {5 5 215 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17
  146. } {
  147. Fl_Value_Slider vol {
  148. label Vol
  149. tooltip Volume xywh {10 25 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1
  150. code0 {o->init("PVolume");}
  151. class Fl_Osc_VSlider
  152. }
  153. Fl_Value_Slider vsns {
  154. label {V.Sns}
  155. tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 45 140 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1
  156. code0 {o->init("PAmpVelocityScaleFunction");}
  157. class Fl_Osc_VSlider
  158. }
  159. Fl_Dial pan {
  160. label Pan
  161. tooltip {Panning (leftmost is Random)} xywh {185 20 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
  162. code0 {o->init("PPanning");}
  163. class Fl_Osc_Dial
  164. }
  165. Fl_Group ampenv {
  166. label {SUBsynth - Amplitude Envelope} open
  167. xywh {10 65 205 70} box FLAT_BOX color 51 align 144
  168. code0 {o->init(ENV_ADSR, osc, loc, "AmpEnvelope/");}
  169. class EnvelopeUI
  170. } {}
  171. }
  172. Fl_Group {} {
  173. xywh {495 406 235 35} box UP_FRAME
  174. } {
  175. Fl_Counter filterstages {
  176. label {Filter Stages}
  177. tooltip {How many times the noise is filtered} xywh {515 421 45 15} type Simple labelfont 1 labelsize 10 align 1 minimum 1 maximum 5 step 1 textsize 10
  178. code0 {o->init("Pnumstages");}
  179. class Fl_Osc_Counter
  180. }
  181. Fl_Choice magtype {
  182. label {Mag.Type}
  183. xywh {585 421 65 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11
  184. code0 {o->init("Phmagtype");}
  185. class Fl_Osc_Choice
  186. } {
  187. MenuItem {} {
  188. label Linear
  189. xywh {20 20 100 20} labelfont 1 labelsize 11
  190. }
  191. MenuItem {} {
  192. label {-40dB}
  193. xywh {30 30 100 20} labelfont 1 labelsize 11
  194. }
  195. MenuItem {} {
  196. label {-60dB}
  197. xywh {40 40 100 20} labelfont 1 labelsize 11
  198. }
  199. MenuItem {} {
  200. label {-80dB}
  201. xywh {50 50 100 20} labelfont 1 labelsize 11
  202. }
  203. MenuItem {} {
  204. label {-100dB}
  205. xywh {60 60 100 20} labelfont 1 labelsize 11
  206. }
  207. }
  208. Fl_Choice start {
  209. label Start selected
  210. xywh {670 420 50 15} down_box BORDER_BOX labelfont 1 labelsize 10 align 1 textsize 11
  211. code0 {o->init("Pstart");}
  212. class Fl_Osc_Choice
  213. } {
  214. MenuItem {} {
  215. label Zero
  216. xywh {30 30 100 20} labelfont 1 labelsize 11
  217. }
  218. MenuItem {} {
  219. label RND
  220. xywh {40 40 100 20} labelfont 1 labelsize 11
  221. }
  222. MenuItem {} {
  223. label {Max.}
  224. xywh {50 50 100 20} labelfont 1 labelsize 11
  225. }
  226. }
  227. }
  228. Fl_Group freqsettingsui {
  229. label FREQUENCY open
  230. xywh {440 5 295 146} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17
  231. } {
  232. Fl_Group freqenvelopegroup {
  233. label {SUBsynth - Frequency Envelope} open
  234. xywh {445 75 205 70} box FLAT_BOX color 51 align 144
  235. code0 {o->init(ENV_ASR, osc, loc, "FreqEnvelope/");}
  236. class EnvelopeUI
  237. } {}
  238. Fl_Check_Button freqee {
  239. label Enabled
  240. callback {if (o->value()==0) freqenvelopegroup->deactivate();
  241. else freqenvelopegroup->activate();
  242. o->show();
  243. freqsettingsui->redraw();}
  244. xywh {445 77 55 15} down_box DOWN_BOX labelfont 1 labelsize 10
  245. code0 {o->init("PFreqEnvelopeEnabled");}
  246. class Fl_Osc_Check
  247. }
  248. Fl_Counter octave {
  249. label Octave
  250. tooltip Octave xywh {670 58 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11
  251. code0 {o->init("octave");}
  252. class Fl_Osc_Counter
  253. }
  254. Fl_Counter coarsedet {
  255. label {Coarse Det.}
  256. tooltip {Coarse Detune} xywh {655 125 60 20} labelsize 10 align 1 minimum -64 maximum 63 step 1 textfont 1 textsize 11
  257. code0 {o->init("coarsedetune");}
  258. code3 {o->lstep(10);}
  259. class Fl_Osc_Counter
  260. }
  261. Fl_Slider detune {
  262. callback {o->oscWrite("detunevalue");}
  263. tooltip {Fine Detune (cents)} xywh {495 27 230 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1
  264. code0 {o->init("PDetune",'i');}
  265. class Fl_Osc_Slider
  266. }
  267. Fl_Value_Output detunevalueoutput {
  268. label Detune
  269. xywh {448 27 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10
  270. code0 {o->init("detunevalue");}
  271. class Fl_Osc_Output
  272. }
  273. Fl_Check_Button hz440 {
  274. label 440Hz
  275. callback {if (o->value()==0) fixedfreqetdial->deactivate();
  276. else fixedfreqetdial->activate();}
  277. tooltip {set the base frequency to 440Hz} xywh {555 53 50 15} down_box DOWN_BOX labelfont 1 labelsize 10
  278. code0 {o->init("Pfixedfreq");}
  279. class Fl_Osc_Check
  280. }
  281. Fl_Dial fixedfreqetdial {
  282. label {Eq.T.}
  283. tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {610 53 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1
  284. code0 {o->init("PfixedfreqET");}
  285. class Fl_Osc_Dial
  286. }
  287. Fl_Choice detunetype {
  288. label {Detune Type}
  289. callback {o->oscWrite("detunevalue");} open
  290. xywh {655 94 70 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
  291. code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");}
  292. code1 {o->init("PDetuneType",1);}
  293. class Fl_Osc_Choice
  294. } {}
  295. }
  296. Fl_Check_Button stereo {
  297. label Stereo
  298. xywh {440 406 55 35} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  299. code0 {o->init("Pstereo");}
  300. class Fl_Osc_Check
  301. }
  302. Fl_Button {} {
  303. label Clear
  304. callback {o->oscWrite("clear");
  305. for (int i=1;i<MAX_SUB_HARMONICS;i++){
  306. h[i]->mag->oscWrite(h[i]->mag->ext, "c", 0);
  307. h[i]->bw->oscWrite(h[i]->bw->ext, "c", 64);
  308. };
  309. h[0]->mag->oscWrite(h[0]->mag->ext, "c", 127);
  310. h[0]->bw->oscWrite(h[0]->bw->ext, "c", 64);
  311. SUBparameters->redraw();}
  312. tooltip {Clear the harmonics} xywh {445 446 70 25} box THIN_UP_BOX
  313. class Fl_Osc_Button
  314. }
  315. Fl_Group bandwidthsettingsui {
  316. label BANDWIDTH
  317. xywh {220 5 220 135} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17
  318. } {
  319. Fl_Group bandwidthenvelopegroup {
  320. label {SUBsynth - BandWidth Envelope} open
  321. xywh {225 65 205 70} box FLAT_BOX color 51 align 144
  322. code0 {o->init(ENV_ADSR_BW, osc, loc, "BandWidthEnvelope/");}
  323. class EnvelopeUI
  324. } {}
  325. Fl_Check_Button bwee {
  326. label Enabled
  327. callback {if (o->value()==0) bandwidthenvelopegroup->deactivate();
  328. else bandwidthenvelopegroup->activate();
  329. o->show();
  330. bandwidthsettingsui->redraw();}
  331. xywh {225 67 55 15} down_box DOWN_BOX labelfont 1 labelsize 10
  332. code0 {o->init("PBandWidthEnvelopeEnabled");}
  333. class Fl_Osc_Check
  334. }
  335. Fl_Value_Slider bandwidth {
  336. label {Band Width}
  337. xywh {225 40 115 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 maximum 127 step 1
  338. code0 {o->init("Pbandwidth");}
  339. class Fl_Osc_VSlider
  340. }
  341. Fl_Value_Slider bwidthscale {
  342. label {B.Width Scale}
  343. tooltip {How much I increase the BandWidth according to lower/higher harmonics} xywh {345 40 90 15} type {Horz Knob} box NO_BOX labelsize 10 align 1 minimum -64 maximum 63 step 1
  344. code0 {o->init("Pbwscale",'i');}
  345. class Fl_Osc_TSlider
  346. }
  347. }
  348. Fl_Group globalfiltergroup {
  349. label FILTER
  350. xywh {440 221 290 185} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17
  351. } {
  352. Fl_Group filterenv {
  353. label {SUBsynth - Filter Envelope} open
  354. xywh {445 331 275 70} box FLAT_BOX color 51 align 144
  355. code0 {o->init(ENV_ADSR_FILTER, osc, loc, "GlobalFilterEnvelope/");}
  356. class EnvelopeUI
  357. } {}
  358. Fl_Group filterui {
  359. label {SUBsynthl - Filter} open
  360. xywh {445 246 275 75} box FLAT_BOX color 50 align 144
  361. code0 {o->init(loc + "PGlobalFilter" , osc, loc, "GlobalFilter/");}
  362. class FilterUI
  363. } {}
  364. }
  365. Fl_Check_Button filtere {
  366. label Enabled
  367. callback {if (o->value()==0) globalfiltergroup->deactivate();
  368. else globalfiltergroup->activate();
  369. o->show();
  370. globalfiltergroup->redraw();}
  371. xywh {445 226 85 20} down_box DOWN_BOX labelfont 1 labelsize 11
  372. code0 {o->init("PGlobalFilterEnabled");}
  373. class Fl_Osc_Check
  374. }
  375. Fl_Button {} {
  376. label C
  377. callback {presetsui->copy(loc);}
  378. xywh {600 451 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  379. }
  380. Fl_Button {} {
  381. label P
  382. callback {presetsui->paste(loc,this);}
  383. xywh {630 451 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  384. }
  385. Fl_Group {} {
  386. label OVERTONES open
  387. xywh {440 151 220 70} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 align 17
  388. } {
  389. Fl_Choice spreadtype {
  390. label OvertonesPosition
  391. xywh {450 190 80 20} down_box BORDER_BOX labelsize 10 align 5 textsize 10
  392. code0 {o->init("POvertoneSpread.type");}
  393. class Fl_Osc_Choice
  394. } {
  395. MenuItem {} {
  396. label Harmonic
  397. xywh {0 0 34 20} labelfont 1 labelsize 11
  398. }
  399. MenuItem {} {
  400. label ShiftU
  401. xywh {10 10 34 20} labelfont 1 labelsize 11
  402. }
  403. MenuItem {} {
  404. label ShiftL
  405. xywh {20 20 34 20} labelfont 1 labelsize 11
  406. }
  407. MenuItem {} {
  408. label PowerU
  409. xywh {20 20 34 20} labelfont 1 labelsize 11
  410. }
  411. MenuItem {} {
  412. label PowerL
  413. xywh {30 30 34 20} labelfont 1 labelsize 11
  414. }
  415. MenuItem {} {
  416. label Sine
  417. xywh {40 40 34 20} labelfont 1 labelsize 11
  418. }
  419. MenuItem {} {
  420. label Power
  421. xywh {50 50 34 20} labelfont 1 labelsize 11
  422. }
  423. MenuItem {} {
  424. label Shift
  425. xywh {20 20 34 20} labelfont 1 labelsize 11
  426. }
  427. }
  428. Fl_Dial spreadpar1 {
  429. label Par1
  430. xywh {548 173 30 30} box ROUND_UP_BOX labelsize 10 maximum 255 step 1
  431. code0 {o->init("POvertoneSpread.par1");}
  432. class Fl_Osc_Dial
  433. }
  434. Fl_Dial spreadpar2 {
  435. label Par2
  436. xywh {583 173 30 30} box ROUND_UP_BOX labelsize 10 maximum 255 step 1
  437. code0 {o->init("POvertoneSpread.par2");}
  438. class Fl_Osc_Dial
  439. }
  440. Fl_Dial spreadpar3 {
  441. label ForceH
  442. xywh {618 173 30 30} box ROUND_UP_BOX labelsize 10 maximum 255 step 1
  443. code0 {o->init("POvertoneSpread.par3");}
  444. class Fl_Osc_Dial
  445. }
  446. }
  447. }
  448. }
  449. Function {refresh()} {} {
  450. code {
  451. SUBparameters->update();
  452. for (int i=0;i<MAX_SUB_HARMONICS;i++) h[i]->refresh();
  453. //globalfiltergroup->redraw();
  454. //ampenv->refresh();
  455. //bandwidthenvelopegroup->refresh();
  456. //freqenvelopegroup->refresh();
  457. //filterui->refresh();
  458. //filterenv->refresh();} {}
  459. }
  460. Function {SUBnoteUI(Fl_Osc_Interface *osc_, std::string loc_)} {} {
  461. code {osc = osc_;
  462. loc = loc_;
  463. make_window();} {}
  464. }
  465. Function {~SUBnoteUI()} {} {
  466. code {//for (int i=0;i<MAX_SUB_HARMONICS;i++) delete (h[i]);
  467. SUBparameters->hide();
  468. delete(SUBparameters);} {}
  469. }
  470. decl {Fl_Osc_Interface *osc;} {private local
  471. }
  472. decl {std::string loc;} {private local
  473. }
  474. decl {SUBnoteharmonic *h[MAX_SUB_HARMONICS];} {private local
  475. }
  476. }