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.

938 lines
31KB

  1. # data file for the Fltk User Interface Designer (fluid)
  2. version 1.0302
  3. header_name {.h}
  4. code_name {.cc}
  5. decl {\#include "../Params/PADnoteParameters.h"} {public local
  6. }
  7. decl {\#include "ResonanceUI.h"} {public local
  8. }
  9. decl {\#include <FL/Fl_Box.H>} {public local
  10. }
  11. decl {\#include <FL/Fl_Group.H>} {public local
  12. }
  13. decl {\#include <FL/Fl_File_Chooser.H>} {public local
  14. }
  15. decl {\#include <math.h>} {private local
  16. }
  17. decl {\#include <stdio.h>} {private local
  18. }
  19. decl {\#include <stdlib.h>} {private local
  20. }
  21. decl {\#include <string.h>} {private local
  22. }
  23. decl {\#include <string>} {public local
  24. }
  25. decl {\#include "Osc_IntModel.h"} {private local
  26. }
  27. decl {\#include "Fl_Osc_TSlider.H"} {public local
  28. }
  29. decl {\#include "Fl_Osc_VSlider.H"} {public local
  30. }
  31. decl {\#include "EnvelopeUI.h"} {public local
  32. }
  33. decl {\#include "LFOUI.h"} {public local
  34. }
  35. decl {\#include "FilterUI.h"} {public local
  36. }
  37. decl {\#include "OscilGenUI.h"} {public local
  38. }
  39. decl {\#include "Fl_PADnoteOvertonePosition.h"} {public local
  40. }
  41. decl {\#include "Fl_PADnoteHarmonicProfile.h"} {public local
  42. }
  43. decl {\#include "PresetsUI.h"} {public local
  44. }
  45. class PADnoteUI {open : {public PresetsUI_}
  46. } {
  47. Function {PADnoteUI(std::string location_, Fl_Osc_Interface *osc_)} {open
  48. } {
  49. code {assert(osc_);
  50. assert(!location_.empty());
  51. location=location_;
  52. oscui=NULL;
  53. osc_i = osc_;
  54. resui=new ResonanceUI(osc_i, location+"resonance/");
  55. initialized = false;
  56. applybutton = NULL;
  57. make_window();
  58. apply_watcher = new Osc_IntModel(osc_i);
  59. apply_watcher->callback=[this](int needsPrepare) {
  60. if(needsPrepare) {
  61. applybutton->color(FL_RED);
  62. applybutton->redraw();
  63. if(oscui) {
  64. oscui->applybutton->color(FL_RED);
  65. oscui->applybutton->redraw();
  66. }
  67. if(resui) {
  68. resui->applybutton->color(FL_RED);
  69. resui->applybutton->redraw();
  70. }
  71. } else {
  72. applybutton->color(FL_GRAY);
  73. applybutton->redraw();
  74. if(oscui) {
  75. oscui->applybutton->color(FL_GRAY);
  76. oscui->applybutton->redraw();
  77. }
  78. if(resui) {
  79. resui->applybutton->color(FL_GRAY);
  80. resui->applybutton->redraw();
  81. }
  82. }
  83. };
  84. apply_watcher->doUpdate(location+"needPrepare");
  85. initialized = true;} {}
  86. }
  87. Function {make_window()} {open
  88. } {
  89. Fl_Window padnotewindow {
  90. label {PAD synth Parameters} open
  91. xywh {52 324 535 430} type Double hide
  92. class Fl_Osc_Window
  93. } {
  94. Fl_Box dummy {
  95. xywh {25 25 25 25}
  96. code0 {padnotewindow->init(osc_i, location);}
  97. }
  98. Fl_Tabs {} {
  99. callback {if (o->value()!=harmonicstructuregroup) applybutton->hide();
  100. else applybutton->show();} open
  101. xywh {0 0 535 395} box UP_FRAME
  102. } {
  103. Fl_Group harmonicstructuregroup {
  104. label {Harmonic Structure} open
  105. xywh {0 20 535 375} box UP_FRAME
  106. class Fl_Osc_Group
  107. } {
  108. Fl_Group bwprofilegroup {open
  109. xywh {5 30 90 260} box UP_FRAME
  110. class Fl_Osc_Group
  111. } {
  112. Fl_Dial hpbasepar1 {
  113. label Width
  114. callback {if(hpui) hpui->update();
  115. cbwidget->do_callback();}
  116. xywh {20 75 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  117. code2 {o->init("Php.base.par1");}
  118. class Fl_Osc_Dial
  119. }
  120. Fl_Choice hpbasetype {
  121. label {Base Type}
  122. callback {if(initialized) {hprofile->redraw();
  123. hpui->update();
  124. cbwidget->do_callback();}}
  125. xywh {15 45 75 15} down_box BORDER_BOX labelsize 10 align 5 textsize 10
  126. code0 {o->init("Php.base.type");}
  127. class Fl_Osc_Choice
  128. } {
  129. MenuItem {} {
  130. label Gauss
  131. xywh {15 15 100 20} labelfont 1 labelsize 10
  132. }
  133. MenuItem {} {
  134. label Square
  135. xywh {25 25 100 20} labelfont 1 labelsize 10
  136. }
  137. MenuItem {} {
  138. label DoubleExp
  139. xywh {35 35 100 20} labelfont 1 labelsize 10
  140. }
  141. }
  142. Fl_Dial hpfreqmult {
  143. label FreqMlt
  144. callback {hpui->update();
  145. cbwidget->do_callback();}
  146. xywh {55 75 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  147. code0 {o->init("Php.freqmult");}
  148. class Fl_Osc_Dial
  149. }
  150. Fl_Dial hpmpar1 {
  151. label Str
  152. callback {hpui->update();
  153. cbwidget->do_callback();}
  154. xywh {15 115 20 20} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  155. code0 {o->init("Php.modulator.par1");}
  156. class Fl_Osc_Dial
  157. }
  158. Fl_Dial hpmfreq {
  159. label SFreq
  160. callback {hpui->update();
  161. cbwidget->do_callback();}
  162. xywh {40 115 20 20} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  163. code0 {o->init("Php.modulator.freq");}
  164. class Fl_Osc_Dial
  165. }
  166. Fl_Group {} {
  167. xywh {10 160 80 105} box BORDER_BOX
  168. } {
  169. Fl_Choice hpamptype {
  170. label AmpMultiplier
  171. callback {if(initialized) {hprofile->redraw();
  172. hpui->update();
  173. cbwidget->do_callback();}}
  174. xywh {15 175 70 15} down_box BORDER_BOX labelsize 10 align 5 textsize 10
  175. code0 {o->init("Php.amp.type");}
  176. class Fl_Osc_Choice
  177. } {
  178. MenuItem {} {
  179. label OFF
  180. xywh {45 45 100 20} labelfont 1 labelsize 10
  181. }
  182. MenuItem {} {
  183. label Gauss
  184. xywh {55 55 100 20} labelfont 1 labelsize 10
  185. }
  186. MenuItem {} {
  187. label Sine
  188. xywh {65 65 100 20} labelfont 1 labelsize 10
  189. }
  190. MenuItem {} {
  191. label Flat
  192. xywh {75 75 100 20} labelfont 1 labelsize 10
  193. }
  194. }
  195. Fl_Choice hpampmode {
  196. label AmpMode
  197. callback {if(initialized) {hpui->update();
  198. cbwidget->do_callback();}}
  199. xywh {15 205 70 15} down_box BORDER_BOX labelsize 10 align 5 textsize 10
  200. code0 {o->init("Php.amp.mode");}
  201. class Fl_Osc_Choice
  202. } {
  203. MenuItem {} {
  204. label Sum
  205. xywh {60 60 100 20} labelfont 1 labelsize 10
  206. }
  207. MenuItem {} {
  208. label Mult
  209. xywh {70 70 100 20} labelfont 1 labelsize 10
  210. }
  211. MenuItem {} {
  212. label Div1
  213. xywh {80 80 100 20} labelfont 1 labelsize 10
  214. }
  215. MenuItem {} {
  216. label Div2
  217. xywh {90 90 100 20} labelfont 1 labelsize 10
  218. }
  219. }
  220. Fl_Dial hpamppar1 {
  221. label Par1
  222. callback {hpui->update();
  223. cbwidget->do_callback();}
  224. xywh {15 235 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  225. code0 {o->init("Php.amp.par1");}
  226. class Fl_Osc_Dial
  227. }
  228. Fl_Dial hpamppar2 {
  229. label Par2
  230. callback {hpui->update();
  231. cbwidget->do_callback();}
  232. xywh {55 235 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  233. code0 {o->init("Php.amp.par2");}
  234. class Fl_Osc_Dial
  235. }
  236. }
  237. Fl_Check_Button hpautoscale {
  238. label autoscale
  239. callback {
  240. if(initialized) {
  241. hpui->update();
  242. hprofile->redraw();
  243. cbwidget->do_callback();}}
  244. xywh {10 270 60 15} down_box DOWN_BOX labelsize 10
  245. code0 {o->init("Php.autoscale");}
  246. class Fl_Osc_Check
  247. }
  248. Fl_Choice hponehalf {
  249. callback {if(initialized) {hprofile->redraw();
  250. hpui->update();
  251. cbwidget->do_callback();}}
  252. xywh {10 143 80 15} down_box BORDER_BOX labelsize 10 align 5 textsize 10
  253. code0 {o->init("Php.onehalf");}
  254. class Fl_Osc_Choice
  255. } {
  256. MenuItem {} {
  257. label Full
  258. xywh {25 25 100 20} labelfont 1 labelsize 10
  259. }
  260. MenuItem {} {
  261. label {Upper Half}
  262. xywh {45 45 100 20} labelfont 1 labelsize 10
  263. }
  264. MenuItem {} {
  265. label {Lower Half}
  266. xywh {35 35 100 20} labelfont 1 labelsize 10
  267. }
  268. }
  269. Fl_Dial hpwidth {
  270. label Size
  271. callback {hpui->update();
  272. cbwidget->do_callback();}
  273. xywh {65 115 20 20} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  274. code0 {o->init("Php.width");}
  275. class Fl_Osc_Dial
  276. }
  277. }
  278. Fl_Group oscilgroup {open
  279. xywh {100 155 270 135} box THIN_DOWN_BOX color 32 selection_color 71 labelcolor 179 align 6
  280. code0 {oscilgroup->base = location; oscilgroup->ext="oscilgen/"; oscilgroup->osc = osc_i;}
  281. code1 {osc=new Fl_Oscilloscope(o->x(),o->y(),o->w(),o->h(),"");osc->init(false);}
  282. class Fl_Osc_Group
  283. } {}
  284. Fl_Button {} {
  285. label Change
  286. callback {if (oscui!=NULL) delete (oscui);
  287. oscui=new OscilEditor(false, location+"oscilgen/",osc_i);}
  288. xywh {375 270 60 20} box THIN_UP_BOX labelfont 1 labelsize 11
  289. }
  290. Fl_Box cbwidget {
  291. label {Harmonic Content}
  292. callback {opui->update();
  293. if(applybutton) {
  294. applybutton->color(FL_RED);
  295. applybutton->redraw();}}
  296. xywh {125 135 205 20} align 16
  297. }
  298. Fl_Button {} {
  299. label Resonance
  300. callback {resui->resonancewindow->redraw();
  301. resui->resonancewindow->show();
  302. resui->setcbwidget(cbwidget,applybutton);}
  303. xywh {375 225 80 20} box THIN_UP_BOX
  304. }
  305. Fl_Dial bwdial {
  306. label BandWidth
  307. callback {o->oscWrite("bandwidthvalue");cbwidget->do_callback();}
  308. xywh {15 295 35 35} box ROUND_UP_BOX labelsize 10 maximum 1000 step 1
  309. code0 {o->init("Pbandwidth");}
  310. class Fl_Osc_Dial
  311. }
  312. Fl_Value_Output bwcents {
  313. label cents
  314. xywh {55 305 55 15} labelsize 10 align 6 maximum 10000 step 0.1
  315. code0 {o->init("bandwidthvalue");}
  316. class Fl_Osc_Output
  317. }
  318. Fl_Group {} {open
  319. xywh {315 295 215 45} box UP_FRAME
  320. } {
  321. Fl_Choice hrpostype {
  322. label OvertonesPosition
  323. callback {if(initialized) {opui->update();
  324. cbwidget->do_callback();}}
  325. xywh {325 310 80 20} down_box BORDER_BOX labelsize 10 align 5 textsize 11
  326. code0 {o->init("Phrpos.type");}
  327. class Fl_Osc_Choice
  328. } {
  329. MenuItem {} {
  330. label Harmonic
  331. xywh {70 70 100 20} labelfont 1 labelsize 11
  332. }
  333. MenuItem {} {
  334. label ShiftU
  335. xywh {80 80 100 20} labelfont 1 labelsize 11
  336. }
  337. MenuItem {} {
  338. label ShiftL
  339. xywh {90 90 100 20} labelfont 1 labelsize 11
  340. }
  341. MenuItem {} {
  342. label PowerU
  343. xywh {90 90 100 20} labelfont 1 labelsize 11
  344. }
  345. MenuItem {} {
  346. label PowerL
  347. xywh {100 100 100 20} labelfont 1 labelsize 11
  348. }
  349. MenuItem {} {
  350. label Sine
  351. xywh {110 110 100 20} labelfont 1 labelsize 11
  352. }
  353. MenuItem {} {
  354. label Power
  355. xywh {120 120 100 20} labelfont 1 labelsize 11
  356. }
  357. MenuItem {} {
  358. label Shift selected
  359. xywh {130 130 100 20} labelfont 1 labelsize 11
  360. }
  361. }
  362. Fl_Dial hrpospar1 {
  363. label Par1
  364. callback {opui->update();
  365. hpui->update();
  366. cbwidget->do_callback();}
  367. xywh {425 310 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  368. code0 {o->init("Phrpos.par1");}
  369. class Fl_Osc_Dial
  370. }
  371. Fl_Dial hrpospar2 {
  372. label Par2
  373. callback {opui->update();
  374. cbwidget->do_callback();}
  375. xywh {460 310 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  376. code0 {o->init("Phrpos.par2");}
  377. class Fl_Osc_Dial
  378. }
  379. Fl_Dial hrpospar3 {
  380. label ForceH
  381. callback {opui->update();
  382. cbwidget->do_callback();}
  383. xywh {495 310 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  384. code0 {o->init("Phrpos.par3");}
  385. class Fl_Osc_Dial
  386. }
  387. }
  388. Fl_Choice bwscale {
  389. label {Bandwidth Scale}
  390. callback {if(initialized) {cbwidget->do_callback();}}
  391. xywh {120 305 80 20} down_box BORDER_BOX labelsize 10 align 5 textsize 11
  392. code0 {o->init("Pbwscale");}
  393. class Fl_Osc_Choice
  394. } {
  395. MenuItem {} {
  396. label Normal
  397. xywh {95 95 100 20} labelfont 1 labelsize 11
  398. }
  399. MenuItem {} {
  400. label EqualHz
  401. xywh {105 105 100 20} labelfont 1 labelsize 11
  402. }
  403. MenuItem {} {
  404. label Quater
  405. xywh {115 115 100 20} labelfont 1 labelsize 11
  406. }
  407. MenuItem {} {
  408. label Half
  409. xywh {125 125 100 20} labelfont 1 labelsize 11
  410. }
  411. MenuItem {} {
  412. label {75%}
  413. xywh {135 135 100 20} labelfont 1 labelsize 11
  414. }
  415. MenuItem {} {
  416. label {150%}
  417. xywh {145 145 100 20} labelfont 1 labelsize 11
  418. }
  419. MenuItem {} {
  420. label Double
  421. xywh {145 145 100 20} labelfont 1 labelsize 11
  422. }
  423. MenuItem {} {
  424. label {Inv.Half}
  425. xywh {155 155 100 20} labelfont 1 labelsize 11
  426. }
  427. }
  428. Fl_Group overtonepos {
  429. xywh {5 345 525 45} box FLAT_BOX color 51 selection_color 218 labelcolor 63
  430. code0 {opui=new PADnoteOvertonePosition(o->x(),o->y(),o->w(),o->h(),"");}
  431. code1 {opui->init();}
  432. } {}
  433. Fl_Choice qsamplesize {
  434. label {Sample Size}
  435. callback {if(initialized) {cbwidget->do_callback();}}
  436. xywh {375 190 115 20} down_box BORDER_BOX labelsize 10 align 5 textsize 11
  437. code0 {o->init("Pquality.samplesize");}
  438. class Fl_Osc_Choice
  439. } {
  440. MenuItem {} {
  441. label {16k (Tiny)}
  442. xywh {155 155 100 20} labelfont 1 labelsize 11
  443. }
  444. MenuItem {} {
  445. label 32k
  446. xywh {165 165 100 20} labelfont 1 labelsize 11
  447. }
  448. MenuItem {} {
  449. label {64k (Small)}
  450. xywh {175 175 100 20} labelfont 1 labelsize 11
  451. }
  452. MenuItem {} {
  453. label 128k
  454. xywh {185 185 100 20} labelfont 1 labelsize 11
  455. }
  456. MenuItem {} {
  457. label {256k (Normal)}
  458. xywh {205 205 100 20} labelfont 1 labelsize 11
  459. }
  460. MenuItem {} {
  461. label 512k
  462. xywh {200 200 100 20} labelfont 1 labelsize 11
  463. }
  464. MenuItem {} {
  465. label {1M (Big)}
  466. xywh {205 205 100 20} labelfont 1 labelsize 11
  467. }
  468. }
  469. Fl_Choice qsmpoct {
  470. label {smp/oct}
  471. callback {if(initialized) cbwidget->do_callback();}
  472. xywh {430 155 45 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11
  473. code0 {o->init("Pquality.smpoct");}
  474. class Fl_Osc_Choice
  475. } {
  476. MenuItem {} {
  477. label {0.5}
  478. xywh {10 10 100 20} labelfont 1 labelsize 11
  479. }
  480. MenuItem {} {
  481. label 1
  482. xywh {0 0 100 20} labelfont 1 labelsize 11
  483. }
  484. MenuItem {} {
  485. label 2
  486. xywh {10 10 100 20} labelfont 1 labelsize 11
  487. }
  488. MenuItem {} {
  489. label 3
  490. xywh {20 20 100 20} labelfont 1 labelsize 11
  491. }
  492. MenuItem {} {
  493. label 4
  494. xywh {30 30 100 20} labelfont 1 labelsize 11
  495. }
  496. MenuItem {} {
  497. label 6
  498. xywh {40 40 100 20} labelfont 1 labelsize 11
  499. }
  500. MenuItem {} {
  501. label 12
  502. xywh {50 50 100 20} labelfont 1 labelsize 11
  503. }
  504. }
  505. Fl_Choice qoct {
  506. label {no.oct}
  507. callback {if(initialized) cbwidget->do_callback();}
  508. xywh {480 155 45 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11
  509. code0 {o->init("Pquality.oct");}
  510. class Fl_Osc_Choice
  511. } {
  512. MenuItem {} {
  513. label 1
  514. xywh {10 10 100 20} labelfont 1 labelsize 11
  515. }
  516. MenuItem {} {
  517. label 2
  518. xywh {20 20 100 20} labelfont 1 labelsize 11
  519. }
  520. MenuItem {} {
  521. label 3
  522. xywh {30 30 100 20} labelfont 1 labelsize 11
  523. }
  524. MenuItem {} {
  525. label 4
  526. xywh {40 40 100 20} labelfont 1 labelsize 11
  527. }
  528. MenuItem {} {
  529. label 5
  530. xywh {50 50 100 20} labelfont 1 labelsize 11
  531. }
  532. MenuItem {} {
  533. label 6
  534. xywh {60 60 100 20} labelfont 1 labelsize 11
  535. }
  536. MenuItem {} {
  537. label 7
  538. xywh {70 70 100 20} labelfont 1 labelsize 11
  539. }
  540. MenuItem {} {
  541. label 8
  542. xywh {80 80 100 20} labelfont 1 labelsize 11
  543. }
  544. }
  545. Fl_Choice qbasenote {
  546. label base
  547. callback {if(initialized) cbwidget->do_callback();}
  548. xywh {375 155 50 20} down_box BORDER_BOX labelsize 11 align 5 textsize 11
  549. code0 {o->init("Pquality.basenote");}
  550. class Fl_Osc_Choice
  551. } {
  552. MenuItem {} {
  553. label {C-2}
  554. xywh {10 10 100 20} labelfont 1
  555. }
  556. MenuItem {} {
  557. label {G-2}
  558. xywh {20 20 100 20} labelfont 1
  559. }
  560. MenuItem {} {
  561. label {C-3}
  562. xywh {20 20 100 20} labelfont 1
  563. }
  564. MenuItem {} {
  565. label {G-3}
  566. xywh {30 30 100 20} labelfont 1
  567. }
  568. MenuItem {} {
  569. label {C-4}
  570. xywh {30 30 100 20} labelfont 1
  571. }
  572. MenuItem {} {
  573. label {G-4}
  574. xywh {40 40 100 20} labelfont 1
  575. }
  576. MenuItem {} {
  577. label {C-5}
  578. xywh {40 40 100 20} labelfont 1
  579. }
  580. MenuItem {} {
  581. label {G-5}
  582. xywh {50 50 100 20} labelfont 1
  583. }
  584. MenuItem {} {
  585. label {G-6}
  586. xywh {60 60 100 20} labelfont 1
  587. }
  588. }
  589. Fl_Group hprofile {
  590. xywh {100 45 430 90} box FLAT_BOX color 51 selection_color 218 labelcolor 63
  591. code0 {hpui=new PADnoteHarmonicProfile(o->x(),o->y(),o->w(),o->h(),"");}
  592. code1 {hpui->init();}
  593. } {}
  594. Fl_Box {} {
  595. label {Profile of One Harmonic (Frequency Distribution)}
  596. xywh {160 25 315 20}
  597. }
  598. Fl_Choice spectrummode {
  599. label {Spectrum Mode}
  600. callback {
  601. if (o->value()==0){
  602. bwprofilegroup->activate();
  603. bwdial->activate();
  604. bwcents->activate();
  605. hprofile->activate();
  606. hprofile->color(51);
  607. bwscale->activate();
  608. } else {
  609. bwprofilegroup->deactivate();
  610. bwdial->deactivate();
  611. bwcents->deactivate();
  612. hprofile->deactivate();
  613. hprofile->color(48);
  614. bwscale->deactivate();
  615. };
  616. hpui->update();
  617. cbwidget->do_callback();}
  618. xywh {220 305 90 20} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 11
  619. code0 {o->init("Pmode");}
  620. class Fl_Osc_Choice
  621. } {
  622. MenuItem {} {
  623. label Bandwidth
  624. xywh {105 105 100 20} labelfont 1 labelsize 11
  625. }
  626. MenuItem {} {
  627. label Discrete
  628. xywh {125 125 100 20} labelfont 1 labelsize 11
  629. }
  630. MenuItem {} {
  631. label Continous
  632. xywh {115 115 100 20} labelfont 1 labelsize 11
  633. }
  634. }
  635. }
  636. Fl_Group {} {
  637. label {Envelopes&LFOs} open
  638. xywh {0 20 535 375} box UP_FRAME hide
  639. } {
  640. Fl_Group {} {
  641. label FREQUENCY open
  642. xywh {5 275 525 115} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17
  643. } {
  644. Fl_Group freqenv {
  645. label {PADSynth - Frequency Envelope} open
  646. xywh {10 315 205 70} box FLAT_BOX color 51 align 144
  647. code0 {o->init(ENV_ASR, osc_i, location, "FreqEnvelope/");}
  648. class EnvelopeUI
  649. } {}
  650. Fl_Counter octave {
  651. label Octave
  652. tooltip Octave xywh {470 295 45 15} type Simple labelsize 10 align 1 minimum -8 maximum 7 step 1 textfont 1 textsize 11
  653. code0 {o->init("octave");}
  654. class Fl_Osc_Counter
  655. }
  656. Fl_Counter coarsedet {
  657. label {Coarse det.}
  658. tooltip {Coarse Detune} xywh {455 365 70 20} type Simple labelsize 10 align 5 minimum -64 maximum 63 step 1 textfont 1 textsize 11
  659. code0 {o->init("coarsedetune");}
  660. code3 {o->lstep(10);}
  661. class Fl_Osc_Counter
  662. }
  663. Fl_Group freqlfo {
  664. label {Frequency LFO } open
  665. xywh {215 315 230 70} box FLAT_BOX color 47 align 144
  666. code0 {o->init(osc_i, location, "FreqLfo/");}
  667. class LFOUI
  668. } {}
  669. Fl_Slider detune {
  670. callback {o->oscWrite("detunevalue");}
  671. tooltip {Fine Detune (cents)} xywh {60 295 295 15} type {Horz Knob} box NO_BOX minimum -8192 maximum 8191 step 1
  672. code0 {o->init("PDetune", 'i');}
  673. class Fl_Osc_Slider
  674. }
  675. Fl_Value_Output detunevalueoutput {
  676. label Detune
  677. xywh {12 295 45 15} labelsize 10 align 5 minimum -5000 maximum 5000 step 0.01 textfont 1 textsize 10
  678. code0 {o->init("detunevalue");}
  679. class Fl_Osc_Output
  680. }
  681. Fl_Choice detunetype {
  682. label {Detune Type}
  683. callback {o->oscWrite("detunevalue");} open
  684. xywh {450 330 75 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
  685. code0 {o->add("L35cents");o->add("L10cents");o->add("E100cents");o->add("E1200cents");}
  686. code1 {o->init("PDetuneType",1);}
  687. class Fl_Osc_Choice
  688. } {}
  689. Fl_Check_Button hz440 {
  690. label 440Hz
  691. callback {if (o->value()==0) fixedfreqetdial->deactivate();
  692. else fixedfreqetdial->activate();}
  693. tooltip {set the base frequency to 440Hz} xywh {365 295 50 15} down_box DOWN_BOX labelfont 1 labelsize 10
  694. code0 {o->init("Pfixedfreq");}
  695. class Fl_Osc_Check
  696. }
  697. Fl_Dial fixedfreqetdial {
  698. label {Eq.T.}
  699. tooltip {How the frequency varies acording to the keyboard (leftmost for fixed frequency)} xywh {420 295 15 15} box ROUND_UP_BOX labelsize 10 align 8 maximum 127 step 1
  700. code0 {o->init("PfixedfreqET");}
  701. class Fl_Osc_Dial
  702. }
  703. }
  704. Fl_Group {} {
  705. label AMPLITUDE open
  706. xywh {5 25 240 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17
  707. } {
  708. Fl_Value_Slider volume {
  709. label Vol
  710. tooltip Volume xywh {10 50 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1
  711. code0 {o->init("PVolume", 'i');}
  712. class Fl_Osc_VSlider
  713. }
  714. Fl_Value_Slider vsns {
  715. label {V.Sns}
  716. tooltip {Velocity Sensing Function (rightmost to disable)} xywh {10 70 160 15} type {Horz Knob} box NO_BOX labelsize 11 align 8 maximum 127 step 1
  717. code0 {o->init("PAmpVelocityScaleFunction");}
  718. class Fl_Osc_VSlider
  719. }
  720. Fl_Dial pan {
  721. label Pan
  722. tooltip {Panning (leftmost is Random)} xywh {210 45 30 30} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
  723. code0 {o->init("PPanning");}
  724. class Fl_Osc_Dial
  725. }
  726. Fl_Dial {} {
  727. label De-pop selected
  728. tooltip {Pop suppression} xywh {208 238 20 20} type Float labelsize 10 maximum 127 step 1 textfont 1 textsize 11
  729. code0 {o->init("Fadein_adjustment");}
  730. class Fl_Osc_Dial
  731. }
  732. Fl_Dial pstr {
  733. label {P.Str.}
  734. tooltip {Punch Strength} xywh {78 247 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  735. code0 {o->init("PPunchStrength");}
  736. class Fl_Osc_Dial
  737. }
  738. Fl_Dial pt {
  739. label {P.t.}
  740. tooltip {Punch Time (duration)} xywh {108 247 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  741. code0 {o->init("PPunchTime");}
  742. class Fl_Osc_Dial
  743. }
  744. Fl_Dial pstc {
  745. label {P.Stc.}
  746. tooltip {Punch Stretch} xywh {138 247 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  747. code0 {o->init("PPunchStretch");}
  748. class Fl_Osc_Dial
  749. }
  750. Fl_Dial pvel {
  751. label {P.Vel.}
  752. tooltip {Punch Velocity Sensing} xywh {168 247 25 25} box ROUND_UP_BOX labelsize 10 align 1 maximum 127 step 1
  753. code0 {o->init("PPunchVelocitySensing");}
  754. class Fl_Osc_Dial
  755. }
  756. Fl_Group ampenv {
  757. label {PADSynth - Amplitude Envelope} open
  758. xywh {10 95 205 70} box FLAT_BOX color 51 align 144
  759. code0 {o->init(ENV_ADSR, osc_i, location, "AmpEnvelope/");}
  760. class EnvelopeUI
  761. } {}
  762. Fl_Group amplfo {
  763. label {Amplitude LFO } open
  764. xywh {10 165 230 70} box FLAT_BOX color 47 align 144
  765. code0 {o->init(osc_i, location, "AmpLfo/");}
  766. class LFOUI
  767. } {}
  768. Fl_Check_Button stereo {
  769. label Stereo
  770. callback {hprofile->redraw();}
  771. xywh {10 245 70 25} down_box DOWN_BOX labelsize 12
  772. code0 {o->init("PStereo");}
  773. class Fl_Osc_Check
  774. }
  775. }
  776. Fl_Group {} {
  777. label FILTER open
  778. xywh {245 25 285 250} box UP_FRAME labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 17
  779. } {
  780. Fl_Group filterenv {
  781. label {PADSynth - Filter Envelope} open
  782. xywh {250 130 275 70} box FLAT_BOX color 51 align 144
  783. code0 {o->init(ENV_ADSR_FILTER, osc_i, location, "FilterEnvelope/");}
  784. class EnvelopeUI
  785. } {}
  786. Fl_Group filterlfo {
  787. label {Filter LFO } open
  788. xywh {250 200 230 70} box FLAT_BOX color 47 align 144
  789. code0 {o->init(osc_i, location, "FilterLfo/");}
  790. class LFOUI
  791. } {}
  792. Fl_Group filterui {
  793. label {PADsynth - Filter} open
  794. xywh {250 50 275 75} box FLAT_BOX color 50 align 144
  795. code0 {o->init(location + "PFilter",
  796. osc_i, location, "GlobalFilter/");}
  797. class FilterUI
  798. } {}
  799. }
  800. }
  801. }
  802. Fl_Button applybutton {
  803. label {Apply Changes}
  804. callback {osc_i->requestValue(location+"prepare");
  805. //MiddleWare::preparePadSynth(location.c_str(), pars);
  806. o->color(FL_GRAY);
  807. if (oscui!=NULL) {
  808. oscui->applybutton->color(FL_GRAY);
  809. oscui->applybutton->redraw();
  810. };
  811. if (resui!=NULL) {
  812. resui->applybutton->color(FL_GRAY);
  813. resui->applybutton->redraw();
  814. };}
  815. xywh {200 400 135 25} box THIN_UP_BOX
  816. code0 {o->color(FL_RED);}
  817. }
  818. Fl_Button {} {
  819. label Close
  820. callback {padnotewindow->hide();}
  821. xywh {470 400 60 25} box THIN_UP_BOX
  822. }
  823. Fl_Button {} {
  824. label C
  825. callback {presetsui->copy(padnotewindow->loc());}
  826. xywh {400 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  827. }
  828. Fl_Button {} {
  829. label P
  830. callback {presetsui->paste(padnotewindow->loc(),this);}
  831. xywh {430 405 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  832. }
  833. Fl_Button {} {
  834. label export
  835. callback {char *filename;
  836. filename=fl_file_chooser("Export samples:","(*.wav)",NULL,0);
  837. if (filename==NULL) return;
  838. fl_filename_setext(filename,"");
  839. o->oscWrite("export2wav", "s", filename);}
  840. tooltip {export samples as wav file} xywh {5 400 55 25} box THIN_UP_BOX color 51 labelsize 11 align 128
  841. class Fl_Osc_Button
  842. }
  843. }
  844. }
  845. Function {refresh()} {open
  846. } {
  847. code {amplfo->refresh();
  848. freqlfo->refresh();
  849. filterlfo->refresh();
  850. ampenv->refresh();
  851. freqenv->refresh();
  852. filterenv->refresh();
  853. filterui->refresh();
  854. /* harmonic structure parametrs */
  855. resui->refresh();
  856. if (oscui) oscui->refresh();
  857. if (spectrummode->value()==0){
  858. bwprofilegroup->activate();
  859. bwdial->activate();
  860. bwcents->activate();
  861. hprofile->activate();
  862. hprofile->color(51);
  863. bwscale->activate();
  864. } else {
  865. bwprofilegroup->deactivate();
  866. bwdial->deactivate();
  867. bwcents->deactivate();
  868. hprofile->deactivate();
  869. hprofile->color(48);
  870. bwscale->activate();
  871. };
  872. hprofile->redraw();
  873. opui->update();
  874. osc->redraw();
  875. //MiddleWare::preparePadSynth(location.c_str(), pars);
  876. applybutton->color(FL_GRAY);
  877. applybutton->parent()->redraw();} {}
  878. }
  879. Function {~PADnoteUI()} {} {
  880. code {
  881. delete apply_watcher;
  882. delete(oscui);
  883. delete(resui);
  884. padnotewindow->hide();
  885. delete padnotewindow;} {}
  886. }
  887. decl {OscilEditor *oscui;} {public local
  888. }
  889. decl {bool initialized;}{private local
  890. }
  891. decl {Fl_Oscilloscope *osc;} {public local
  892. }
  893. decl {ResonanceUI *resui;} {public local
  894. }
  895. decl {std::string location;} {private local
  896. }
  897. decl {Fl_Osc_Interface *osc_i;} {private local
  898. }
  899. decl {PADnoteHarmonicProfile *hpui;} {private local
  900. }
  901. decl {PADnoteOvertonePosition *opui;} {private local
  902. }
  903. decl {class Osc_IntModel *apply_watcher;} {private local
  904. }
  905. }