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.

328 lines
9.3KB

  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 <stdio.h>} {public local
  10. }
  11. decl {\#include <math.h>} {public local
  12. }
  13. decl {\#include <stdlib.h>} {public local
  14. }
  15. decl {\#include <FL/Fl_File_Chooser.H>} {public local
  16. }
  17. decl {\#include "Fl_Osc_Button.H"} {public local
  18. }
  19. decl {\#include "Fl_Osc_Counter.H"} {public local
  20. }
  21. decl {\#include "Fl_Osc_Choice.H"} {public local
  22. }
  23. decl {\#include "Osc_IntModel.h"} {public local
  24. }
  25. decl {\#include "Fl_Osc_Check.H"} {public local
  26. }
  27. decl {\#include "Fl_Osc_Input.H"} {public local
  28. }
  29. decl {\#include "Fl_Osc_Numeric_Input.H"} {public local
  30. }
  31. decl {\#include "Fl_Osc_ListView.H"} {public local
  32. }
  33. decl {\#include "../globals.h"} {public local
  34. }
  35. decl {\#include "../Misc/Util.h"} {public local
  36. }
  37. class ConfigUI {} {
  38. Function {make_window()} {} {
  39. Fl_Window configwindow {
  40. label {ZynAddSubFX Settings}
  41. callback {o->hide();}
  42. xywh {554 443 510 370} type Double visible
  43. class Fl_Osc_Window
  44. } {
  45. Fl_Box dummy {
  46. xywh {25 25 25 25}
  47. code0 {configwindow->osc = osc;}
  48. code1 {configwindow->base = "/config/";}
  49. }
  50. Fl_Tabs {} {
  51. xywh {5 5 500 330}
  52. } {
  53. Fl_Group {} {
  54. label {Main settings}
  55. xywh {5 25 500 310}
  56. } {
  57. Fl_Group {} {
  58. label {Sample Rate}
  59. xywh {15 45 165 30} box ENGRAVED_FRAME
  60. } {
  61. Fl_Input samplerateinput {
  62. xywh {115 50 60 20} type Int textfont 1
  63. code0 {o->init("cfg.SampleRate");}
  64. class Fl_Osc_Numeric_Input
  65. }
  66. }
  67. Fl_Input {} {
  68. label {Buffer Size}
  69. tooltip {Internal Sound Buffer Size (samples)} xywh {190 45 60 20} type Int labelsize 11 align 129 textfont 1
  70. code0 {o->init("cfg.SoundBufferSize");}
  71. class Fl_Osc_Numeric_Input
  72. }
  73. Fl_Check_Button {} {
  74. label {Swap Stereo }
  75. xywh {15 80 95 20} box NO_BOX labelsize 11
  76. code0 {o->init("cfg.SwapStereo");}
  77. class Fl_Osc_Check
  78. }
  79. Fl_Choice oscilsize_widget {
  80. label OscilSize
  81. callback{
  82. oscilsize->updateVal((int)(o->value()+7));
  83. }
  84. tooltip {ADSynth Oscillator Size (samples)} xywh {175 80 75 20} down_box BORDER_BOX labelfont 1 labelsize 11 textsize 10
  85. } {
  86. MenuItem {} {
  87. label 128
  88. xywh {25 25 100 20} labelfont 1
  89. }
  90. MenuItem {} {
  91. label 256
  92. xywh {35 35 100 20} labelfont 1
  93. }
  94. MenuItem {} {
  95. label 512
  96. xywh {45 45 100 20} labelfont 1
  97. }
  98. MenuItem {} {
  99. label 1024
  100. xywh {45 45 100 20} labelfont 1
  101. }
  102. MenuItem {} {
  103. label 2048
  104. xywh {55 55 100 20} labelfont 1
  105. }
  106. MenuItem {} {
  107. label 4096
  108. xywh {55 55 100 20} labelfont 1
  109. }
  110. MenuItem {} {
  111. label 8192
  112. xywh {65 65 100 20} labelfont 1
  113. }
  114. MenuItem {} {
  115. label 16384
  116. xywh {75 75 100 20} labelfont 1
  117. }
  118. }
  119. Fl_Box {} {
  120. label {Most settings has effect only after ZynAddSubFX is restarted.}
  121. xywh {10 300 235 30} labelfont 1 labelsize 11 align 128
  122. }
  123. Fl_Counter {} {
  124. label {XML compression level}
  125. tooltip {gzip compression level (0 - uncompressed)} xywh {20 215 65 15} type Simple labelsize 11 align 8 minimum 0 maximum 9 step 1
  126. code0 {o->init("cfg.GzipCompression");}
  127. class Fl_Osc_Counter
  128. }
  129. Fl_Choice {} {
  130. label {PADsynth Interpolation}
  131. xywh {175 105 75 15} down_box BORDER_BOX labelsize 10 textsize 11
  132. code0 {o->init("cfg.Interpolation");}
  133. class Fl_Osc_Choice
  134. } {
  135. MenuItem {} {
  136. label {Linear(fast)}
  137. xywh {0 0 100 20} labelfont 1 labelsize 10
  138. }
  139. MenuItem {} {
  140. label {Cubic(slow)}
  141. xywh {10 10 100 20} labelfont 1 labelsize 10
  142. }
  143. }
  144. Fl_Choice {} {
  145. label {Virtual Keyboard Layout}
  146. xywh {155 235 85 20} down_box BORDER_BOX labelsize 12 textfont 1 textsize 11
  147. code0 {o->init("cfg.VirKeybLayout");}
  148. class Fl_Osc_Choice
  149. } {
  150. MenuItem {} {
  151. label { }
  152. xywh {5 5 100 20} labelfont 1 labelsize 11 deactivate
  153. }
  154. MenuItem {} {
  155. label QWERTY
  156. xywh {15 15 100 20} labelfont 1 labelsize 11
  157. }
  158. MenuItem {} {
  159. label Dvorak
  160. xywh {25 25 100 20} labelfont 1 labelsize 11
  161. }
  162. MenuItem {} {
  163. label QWERTZ
  164. xywh {35 35 100 20} labelfont 1 labelsize 11
  165. }
  166. MenuItem {} {
  167. label AZERTY
  168. xywh {45 45 100 20} labelfont 1 labelsize 11
  169. }
  170. }
  171. Fl_Check_Button {} {
  172. label {Ignore MIDI Program Change}
  173. xywh {10 255 220 20} down_box DOWN_BOX
  174. code0 {o->init("cfg.IgnoreProgramChange");}
  175. class Fl_Osc_Check
  176. }
  177. }
  178. Fl_Group {} {
  179. label {Bank root dirs}
  180. xywh {5 25 500 285} hide
  181. } {
  182. Fl_Browser rootsbrowse {
  183. callback {activatebutton_rootdir(o->value()!=0);}
  184. xywh {15 35 485 220} type Hold
  185. code0 {o->init("cfg.bankRootDirList");}
  186. class Fl_Osc_ListView
  187. }
  188. Fl_Button {} {
  189. label {Add root directory...}
  190. callback {const char *dirname;
  191. dirname=fl_dir_chooser("Add a root directory for banks:",NULL,0);
  192. if (dirname==NULL) return;
  193. rootsbrowse->append(dirname);}
  194. xywh {15 265 80 35} box THIN_UP_BOX align 128
  195. }
  196. Fl_Button removerootdirbutton {
  197. label {Remove root dir...}
  198. callback {if (rootsbrowse->value()!=0) {
  199. rootsbrowse->doRemove(rootsbrowse->value());
  200. };
  201. activatebutton_rootdir(false);}
  202. xywh {105 265 80 35} box THIN_UP_BOX align 128
  203. code0 {o->deactivate();}
  204. }
  205. Fl_Button makedefaultrootdirbutton {
  206. label {Make default}
  207. callback {int n=rootsbrowse->value();
  208. if (n!=0) {
  209. rootsbrowse->doMove(1,n);
  210. rootsbrowse->value(1);
  211. rootsbrowse->redraw();
  212. };
  213. activatebutton_rootdir(true);}
  214. xywh {190 265 80 35} box THIN_UP_BOX align 128
  215. code0 {o->deactivate();}
  216. }
  217. }
  218. Fl_Group {} {
  219. label {Presets dirs}
  220. xywh {5 25 500 285} hide
  221. } {
  222. Fl_Browser presetbrowse {
  223. callback {activatebutton_presetdir(o->value()!=0);}
  224. xywh {15 35 485 220} type Hold
  225. code0 {o->init("cfg.presetsDirList");}
  226. class Fl_Osc_ListView
  227. }
  228. Fl_Button {} {
  229. label {Add preset directory...}
  230. callback {const char *dirname;
  231. dirname=fl_dir_chooser("Add a preset directory :",NULL,0);
  232. if (dirname==NULL) return;
  233. presetbrowse->add(dirname);}
  234. xywh {15 265 80 35} box THIN_UP_BOX align 128
  235. }
  236. Fl_Button removepresetbutton {
  237. label {Remove preset dir...}
  238. callback {if (presetbrowse->value()!=0) {
  239. presetbrowse->remove(presetbrowse->value());
  240. };
  241. activatebutton_presetdir(false);}
  242. xywh {105 265 80 35} box THIN_UP_BOX align 128
  243. code0 {o->deactivate();}
  244. }
  245. Fl_Button makedefaultpresetbutton {
  246. label {Make default}
  247. callback {int n=presetbrowse->value();
  248. if (n!=0) {
  249. presetbrowse->move(1,n);
  250. presetbrowse->value(1);
  251. presetbrowse->redraw();
  252. };
  253. activatebutton_presetdir(true);}
  254. xywh {190 265 80 35} box THIN_UP_BOX align 128
  255. code0 {o->deactivate();}
  256. }
  257. }
  258. }
  259. Fl_Button {} {
  260. label Close
  261. callback {configwindow->hide();}
  262. xywh {200 345 105 20} box THIN_UP_BOX
  263. }
  264. }
  265. }
  266. Function {ConfigUI(Fl_Osc_Interface *osc_)} {} {
  267. code {
  268. osc = osc_;
  269. make_window();
  270. oscilsize = new Osc_IntModel(osc);
  271. oscilsize->callback = [this](int i){
  272. oscilsize_widget->value(i-7);
  273. };
  274. oscilsize->update("/config/cfg.OscilPower");
  275. } {}
  276. }
  277. Function {activatebutton_rootdir(bool active)} {} {
  278. code {if (active) {
  279. removerootdirbutton->activate();
  280. makedefaultrootdirbutton->activate();
  281. }else{
  282. removerootdirbutton->deactivate();
  283. makedefaultrootdirbutton->deactivate();
  284. };} {}
  285. }
  286. Function {activatebutton_presetdir(bool active)} {} {
  287. code {if (active) {
  288. removepresetbutton->activate();
  289. makedefaultpresetbutton->activate();
  290. }else{
  291. removepresetbutton->deactivate();
  292. makedefaultpresetbutton->deactivate();
  293. };} {}
  294. }
  295. Function {show()} {} {
  296. code {
  297. rootsbrowse->update();
  298. presetbrowse->update();
  299. configwindow->show();
  300. } {}
  301. }
  302. decl {class Fl_Osc_Interface *osc;} {public local
  303. }
  304. decl {class Osc_IntModel *oscilsize;} {public local
  305. }
  306. }