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.

896 lines
30KB

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