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.

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