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.

1793 lines
57KB

  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-2009 Nasca Octavian Paul} {private local
  6. }
  7. decl {//License: GNU GPL version 2 or later} {private local
  8. }
  9. decl {\#include <stdlib.h>} {public local
  10. }
  11. decl {\#include <stdio.h>} {public local
  12. }
  13. decl {\#include <string.h>} {public local
  14. }
  15. decl {\#if ! defined(PLUGINVERSION) && HAS_X11
  16. \#include "zynaddsubfx.xpm"
  17. \#endif} {private local
  18. }
  19. decl {\#include "WidgetPDial.h"} {public local
  20. }
  21. decl {\#include "ADnoteUI.h"} {public local
  22. }
  23. decl {\#include "SUBnoteUI.h"} {public local
  24. }
  25. decl {\#include "EffUI.h"} {public local
  26. }
  27. decl {\#include "VirKeyboard.h"} {public local
  28. }
  29. decl {\#include "ConfigUI.h"} {public local
  30. }
  31. decl {\#include "BankUI.h"} {public local
  32. }
  33. decl {\#include "PartUI.h"} {public local
  34. }
  35. decl {\#include "MicrotonalUI.h"} {public local
  36. }
  37. decl {\#include "PresetsUI.h"} {public local
  38. }
  39. decl {\#include "NioUI.h"} {public global
  40. }
  41. decl {\#include "VuPartMeter.h"} {public local
  42. }
  43. decl {\#include "Fl_Osc_Dial.H"} {private local
  44. }
  45. decl {\#include "Osc_DataModel.h"} {private local
  46. }
  47. decl {\#include "Fl_Osc_TSlider.H"} {private local
  48. }
  49. decl {\#include "VuMasterMeter.h"} {public local
  50. }
  51. decl {\#include "PartNameButton.h"} {public local
  52. }
  53. decl {\#include "common.H"} {public local
  54. }
  55. decl {\#if USE_NSM
  56. \#include "NSM.H"
  57. extern NSM_Client *nsm;
  58. \#endif} {public local
  59. }
  60. decl {\#if !defined(PLUGINVERSION) && HAS_X11
  61. \#include <X11/xpm.h>
  62. \#endif} {public local
  63. }
  64. decl {\#include "../globals.h"} {public local
  65. }
  66. class SysEffSend {: {public Fl_Osc_Dial}
  67. } {
  68. Function {SysEffSend(int x,int y, int w, int h, const char *label=0):Fl_Osc_Dial(x,y,w,h,label)} {} {
  69. code {} {}
  70. }
  71. Function {init(int neff1,int neff2)} {} {
  72. code {//TODO figure out if this extra class is even needed
  73. minimum(0);
  74. maximum(127);
  75. step(1);
  76. labelfont(1);
  77. labelsize(10);
  78. align(FL_ALIGN_TOP);
  79. Fl_Osc_Dial::init("part"+to_s(neff1)+"/sysefxsend"+to_s(neff2));
  80. char tmp[20];snprintf(tmp,20,"%d->%d",neff1+1,neff2+1);
  81. this->copy_label(tmp);} {}
  82. }
  83. Function {~SysEffSend()} {} {
  84. code {hide();} {}
  85. }
  86. }
  87. class Panellistitem {open : {public Fl_Osc_Group}
  88. } {
  89. Function {make_window()} {open private
  90. } {
  91. Fl_Window panellistitem {open
  92. private xywh {632 715 100 260} type Double box NO_BOX
  93. class Fl_Group visible
  94. } {
  95. Fl_Group panellistitemgroup {open
  96. private xywh {0 20 70 240} box UP_FRAME
  97. code0 {/*if (master->part[npart]->Penabled==0) o->deactivate();*/}
  98. code1 {set_module_parameters( o );}
  99. } {
  100. Fl_Group {} {open
  101. xywh {45 65 15 110} box ENGRAVED_FRAME
  102. } {
  103. Fl_Box partvu {
  104. label {V U}
  105. xywh {45 65 15 110} box FLAT_BOX color 0 selection_color 75 labelcolor 55 align 128
  106. class VuPartMeter
  107. }
  108. }
  109. Fl_Button partname {
  110. label { }
  111. callback {if ((int)bankui->cbwig->value()!=(npart+1)){
  112. bankui->cbwig->value(npart+1);
  113. bankui->cbwig->do_callback();
  114. };
  115. bankui->show();}
  116. xywh {5 27 60 30} box THIN_DOWN_BOX down_box FLAT_BOX labelfont 1 labelsize 10 align 208
  117. code0 {o->ext = "Pname";o->oscRegister("Pname");}
  118. class PartNameButton
  119. }
  120. Fl_Slider partvolume {
  121. xywh {10 65 30 110} type {Vert Knob} box NO_BOX minimum 127 maximum 0 step 1 value 127
  122. code0 {o->init("Pvolume", 'i');}
  123. class Fl_Osc_TSlider
  124. }
  125. Fl_Dial partpanning {
  126. xywh {20 180 30 30} maximum 127 step 1
  127. code0 {o->init("Ppanning");o->reset_value=64;}
  128. class Fl_Osc_Dial
  129. }
  130. Fl_Button {} {
  131. label edit
  132. callback {if ((int)bankui->cbwig->value()!=(npart+1)){
  133. bankui->cbwig->value(npart+1);
  134. bankui->cbwig->do_callback();
  135. }
  136. if (Fl::event_shift())
  137. partui->instrumenteditwindow->show();
  138. else if (Fl::event_ctrl())
  139. partui->instrumentkitlist->show();
  140. }
  141. xywh {15 235 40 20} labelsize 10
  142. }
  143. Fl_Choice partrcv {
  144. tooltip {receive from Midi channel} xywh {10 213 50 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
  145. code0 {char nrstr[10]; for(int i=0;i<NUM_MIDI_CHANNELS;i++){sprintf(nrstr,"Ch%d",i+1);if (i!=9) o->add(nrstr); else o->add("Dr10");};}
  146. code1 {o->init("Prcvchn");}
  147. class Fl_Osc_Choice
  148. } {}
  149. }
  150. Fl_Check_Button partenabled {
  151. label 01
  152. callback {o->oscWrite("Penabled", o->value() ? "T" : "F");
  153. if ((int) o->value()==0) panellistitemgroup->deactivate();
  154. else {
  155. panellistitemgroup->activate();
  156. /*
  157. if ((int)bankui->cbwig->value()!=(npart+1)){
  158. bankui->cbwig->value(npart+1);
  159. bankui->cbwig->do_callback();
  160. };*/
  161. };
  162. o->redraw();}
  163. private xywh {5 0 45 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 24
  164. code0 {char tmp[10];snprintf(tmp,10,"%d",npart+1);o->copy_label(tmp);}
  165. code1 {o->init("Penabled");}
  166. class Fl_Osc_Check
  167. }
  168. }
  169. }
  170. Function {Panellistitem(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {} {
  171. code {npart=0;
  172. bankui=NULL;} {}
  173. }
  174. Function {init(int npart_,BankUI *bankui_, PartUI *partui_)} {} {
  175. code {npart=npart_;
  176. bankui=bankui_;
  177. partui=partui_;
  178. ext = "part"+to_s(npart)+"/";
  179. make_window();
  180. panellistitem->show();
  181. end();} {}
  182. }
  183. Function {refresh()} {} {
  184. code {
  185. partenabled->update();
  186. partrcv->update();
  187. partpanning->update();
  188. partvolume->update();
  189. partname->update();
  190. if ((int)bankui->cbwig->value()!=(npart+1))
  191. panellistitemgroup->color(fl_rgb_color(160,160,160));
  192. else
  193. panellistitemgroup->color(fl_rgb_color(50,190,240));
  194. panellistitemgroup->redraw();} {}
  195. }
  196. Function {~Panellistitem()} {} {
  197. code {} {}
  198. }
  199. decl {int npart;} {private local
  200. }
  201. decl {BankUI *bankui;} {private local
  202. }
  203. decl {PartUI *partui;} {private local
  204. }
  205. }
  206. class MasterUI {open
  207. } {
  208. Function {make_window()} {open
  209. } {
  210. Fl_Window masterwindow {
  211. label zynaddsubfx
  212. callback {if ((
  213. \#ifdef PLUGINVERSION
  214. 1
  215. \#elif USE_NSM
  216. (nsm && nsm->is_active())
  217. \#else
  218. 0
  219. \#endif
  220. || fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))) {
  221. close();
  222. };} open
  223. xywh {330 365 390 525} type Double xclass zynaddsubfx visible
  224. class Fl_Osc_Window
  225. } {
  226. Fl_Box dummy_again {
  227. xywh {25 25 25 25}
  228. code0 {masterwindow->init(osc, "");}
  229. }
  230. Fl_Group win_root {open
  231. xywh {0 0 390 525}
  232. class Fl_Osc_Group
  233. } {
  234. Fl_Menu_Bar mastermenu {
  235. xywh {0 0 390 25}
  236. } {
  237. Submenu {} {
  238. label {&File}
  239. xywh {5 5 100 20}
  240. } {
  241. MenuItem {} {
  242. label {&New (erase all)...}
  243. callback {do_new_master();}
  244. xywh {25 25 100 20}
  245. }
  246. MenuItem {} {
  247. label {&Revert changes...}
  248. callback {do_revert_changes();}
  249. xywh {25 25 100 20}
  250. }
  251. MenuItem {} {
  252. label {&Open Parameters...}
  253. callback {\#if USE_NSM
  254. if ( nsm && nsm->is_active() )
  255. {
  256. do_load_master();
  257. do_save_master( nsm->project_filename );
  258. }
  259. else
  260. \#endif
  261. {
  262. do_load_master();
  263. }}
  264. xywh {25 25 100 20}
  265. }
  266. MenuItem {} {
  267. label {&Save All Parameters...}
  268. callback {\#if USE_NSM
  269. if ( nsm && nsm->is_active() )
  270. {
  271. do_save_master( nsm->project_filename );
  272. }
  273. else
  274. \#endif
  275. {
  276. do_save_master();
  277. }}
  278. xywh {15 15 100 20} divider
  279. }
  280. MenuItem {} {
  281. label {&Load Midi Learn...}
  282. callback {char *filename;
  283. filename=fl_file_chooser("Open:","({*.xlz})",NULL,0);
  284. if (filename==NULL) return;
  285. osc->write("/load_xlz", "s", filename);}
  286. xywh {40 40 100 20}
  287. }
  288. MenuItem {} {
  289. label {Save Midi Learn...}
  290. callback {char *filename;
  291. int result;
  292. filename=fl_file_chooser("Save:","({*.xlz})",NULL,0);
  293. if (filename==NULL) return;
  294. filename=fl_filename_setext(filename,".xlz");
  295. result=fileexists(filename);
  296. if (result) {
  297. result=0;
  298. if (!fl_choice("The file exists. \\nOverwrite it?","No","Yes",NULL)) return;
  299. };
  300. osc->write("/save_xlz", "s", filename);}
  301. xywh {30 30 100 20} divider
  302. }
  303. MenuItem {} {
  304. label {&Load Scale Settings...}
  305. callback {char *filename;
  306. filename=fl_file_chooser("Open:","({*.xsz})",NULL,0);
  307. if (filename==NULL) return;
  308. osc->write("/load_xsz", "s", filename);
  309. /*
  310. if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not a scale file.");
  311. else if (result<0) fl_alert("Error: Could not load the file.");*/}
  312. xywh {40 40 100 20}
  313. }
  314. MenuItem {} {
  315. label {Save Sc&ale Settings ..}
  316. callback {char *filename;
  317. int result=0;
  318. filename=fl_file_chooser("Save:","({*.xsz})",NULL,0);
  319. if (filename==NULL) return;
  320. filename=fl_filename_setext(filename,".xsz");
  321. result=fileexists(filename);
  322. if (result) {
  323. result=0;
  324. if (!fl_choice("The file exists. \\nOverwrite it?","No","Yes",NULL)) return;
  325. };
  326. osc->write("/save_xsz", "s", filename);
  327. /*if (result<0) fl_alert("Error: Could not save the file.");*/}
  328. xywh {30 30 100 20}
  329. }
  330. MenuItem {} {
  331. label {Show Scale Settings...}
  332. callback {microtonalui->show();}
  333. xywh {5 5 100 20} divider
  334. }
  335. MenuItem {} {
  336. label {&Settings...}
  337. callback {configui->show();}
  338. xywh {30 30 100 20}
  339. }
  340. MenuItem {} {
  341. label {N&io Settings}
  342. callback {nioui.refresh();
  343. nioui.show();}
  344. xywh {5 5 36 21} divider
  345. }
  346. MenuItem {} {
  347. label {&Copyright...}
  348. callback {aboutwindow->show();}
  349. xywh {20 20 100 20} divider
  350. }
  351. MenuItem {} {
  352. label {E&xit}
  353. callback {masterwindow->do_callback();}
  354. xywh {15 15 100 20}
  355. }
  356. }
  357. Submenu {} {
  358. label {&Instrument}
  359. xywh {15 15 100 20}
  360. } {
  361. MenuItem {} {
  362. label {&Clear Instrument...}
  363. callback {if (fl_choice("Clear instrument's parameters ?","No","Yes",NULL)){
  364. // int npart=(int)npartcounter->value()-1;
  365. osc->write("/part"+to_s(npart)+"/clear");
  366. };
  367. updatepanel();}
  368. xywh {40 40 100 20}
  369. }
  370. MenuItem {} {
  371. label {&Open Instrument...}
  372. callback {const char *filename;
  373. filename=fl_file_chooser("Load:","({*.xiz})",NULL,0);
  374. if (filename==NULL) return;
  375. osc->write("/load_xiz", "is", npart, filename);
  376. npartcounter->do_callback();
  377. updatepanel();
  378. /*
  379. if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an instrument file.");
  380. else if (result<0) fl_alert("Error: Could not load the file.");*/}
  381. xywh {35 35 100 20}
  382. }
  383. MenuItem {} {
  384. label {&Save Instrument ...}
  385. callback {char *filename;
  386. filename=fl_file_chooser("Save:","({*.xiz})",NULL,0);
  387. if (filename==NULL) return;
  388. filename=fl_filename_setext(filename,".xiz");
  389. int result=fileexists(filename);
  390. if (result) {
  391. result=0;
  392. if (!fl_choice("The file exists. \\nOverwrite it?","No","Yes",NULL)) return;
  393. };
  394. osc->write("/save_xiz", "is", npart, filename);
  395. /*if (result<0) fl_alert("Error: Could not save the file.");*/}
  396. xywh {25 25 100 20} divider
  397. }
  398. MenuItem {} {
  399. label {Show Instrument &Bank...}
  400. callback {bankui->show();}
  401. xywh {5 5 100 20} divider
  402. }
  403. MenuItem {} {
  404. label {&Virtual Keyboard...}
  405. callback {virkeyboard->show();}
  406. xywh {15 15 100 20}
  407. }
  408. }
  409. Submenu recordmenu {
  410. label {&Record}
  411. xywh {5 5 100 20}
  412. } {
  413. MenuItem {} {
  414. label {&Choose WAV file...}
  415. callback {char *filename;
  416. recordbutton->deactivate();
  417. pausebutton->deactivate();
  418. pauselabel->deactivate();
  419. stopbutton->deactivate();
  420. filename=fl_file_chooser("Record to audio file:","(*.wav)",NULL,0);
  421. if (filename==NULL) return;
  422. fl_filename_setext(filename,".wav");
  423. //TODO TODO Test if a file exists
  424. if (fl_choice("The file *might* exist. \\nOverwrite it?","No","Yes",NULL)) {
  425. osc->write("/HDDRecorder/preparefile", "T");
  426. recordbutton->activate();//TODO make this button osc controlled
  427. }
  428. /*if (result!=0) fl_alert("Error: Could not save the file.");*/}
  429. xywh {5 5 100 20}
  430. }
  431. }
  432. Submenu {} {
  433. label Misc
  434. xywh {15 15 100 20}
  435. } {
  436. MenuItem {} {
  437. label {Switch User Interface Mode}
  438. callback {if (fl_choice("Switch the User Interface to Beginner mode ?","No","Yes",NULL)){
  439. masterwindow->hide();
  440. refresh_master_ui();
  441. simplemasterwindow->show();
  442. osc->write("/cfg.UserInterfaceMode", "i", 2);
  443. };}
  444. xywh {15 15 100 20}
  445. }
  446. }
  447. }
  448. Fl_Box dummy {
  449. xywh {25 25 25 25}
  450. code0 {win_root->osc = osc;}
  451. code1 {win_root->base = "/";}
  452. }
  453. Fl_Dial mastervolumedial {
  454. label {Master Volume}
  455. tooltip {Master Volume} xywh {15 32 55 55} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1
  456. code2 {o->init("volume"); o->selection_color(FL_RED);}
  457. class Fl_Osc_Dial
  458. }
  459. Fl_Counter masterkeyshiftcounter {
  460. label {Master KeyShift}
  461. xywh {150 97 120 23} type Simple labelsize 9 minimum -64 maximum 64 step 1
  462. code0 {o->lstep(12);}
  463. code1 {o->init("Pkeyshift",'i',-64);}
  464. class Fl_Osc_Counter
  465. }
  466. Fl_Button {} {
  467. label {Panic!}
  468. callback {virkeyboard->releaseallkeys();
  469. o->oscWrite("Panic");}
  470. xywh {280 29 105 53} color 90 labelfont 1
  471. class Fl_Osc_Button
  472. }
  473. Fl_Group partuigroup {open
  474. xywh {0 310 390 205}
  475. } {
  476. Fl_Group partui {open
  477. xywh {0 310 383 175}
  478. code0 {o->init("/part0/", 0,bankui,"/part0/", osc);}
  479. code1 {o->show();}
  480. class PartUI
  481. } {}
  482. }
  483. Fl_Tabs {} {open
  484. xywh {0 145 390 165} box UP_FRAME
  485. } {
  486. Fl_Group {} {
  487. label {System Effects} open
  488. xywh {0 162 390 145} labelsize 15 align 9
  489. } {
  490. Fl_Counter syseffnocounter {
  491. label {Sys.Effect No.}
  492. callback {nsyseff=(int) o->value()-1;
  493. syseffectuigroup->reext("sysefx"+to_s(nsyseff)+"/");
  494. sysefftype->oscMove("sysefx"+to_s(nsyseff)+"/efftype");
  495. syseffectui->refresh();}
  496. xywh {5 181 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1
  497. code0 {o->bounds(1,NUM_SYS_EFX);}
  498. code1 {o->value(nsyseff+1);}
  499. }
  500. Fl_Choice sysefftype {
  501. label EffType
  502. callback {syseffectui->efftype = o->value();
  503. syseffectui->refresh();}
  504. xywh {285 176 100 22} down_box BORDER_BOX labelsize 10
  505. code0 {o->init("sysefx"+to_s(nsyseff)+"/efftype");}
  506. class Fl_Osc_Choice
  507. } {
  508. MenuItem {} {
  509. label {No Effect}
  510. xywh {15 15 100 20} labelfont 1 labelsize 10
  511. }
  512. MenuItem {} {
  513. label Reverb
  514. xywh {25 25 100 20} labelfont 1 labelsize 10
  515. }
  516. MenuItem {} {
  517. label Echo
  518. xywh {35 35 100 20} labelfont 1 labelsize 10
  519. }
  520. MenuItem {} {
  521. label Chorus
  522. xywh {45 45 100 20} labelfont 1 labelsize 10
  523. }
  524. MenuItem {} {
  525. label Phaser
  526. xywh {55 55 100 20} labelfont 1 labelsize 10
  527. }
  528. MenuItem {} {
  529. label AlienWah
  530. xywh {65 65 100 20} labelfont 1 labelsize 10
  531. }
  532. MenuItem {} {
  533. label Distortion
  534. xywh {75 75 100 20} labelfont 1 labelsize 10
  535. }
  536. MenuItem {} {
  537. label EQ
  538. xywh {85 85 100 20} labelfont 1 labelsize 10
  539. }
  540. MenuItem {} {
  541. label DynFilter
  542. xywh {95 95 100 20} labelfont 1 labelsize 10
  543. }
  544. }
  545. Fl_Group syseffectuigroup {
  546. xywh {5 203 380 95} color 48
  547. class Fl_Osc_Group
  548. } {
  549. Fl_Box {} {
  550. xywh {5 203 0 0}
  551. code0 {syseffectuigroup->ext = "sysefx0/";}
  552. }
  553. Fl_Group syseffectui {
  554. xywh {5 203 380 95}
  555. code0 {o->init(false);}
  556. class EffUI
  557. } {}
  558. }
  559. Fl_Button {} {
  560. label {Send to...}
  561. callback {syseffsendwindow->show();}
  562. xywh {90 181 85 22} box THIN_UP_BOX labelfont 1 labelsize 11
  563. }
  564. Fl_Button {} {
  565. label C
  566. callback {presetsui->copy("/sysefx"+to_s(nsyseff)+"/");}
  567. xywh {180 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  568. }
  569. Fl_Button {} {
  570. label P
  571. callback { presetsui->paste("/sysefx"+to_s(nsyseff)+"/",syseffectui);} selected
  572. xywh {210 187 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  573. }
  574. }
  575. Fl_Group {} {
  576. label {Insertion Effects} open
  577. xywh {0 165 390 145} labelsize 15 align 9 hide
  578. } {
  579. Fl_Counter inseffnocounter {
  580. label {Ins.Effect No.}
  581. callback {ninseff=(int) o->value()-1;
  582. insefftype->oscMove("insefx"+to_s(ninseff)+"/efftype");
  583. inseffectuigroup->reext("insefx"+to_s(ninseff)+"/");
  584. inseffpart->oscMove("Pinsparts"+to_s(ninseff));
  585. /*
  586. insefftype->value(master->insefx[ninseff]->geteffect());
  587. inseffpart->value(master->Pinsparts[ninseff]+2);
  588. inseffectui->refresh();
  589. if (master->Pinsparts[ninseff]!=-1) {
  590. insefftype->activate();
  591. inseffectui->activate();
  592. inseffectuigroup->activate();
  593. } else {
  594. insefftype->deactivate();
  595. inseffectui->deactivate();
  596. inseffectuigroup->deactivate();
  597. };*/}
  598. xywh {5 183 80 22} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1
  599. code0 {o->bounds(1,NUM_INS_EFX);}
  600. code1 {o->value(ninseff+1);}
  601. }
  602. Fl_Choice insefftype {
  603. label EffType
  604. callback {/*pthread_mutex_lock(&master->mutex);
  605. master->insefx[ninseff]->changeeffect((int) o->value());
  606. pthread_mutex_unlock(&master->mutex);*/
  607. inseffectui->efftype = o->value();
  608. inseffectui->refresh();
  609. inseffectui->show();}
  610. xywh {285 173 100 22} down_box BORDER_BOX labelsize 10
  611. code0 {/*o->value(master->insefx[ninseff]->geteffect());*/}
  612. code1 {/*if (master->Pinsparts[ninseff]== -1) o->deactivate();*/}
  613. code2 {o->init("insefx"+to_s(ninseff)+"/efftype");}
  614. class Fl_Osc_Choice
  615. } {
  616. MenuItem {} {
  617. label {No Effect}
  618. xywh {30 30 100 20} labelfont 1 labelsize 10
  619. }
  620. MenuItem {} {
  621. label Reverb
  622. xywh {40 40 100 20} labelfont 1 labelsize 10
  623. }
  624. MenuItem {} {
  625. label Echo
  626. xywh {50 50 100 20} labelfont 1 labelsize 10
  627. }
  628. MenuItem {} {
  629. label Chorus
  630. xywh {60 60 100 20} labelfont 1 labelsize 10
  631. }
  632. MenuItem {} {
  633. label Phaser
  634. xywh {65 65 100 20} labelfont 1 labelsize 10
  635. }
  636. MenuItem {} {
  637. label AlienWah
  638. xywh {75 75 100 20} labelfont 1 labelsize 10
  639. }
  640. MenuItem {} {
  641. label Distortion
  642. xywh {85 85 100 20} labelfont 1 labelsize 10
  643. }
  644. MenuItem {} {
  645. label EQ
  646. xywh {95 95 100 20} labelfont 1 labelsize 10
  647. }
  648. MenuItem {} {
  649. label DynFilter
  650. xywh {105 105 100 20} labelfont 1 labelsize 10
  651. }
  652. }
  653. Fl_Group inseffectuigroup {open
  654. xywh {5 205 380 95} box FLAT_BOX color 48
  655. class Fl_Osc_Group
  656. } {
  657. Fl_Box {} {
  658. xywh {5 205 0 0}
  659. code0 {inseffectuigroup->ext = "insefx0/";}
  660. }
  661. Fl_Group inseffectui {
  662. xywh {5 205 380 90} box UP_FRAME
  663. code0 {o->init(true);}
  664. class EffUI
  665. } {}
  666. }
  667. Fl_Choice inseffpart {
  668. label {Insert To.}
  669. callback {/*master->Pinsparts[ninseff]=(int) o->value()-2;*/
  670. if ((int) o->value()==1){
  671. inseffectuigroup->deactivate();
  672. insefftype->deactivate();
  673. inseffectui->deactivate();
  674. } else {
  675. inseffectuigroup->activate();
  676. insefftype->activate();
  677. inseffectui->activate();
  678. };
  679. /*master->insefx[ninseff]->cleanup();*/} open
  680. xywh {95 183 80 22} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10
  681. code0 {o->add("Master Out");o->add("Off");}
  682. code1 {char tmp[50]; for (int i=0;i<NUM_MIDI_PARTS;i++) {sprintf(tmp,"Part %2d",i+1);o->add(tmp);};}
  683. code3 {o->init("Pinsparts"+to_s(ninseff),-2);}
  684. class Fl_Osc_Choice
  685. } {}
  686. Fl_Button {} {
  687. label C
  688. callback {presetsui->copy(inseffectuigroup->loc());}
  689. xywh {180 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  690. }
  691. Fl_Button {} {
  692. label P
  693. callback {presetsui->paste(inseffectuigroup->loc(),inseffectui);}
  694. xywh {210 185 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  695. }
  696. }
  697. }
  698. Fl_Button {} {
  699. label Scales
  700. callback {microtonalui->show();}
  701. xywh {320 87 65 23} color 51 labelfont 1
  702. }
  703. Fl_Group {} {
  704. xywh {150 40 117 45} box UP_FRAME
  705. } {
  706. Fl_Button recordbutton {
  707. label {Rec.}
  708. callback {o->deactivate();
  709. recordmenu->deactivate();
  710. recordmenu->label("&Record(*)");
  711. stopbutton->activate();
  712. pausebutton->activate();
  713. pauselabel->activate();
  714. o->oscWrite("HDDRecorder/start");
  715. o->oscWrite("resetvu");
  716. mastermenu->redraw();}
  717. tooltip {Start Recording} xywh {159 46 21 21} box ROUND_UP_BOX color 88 labelfont 1 labelsize 10 align 2 deactivate
  718. class Fl_Osc_Button
  719. }
  720. Fl_Button stopbutton {
  721. label Stop
  722. callback {o->deactivate();
  723. o->oscWrite("HDDRecorder/stop");
  724. recordbutton->deactivate();
  725. pausebutton->deactivate();
  726. pauselabel->deactivate();
  727. recordmenu->activate();
  728. recordmenu->label("&Record");
  729. mastermenu->redraw();}
  730. tooltip {Stop Recording and close the audio file} xywh {237 46 21 21} box THIN_UP_BOX color 4 labelfont 1 labelsize 10 align 2 deactivate
  731. class Fl_Osc_Button
  732. }
  733. Fl_Button pausebutton {
  734. label {| |}
  735. callback {o->deactivate();
  736. o->oscWrite("HDDRecorder/pause");
  737. recordbutton->activate();
  738. mastermenu->redraw();}
  739. tooltip {Pause Recording} xywh {198 46 21 21} box THIN_UP_BOX color 4 selection_color 4 labelfont 1 labelcolor 3 align 16 deactivate
  740. class Fl_Osc_Button
  741. }
  742. Fl_Box pauselabel {
  743. label Pause
  744. xywh {192 66 30 15} labelfont 1 labelsize 10 deactivate
  745. }
  746. }
  747. Fl_Group {} {
  748. xywh {1 490 389 55}
  749. } {
  750. Fl_Box mastervu {
  751. label {VU-Meter}
  752. xywh {5 490 380 30} box FLAT_BOX color 48 selection_color 75
  753. code0 {o->init(osc);}
  754. class VuMasterMeter
  755. }
  756. }
  757. Fl_Check_Button nrpnbutton {
  758. label NRPN
  759. tooltip {Receive NRPNs} xywh {10 115 60 25} down_box DOWN_BOX labelsize 12
  760. code0 {o->init("ctl/NRPN.receive");}
  761. class Fl_Osc_Check
  762. }
  763. Fl_Counter npartcounter {
  764. callback {int nval=(int) o->value()-1;
  765. /*partuigroup->remove(partui);
  766. delete partui;
  767. partui=new PartUI(0,0,765,525);
  768. partuigroup->add(partui);
  769. char buffer[1024];
  770. snprintf(buffer, 1024, "/part%d/", nval);
  771. partui->init(master->part[nval], buffer, master, nval, bankui, "/part"+to_s(nval)+"/", osc);
  772. partui->redraw();
  773. o->redraw();
  774. */
  775. npart=nval;
  776. partui->rebase("/part"+to_s(npart)+"/");
  777. updatepanel();
  778. simplenpartcounter->value(nval+1);
  779. simplenpartcounter->do_callback();}
  780. tooltip {The part number} xywh {5 312 50 18} type Simple labelfont 1 minimum 0 maximum 127 step 1 value 1 textfont 1
  781. code0 {o->bounds(1,NUM_MIDI_PARTS);}
  782. code1 {bankui->init(o);}
  783. }
  784. Fl_Button {} {
  785. label vK
  786. callback {virkeyboard->show();}
  787. tooltip {Virtual Keyboard} xywh {280 87 40 23} color 51 labelfont 1
  788. }
  789. Fl_Group {} {
  790. xywh {85 32 55 110} box UP_FRAME
  791. } {
  792. Fl_Button {} {
  793. label Reset
  794. callback {globalfinedetuneslider->value(64.0);
  795. globalfinedetuneslider->do_callback();}
  796. tooltip {Master fine detune reset} xywh {90 37 45 23} box THIN_UP_BOX labelsize 10
  797. }
  798. Fl_Dial globalfinedetuneslider {
  799. label {Fine Detune}
  800. tooltip {global fine detune} xywh {90 68 45 45} box ROUND_UP_BOX labelsize 9 align 130 maximum 127 step 1 value 64
  801. code0 {o->init("microtonal/Pglobalfinedetune");}
  802. class Fl_Osc_Dial
  803. }
  804. }
  805. Fl_Button {} {
  806. label {Panel Window}
  807. callback {updatepanel();
  808. panelwindow->show();}
  809. tooltip {Panel Window} xywh {280 112 105 23} color 51 labelfont 1 labelsize 10
  810. }
  811. Fl_Button sm_indicator1 {
  812. label SM
  813. xywh {350 5 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate
  814. }
  815. }
  816. }
  817. Fl_Window aboutwindow {
  818. label {Copyright...}
  819. xywh {411 344 365 280} type Double hide
  820. } {
  821. Fl_Box {} {
  822. label {Copyright (c) 2002-2009 Nasca O. PAUL and others. Please read AUTHORS.txt}
  823. xywh {15 35 335 55} labeltype EMBOSSED_LABEL labelsize 15 align 208
  824. }
  825. Fl_Box {} {
  826. label {This is free software; you may redistribute it and/or modify it under the terms of the
  827. version 2 (or any later version) of the GNU General Public License as published by the Free Software Fundation.
  828. This program comes with
  829. ABSOLUTELY NO WARRANTY.
  830. See the version 2 (or any later version) of the
  831. GNU General Public License for details.}
  832. xywh {15 90 335 145} labelfont 1 labelsize 11 align 144
  833. }
  834. Fl_Button {} {
  835. label {Close this window}
  836. callback {aboutwindow->hide();}
  837. xywh {80 245 190 25} box THIN_UP_BOX labelsize 11
  838. }
  839. Fl_Box {} {
  840. label ZynAddSubFX
  841. xywh {15 5 335 30} labeltype EMBOSSED_LABEL labelfont 1 labelsize 20 align 16
  842. }
  843. }
  844. Fl_Window syseffsendwindow {
  845. label {System Effects Send}
  846. xywh {171 234 120 250} type Double hide resizable
  847. class Fl_Osc_Window
  848. } {
  849. Fl_Box {} {
  850. xywh {0 0 0 0}
  851. code0 {syseffsendwindow->init(osc,"");}
  852. }
  853. Fl_Scroll syseffscroll {open
  854. xywh {0 45 120 170} box FLAT_BOX resizable
  855. code0 {syseffsendwindow->begin();for (int neff1=0;neff1<NUM_SYS_EFX;neff1++) for (int neff2=neff1+1;neff2<NUM_SYS_EFX;neff2++)}
  856. code1 {{syseffsend[neff1][neff2]=new Fl_Osc_Dial(o->x()+(neff2-1)*35,o->y()+15+neff1*50,30,30);syseffsend[neff1][neff2]->label(strdup((to_s(neff1) + "->" + to_s(neff2)).c_str()));syseffsend[neff1][neff2]->init("/sysefxfrom"+to_s(neff1)+"/to"+to_s(neff2));};syseffsendwindow->end();}
  857. } {}
  858. Fl_Button {} {
  859. label Close
  860. callback {syseffsendwindow->hide();}
  861. xywh {25 220 80 25} box THIN_UP_BOX
  862. }
  863. Fl_Box {} {
  864. label {Send system effect's output to other system effects}
  865. xywh {5 5 110 35} labelsize 10 align 192
  866. }
  867. }
  868. Fl_Window panelwindow {
  869. label {ZynAddSubFX Panel} open
  870. xywh {615 247 630 635} type Double
  871. class Fl_Osc_Window visible
  872. } {
  873. Fl_Box {} {
  874. xywh {0 0 0 0}
  875. code0 {panelwindow->init(osc,"/");}
  876. }
  877. Fl_Scroll {} {open
  878. xywh {0 5 570 310} type HORIZONTAL box THIN_UP_BOX
  879. } {
  880. Fl_Pack {} {open
  881. xywh {5 10 560 285} type HORIZONTAL
  882. code0 {for (int i=0;i<NUM_MIDI_PARTS/2;i++){panellistitem[i]=new Panellistitem(0,0,70,260,"");panellistitem[i]->init(i,bankui,partui);}}
  883. } {}
  884. }
  885. Fl_Scroll {} {open
  886. xywh {0 320 570 310} type HORIZONTAL box THIN_UP_BOX
  887. } {
  888. Fl_Pack {} {open
  889. xywh {5 325 560 285} type HORIZONTAL
  890. code0 {for (int i=NUM_MIDI_PARTS/2;i<NUM_MIDI_PARTS;i++){panellistitem[i]=new Panellistitem(0,0,70,260,"");panellistitem[i]->init(i,bankui,partui);}}
  891. } {}
  892. }
  893. Fl_Button {} {
  894. label Close
  895. callback {panelwindow->hide();
  896. updatepanel();}
  897. xywh {575 605 50 25} box THIN_UP_BOX labelsize 13
  898. }
  899. Fl_Button {} {
  900. label Refresh
  901. callback {updatepanel();}
  902. xywh {575 570 55 25} box THIN_UP_BOX labelsize 13
  903. }
  904. }
  905. Fl_Window simplemasterwindow {
  906. label ZynAddSubFX
  907. callback {\#ifndef PLUGINVERSION
  908. if (fl_choice("Exit and leave the unsaved data?","No","Yes",NULL))
  909. \#endif
  910. {
  911. *exitprogram=1;
  912. };} open
  913. xywh {655 378 600 335} type Double
  914. class Fl_Osc_Window visible
  915. } {
  916. Fl_Box {} {
  917. xywh {0 0 0 0}
  918. code0 {simplemasterwindow->init(osc, "/");}
  919. }
  920. Fl_Menu_Bar simplemastermenu {
  921. xywh {0 0 600 25}
  922. } {
  923. Submenu {} {
  924. label {&File}
  925. xywh {10 10 100 20}
  926. } {
  927. MenuItem {} {
  928. label {&New (erase all)...}
  929. callback {do_new_master();}
  930. xywh {30 30 100 20}
  931. }
  932. MenuItem {} {
  933. label {&Revert changes...}
  934. callback {do_revert_changes();}
  935. xywh {30 30 100 20}
  936. }
  937. MenuItem {} {
  938. label {&Open Parameters...}
  939. callback {do_load_master();}
  940. xywh {30 30 100 20}
  941. }
  942. MenuItem {} {
  943. label {&Save All Parameters...}
  944. callback {\#if USE_NSM
  945. if ( nsm && nsm->is_active() )
  946. {
  947. do_save_master( nsm->project_filename );
  948. }
  949. else
  950. \#endif
  951. {
  952. do_save_master();
  953. }}
  954. xywh {20 20 100 20} divider
  955. }
  956. MenuItem {} {
  957. label {&Settings...}
  958. callback {configui->show();}
  959. xywh {35 35 100 20} divider
  960. }
  961. MenuItem {} {
  962. label {&Copyright...}
  963. callback {aboutwindow->show();}
  964. xywh {25 25 100 20} divider
  965. }
  966. MenuItem {} {
  967. label {E&xit}
  968. callback {masterwindow->do_callback();}
  969. xywh {20 20 100 20}
  970. }
  971. }
  972. Submenu {} {
  973. label {&Instrument}
  974. xywh {20 20 100 20}
  975. } {
  976. MenuItem {} {
  977. label {&Open Instrument...}
  978. callback {const char *filename;
  979. filename=fl_file_chooser("Load:","({*.xiz})",NULL,0);
  980. if (filename==NULL) return;
  981. osc->write("/load_xiz", "si", filename, npart);
  982. simplenpartcounter->do_callback();
  983. /*
  984. if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not an instrument file.");
  985. else if (result<0) fl_alert("Error: Could not load the file.");*/}
  986. xywh {40 40 100 20}
  987. }
  988. MenuItem {} {
  989. label {Show Instrument &Bank...}
  990. callback {bankui->show();}
  991. xywh {10 10 100 20} divider
  992. }
  993. }
  994. Submenu {} {
  995. label Misc
  996. xywh {0 0 100 20}
  997. } {
  998. MenuItem {} {
  999. label {Switch User Interface Mode}
  1000. callback {if (fl_choice("Switch the User Interface to Advanced mode ?","No","Yes",NULL)){
  1001. simplemasterwindow->hide();
  1002. refresh_master_ui();
  1003. masterwindow->show();
  1004. osc->write("/cfg.UserInterfaceMode", "i", 1);
  1005. };}
  1006. xywh {0 0 100 20}
  1007. }
  1008. }
  1009. }
  1010. Fl_Group simplelistitemgroup {
  1011. private xywh {125 65 215 145} box UP_FRAME
  1012. class Fl_Osc_Group
  1013. } {
  1014. Fl_Box {} {
  1015. xywh {125 65 0 0}
  1016. code0 {simplelistitemgroup->ext = "part0/";}
  1017. }
  1018. Fl_Button partname {
  1019. callback {if ((int)bankui->cbwig->value()!=(npart+1)){
  1020. bankui->cbwig->value(npart+1);
  1021. bankui->cbwig->do_callback();
  1022. };
  1023. bankui->show();}
  1024. xywh {130 72 205 18} box THIN_DOWN_BOX down_box FLAT_BOX color 50 labelfont 1 labelsize 11 align 208
  1025. code0 {o->ext = "Pname";o->oscRegister("Pname");}
  1026. class PartNameButton
  1027. }
  1028. Fl_Slider partpanning {
  1029. label Pan
  1030. xywh {185 95 145 15} type {Horz Knob} box NO_BOX labelsize 11 maximum 127 step 1 value 64
  1031. code0 {o->init("Ppanning",'i'); o->reset_value=64;}
  1032. class Fl_Osc_TSlider
  1033. }
  1034. Fl_Choice partrcv {
  1035. label {Midi Channel Receive}
  1036. callback {virkeys->releaseallkeys(0);
  1037. virkeys->midich=(int) o->value();} open
  1038. tooltip {receive from Midi channel} xywh {140 157 65 18} down_box BORDER_BOX labelsize 10 align 130 textfont 1
  1039. code0 {char nrstr[10]; for(int i=0;i<NUM_MIDI_CHANNELS;i++){sprintf(nrstr,"Ch%d",i+1);if (i!=9) o->add(nrstr); else o->add("Dr10");};}
  1040. code1 {o->init("Prcvchn");}
  1041. class Fl_Osc_Choice
  1042. } {}
  1043. Fl_Dial partvolume {
  1044. xywh {135 95 45 40} labelsize 9 maximum 127 step 1
  1045. code0 {o->init("Pvolume");}
  1046. class Fl_Osc_Dial
  1047. }
  1048. Fl_Box {} {
  1049. label Volume
  1050. xywh {130 130 55 20} labelsize 10
  1051. }
  1052. Fl_Check_Button simplepartportamento {
  1053. label Portamento
  1054. tooltip {Enable/Disable the portamento} xywh {193 127 79 23} down_box DOWN_BOX labelsize 9
  1055. code0 {o->init("ctl/portamento.portamento");}
  1056. class Fl_Osc_Check
  1057. }
  1058. Fl_Counter simpleminkcounter {
  1059. label {Min.key}
  1060. callback {if (simpleminkcounter->value()>simplemaxkcounter->value()) o->textcolor(FL_RED);
  1061. else o->textcolor(FL_BLACK);}
  1062. tooltip {Minimum key (that the part receives NoteOn messages)} xywh {210 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10
  1063. code0 {o->init("Pminkey");}
  1064. class Fl_Osc_Counter
  1065. }
  1066. Fl_Counter simplemaxkcounter {
  1067. label {Max.key}
  1068. callback {if (simpleminkcounter->value()>simplemaxkcounter->value()) o->textcolor(FL_RED);
  1069. else o->textcolor(FL_BLACK);}
  1070. tooltip {Maximum key (that the part receives NoteOn messages)} xywh {255 158 40 15} type Simple labelsize 10 minimum 0 maximum 127 step 1 textsize 10
  1071. code0 {o->init("Pmaxkey");}
  1072. class Fl_Osc_Counter
  1073. }
  1074. Fl_Button {} {
  1075. label m
  1076. callback {o->oscWrite("grabMinNote");}
  1077. tooltip {set the minimum key to the last pressed key} xywh {230 188 15 12} box THIN_UP_BOX labelsize 10
  1078. class Fl_Osc_Button
  1079. }
  1080. Fl_Button {} {
  1081. label M
  1082. callback {o->oscWrite("grabMaxNote");}
  1083. tooltip {set the maximum key to the last pressed key} xywh {260 188 15 12} box THIN_UP_BOX labelsize 10
  1084. class Fl_Osc_Button
  1085. }
  1086. Fl_Button {} {
  1087. label R
  1088. callback {simpleminkcounter->value(0);
  1089. simpleminkcounter->do_callback();
  1090. simplemaxkcounter->value(127);
  1091. simplemaxkcounter->do_callback();}
  1092. tooltip {reset the minimum key to 0 and maximum key to 127} xywh {245 188 15 12} box THIN_UP_BOX labelfont 1 labelsize 10
  1093. }
  1094. Fl_Counter simplepartkeyshiftcounter {
  1095. label KeyShift
  1096. xywh {280 120 50 20} type Simple labelsize 11 minimum -64 maximum 64 step 1
  1097. code0 {o->lstep(12);}
  1098. code1 {o->init("Pkeyshift", 'i', -64);}
  1099. class Fl_Osc_Counter
  1100. }
  1101. Fl_Dial simplesyseffsend {
  1102. xywh {300 160 30 30} maximum 127 step 1
  1103. code0 {o->alt_init("/","Psysefxvol"+to_s(nsyseff)+"/part"+to_s(npart));}
  1104. class Fl_Osc_Dial
  1105. }
  1106. Fl_Box {} {
  1107. label Effect
  1108. xywh {295 190 40 15} labelsize 10
  1109. }
  1110. }
  1111. Fl_Check_Button partenabled {
  1112. label Enabled
  1113. callback {if ((int) o->value()==0) simplelistitemgroup->deactivate();
  1114. else {
  1115. simplelistitemgroup->activate();
  1116. if ((int)bankui->cbwig->value()!=(npart+1)){
  1117. bankui->cbwig->value(npart+1);
  1118. bankui->cbwig->do_callback();
  1119. };
  1120. };
  1121. o->redraw();}
  1122. private xywh {250 40 85 20} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 24
  1123. code0 {//char tmp[10];snprintf(tmp,10,"%d",npart+1);o->copy_label(tmp);}
  1124. code1 {o->init("part0/Penabled");}
  1125. class Fl_Osc_Check
  1126. }
  1127. Fl_Box virkeys {
  1128. label Keyboard
  1129. xywh {5 215 590 80} box BORDER_BOX color 17
  1130. code0 {o->init(osc, "/");}
  1131. class VirKeys
  1132. }
  1133. Fl_Group {} {
  1134. xywh {340 30 255 185}
  1135. } {
  1136. Fl_Tabs {} {
  1137. xywh {345 35 245 175} box UP_FRAME align 18
  1138. } {
  1139. Fl_Group {} {
  1140. label {System Effects}
  1141. xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18
  1142. } {
  1143. Fl_Counter simplesyseffnocounter {
  1144. label {Sys.Effect No.}
  1145. callback {nsyseff=(int) o->value()-1;
  1146. /*simplesysefftype->value(master->sysefx[nsyseff]->geteffect());*/
  1147. simplesyseffectui->refresh();
  1148. simplesysefftype->oscMove("sysefx"+to_s(nsyseff)+"/efftype");
  1149. simplesyseffectuigroup->reext("sysefx"+to_s(nsyseff)+"/");
  1150. simplesyseffsend->oscMove("Psysefxvol"+to_s(nsyseff)+"/part"+to_s(npart));
  1151. simplerefresh();}
  1152. xywh {350 75 80 20} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1
  1153. code0 {o->bounds(1,NUM_SYS_EFX);}
  1154. code1 {o->value(nsyseff+1);}
  1155. }
  1156. Fl_Choice simplesysefftype {
  1157. label EffType
  1158. callback {
  1159. simplesyseffectui->efftype = o->value();
  1160. simplesyseffectui->refresh();
  1161. }
  1162. xywh {515 80 70 15} down_box BORDER_BOX labelsize 10 align 5
  1163. code0 {o->init("sysefx"+to_s(nsyseff)+"/efftype");}
  1164. class Fl_Osc_Choice
  1165. } {
  1166. MenuItem {} {
  1167. label {No Effect}
  1168. xywh {20 20 100 20} labelfont 1 labelsize 10
  1169. }
  1170. MenuItem {} {
  1171. label Reverb
  1172. xywh {30 30 100 20} labelfont 1 labelsize 10
  1173. }
  1174. MenuItem {} {
  1175. label Echo
  1176. xywh {40 40 100 20} labelfont 1 labelsize 10
  1177. }
  1178. MenuItem {} {
  1179. label Chorus
  1180. xywh {50 50 100 20} labelfont 1 labelsize 10
  1181. }
  1182. MenuItem {} {
  1183. label Phaser
  1184. xywh {60 60 100 20} labelfont 1 labelsize 10
  1185. }
  1186. MenuItem {} {
  1187. label AlienWah
  1188. xywh {70 70 100 20} labelfont 1 labelsize 10
  1189. }
  1190. MenuItem {} {
  1191. label Distortion
  1192. xywh {80 80 100 20} labelfont 1 labelsize 10
  1193. }
  1194. MenuItem {} {
  1195. label EQ
  1196. xywh {90 90 100 20} labelfont 1 labelsize 10
  1197. }
  1198. MenuItem {} {
  1199. label DynFilter
  1200. xywh {100 100 100 20} labelfont 1 labelsize 10
  1201. }
  1202. }
  1203. Fl_Group simplesyseffectuigroup {
  1204. xywh {350 95 235 95} color 48
  1205. class Fl_Osc_Group
  1206. } {
  1207. Fl_Box {} {
  1208. xywh {350 95 0 0}
  1209. code0 {simplesyseffectuigroup->ext = "sysefx0/";}
  1210. }
  1211. Fl_Group simplesyseffectui {
  1212. xywh {350 95 234 95}
  1213. code0 {o->init(false);}
  1214. code1 {o->refresh();}
  1215. class SimpleEffUI
  1216. } {}
  1217. }
  1218. Fl_Button {} {
  1219. label {Send to...}
  1220. callback {syseffsendwindow->show();}
  1221. xywh {435 75 75 20} box THIN_UP_BOX labelfont 1 labelsize 11
  1222. }
  1223. Fl_Button {} {
  1224. label P
  1225. callback {/*pthread_mutex_lock(&master->mutex);
  1226. presetsui->paste(master->sysefx[nsyseff],simplesyseffectui);
  1227. pthread_mutex_unlock(&master->mutex);*/}
  1228. xywh {560 65 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  1229. }
  1230. }
  1231. Fl_Group {} {
  1232. label {Insertion Effects}
  1233. xywh {345 55 245 155} box UP_FRAME labelfont 1 labelsize 12 align 18 hide
  1234. } {
  1235. Fl_Counter simpleinseffnocounter {
  1236. label {Ins.Effect No.}
  1237. callback {ninseff=(int) o->value()-1;
  1238. /*simpleinsefftype->value(master->insefx[ninseff]->geteffect());
  1239. simpleinseffpart->value(master->Pinsparts[ninseff]+2);*/
  1240. simpleinseffectuigroup->reext("insefx"+to_s(ninseff)+"/");
  1241. simpleinsefftype->oscMove("insefx"+to_s(ninseff)+"/efftype");
  1242. simpleinseffectui->refresh();
  1243. /*
  1244. if (master->Pinsparts[ninseff]!=-1) {
  1245. simpleinsefftype->activate();
  1246. simpleinseffectui->activate();
  1247. simpleinseffectuigroup->activate();
  1248. } else {
  1249. simpleinsefftype->deactivate();
  1250. simpleinseffectui->deactivate();
  1251. simpleinseffectuigroup->deactivate();
  1252. };*/}
  1253. xywh {350 75 80 20} type Simple labelfont 1 labelsize 10 align 1 minimum 0 maximum 127 step 1 value 1 textfont 1
  1254. code0 {o->bounds(1,NUM_INS_EFX);}
  1255. code1 {o->value(ninseff+1);}
  1256. }
  1257. Fl_Choice simpleinsefftype {
  1258. label EffType
  1259. callback {/*pthread_mutex_lock(&master->mutex);
  1260. master->insefx[ninseff]->changeeffect((int) o->value());
  1261. pthread_mutex_unlock(&master->mutex);*/
  1262. simpleinseffectui->efftype = o->value();
  1263. simpleinseffectui->refresh();
  1264. simpleinseffectui->show();}
  1265. xywh {515 80 70 15} down_box BORDER_BOX labelsize 10 align 5
  1266. code0 {/*o->value(master->insefx[ninseff]->geteffect());*/}
  1267. code1 {/*if (master->Pinsparts[ninseff]== -1) o->deactivate();*/}
  1268. code2 {o->init("insefx"+to_s(ninseff)+"/efftype");}
  1269. class Fl_Osc_Choice
  1270. } {
  1271. MenuItem {} {
  1272. label {No Effect}
  1273. xywh {35 35 100 20} labelfont 1 labelsize 10
  1274. }
  1275. MenuItem {} {
  1276. label Reverb
  1277. xywh {45 45 100 20} labelfont 1 labelsize 10
  1278. }
  1279. MenuItem {} {
  1280. label Echo
  1281. xywh {55 55 100 20} labelfont 1 labelsize 10
  1282. }
  1283. MenuItem {} {
  1284. label Chorus
  1285. xywh {65 65 100 20} labelfont 1 labelsize 10
  1286. }
  1287. MenuItem {} {
  1288. label Phaser
  1289. xywh {70 70 100 20} labelfont 1 labelsize 10
  1290. }
  1291. MenuItem {} {
  1292. label AlienWah
  1293. xywh {80 80 100 20} labelfont 1 labelsize 10
  1294. }
  1295. MenuItem {} {
  1296. label Distortion
  1297. xywh {90 90 100 20} labelfont 1 labelsize 10
  1298. }
  1299. MenuItem {} {
  1300. label EQ
  1301. xywh {100 100 100 20} labelfont 1 labelsize 10
  1302. }
  1303. MenuItem {} {
  1304. label DynFilter
  1305. xywh {110 110 100 20} labelfont 1 labelsize 10
  1306. }
  1307. }
  1308. Fl_Group simpleinseffectuigroup {
  1309. xywh {350 95 234 95} box FLAT_BOX color 48
  1310. class Fl_Osc_Group
  1311. } {
  1312. Fl_Box {} {
  1313. xywh {350 95 0 0}
  1314. code0 {simpleinseffectuigroup->ext = "insefx0/";}
  1315. }
  1316. Fl_Group simpleinseffectui {
  1317. xywh {350 95 234 95}
  1318. code0 {o->init(true);}
  1319. class SimpleEffUI
  1320. } {}
  1321. }
  1322. Fl_Choice simpleinseffpart {
  1323. label {Insert To.}
  1324. callback {/*master->Pinsparts[ninseff]=(int) o->value()-2;*/
  1325. if ((int) o->value()==1){
  1326. simpleinseffectuigroup->deactivate();
  1327. simpleinsefftype->deactivate();
  1328. simpleinseffectui->deactivate();
  1329. } else {
  1330. simpleinseffectuigroup->activate();
  1331. simpleinsefftype->activate();
  1332. simpleinseffectui->activate();
  1333. };
  1334. /*master->insefx[ninseff]->cleanup();*/} open
  1335. xywh {435 75 80 20} down_box BORDER_BOX labelfont 1 labelsize 10 align 5 textsize 10
  1336. code0 {o->add("Master Out");o->add("Off");}
  1337. code1 {char tmp[50]; for (int i=0;i<NUM_MIDI_PARTS;i++) {sprintf(tmp,"Part %2d",i+1);o->add(tmp);};}
  1338. code3 {/*o->value(master->Pinsparts[ninseff]+2);*/}
  1339. } {}
  1340. Fl_Button {} {
  1341. label P
  1342. callback {/*pthread_mutex_lock(&master->mutex);
  1343. presetsui->paste(master->insefx[ninseff],simpleinseffectui);
  1344. pthread_mutex_unlock(&master->mutex);*/}
  1345. xywh {560 65 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  1346. }
  1347. }
  1348. }
  1349. }
  1350. Fl_Group {} {
  1351. xywh {5 300 590 30} box ENGRAVED_FRAME
  1352. } {
  1353. Fl_Box simplemastervu {
  1354. label {VU-Meter}
  1355. xywh {5 300 590 30} box FLAT_BOX color 41 selection_color 75
  1356. code0 {o->init(osc);}
  1357. class VuMasterMeter
  1358. }
  1359. }
  1360. Fl_Dial simplemastervolumedial {
  1361. label {Master Volume}
  1362. tooltip {Master Volume} xywh {10 35 40 40} box ROUND_UP_BOX labelfont 1 labelsize 11 align 130 maximum 127 step 1
  1363. code0 {o->init("Pvolume");}
  1364. class Fl_Osc_Dial
  1365. }
  1366. Fl_Counter simplemasterkeyshiftcounter {
  1367. label {Master KeyShift}
  1368. xywh {15 110 90 20} labelsize 11 minimum -64 maximum 64 step 1
  1369. code0 {o->lstep(12);}
  1370. code1 {o->init("Pkeyshift",'i',-64);}
  1371. class Fl_Osc_Counter
  1372. }
  1373. Fl_Button {} {
  1374. label {Stop ALL sounds!}
  1375. callback {virkeyboard->releaseallkeys();
  1376. o->oscWrite("Panic");}
  1377. xywh {5 149 115 31} color 90 labelfont 1 labelsize 10
  1378. class Fl_Osc_Button
  1379. }
  1380. Fl_Button {} {
  1381. label Reset
  1382. callback {simpleglobalfinedetuneslider->value(64.0);
  1383. simpleglobalfinedetuneslider->do_callback();}
  1384. tooltip {Master fine detune reset} xywh {70 30 50 17} box THIN_UP_BOX labelsize 11 align 128
  1385. }
  1386. Fl_Dial simpleglobalfinedetuneslider {
  1387. label {Fine Detune}
  1388. tooltip {global fine detune} xywh {80 50 30 30} box ROUND_UP_BOX labelsize 11 align 130 maximum 127 step 1 value 64
  1389. code0 {o->init("microtonal/Pglobalfinedetune");}
  1390. class Fl_Osc_Dial
  1391. }
  1392. Fl_Counter simplenpartcounter {
  1393. label Part
  1394. callback {virkeys->releaseallkeys(0);
  1395. npartcounter->value(o->value());
  1396. npart=(int) o->value()-1;
  1397. simplelistitemgroup->reext("part"+to_s(npart)+"/");
  1398. partenabled->oscMove("part"+to_s(npart)+"/Penabled");
  1399. simplerefresh();}
  1400. tooltip {The part number} xywh {170 40 70 20} type Simple labelfont 1 align 4 minimum 0 maximum 127 step 1 value 1 textfont 1
  1401. code0 {o->bounds(1,NUM_MIDI_PARTS);}
  1402. }
  1403. Fl_Counter {} {
  1404. label {Keyb.Oct.}
  1405. callback {virkeys->releaseallkeys(0);
  1406. virkeys->midioct=(int) o->value();
  1407. virkeys->take_focus();}
  1408. tooltip {Midi Octave} xywh {5 190 55 20} type Simple labelsize 11 align 8 when 6 minimum 0 maximum 5 step 1 textfont 1 textsize 11
  1409. code0 {o->value(virkeys->midioct);}
  1410. }
  1411. Fl_Button sm_indicator2 {
  1412. label SM
  1413. xywh {560 5 35 15} box ROUNDED_BOX down_box ROUNDED_BOX color 45 selection_color 93 labelfont 3 labelcolor 39 deactivate
  1414. }
  1415. }
  1416. Fl_Window selectuiwindow {
  1417. label {User Interface mode}
  1418. callback {*exitprogram=1;}
  1419. xywh {342 246 430 250} type Double hide non_modal
  1420. class Fl_Osc_Window
  1421. } {
  1422. Fl_Box {} {
  1423. label {Welcome to ZynAddSubFX}
  1424. xywh {5 5 425 40} labeltype SHADOW_LABEL labelfont 1 labelsize 26
  1425. }
  1426. Fl_Box {} {
  1427. label {Please choose the interface mode:}
  1428. xywh {10 50 265 25} labelfont 1 labelsize 13
  1429. }
  1430. Fl_Button {} {
  1431. label Advanced
  1432. callback {
  1433. osc->write("/config/cfg.UserInterfaceMode", "i", 1);
  1434. masterwindow->show();
  1435. selectuiwindow->hide();}
  1436. xywh {10 165 100 35} color 229 labelfont 1 labelsize 16
  1437. }
  1438. Fl_Box {} {
  1439. label {.. if you have used ZynAddSubFX before, or you like to have full controll to all parameters.}
  1440. xywh {110 165 310 35} labelfont 1 labelsize 11 align 144
  1441. }
  1442. Fl_Button {} {
  1443. label Beginner
  1444. callback {simplemasterwindow->show();
  1445. selectuiwindow->hide();
  1446. osc->write("/config/cfg.UserInterfaceMode", "i", 2);}
  1447. xywh {10 80 100 65} color 238 labelfont 1 labelsize 16
  1448. }
  1449. Fl_Box {} {
  1450. label {..if you are a beginner, you prefer using presets or you prefer to use simpler user interfaces. Most functionality of ZynAddSubFX will be hidden in this mode to make simple the learning/using it.}
  1451. xywh {110 75 320 75} labelfont 1 labelsize 11 align 144
  1452. }
  1453. Fl_Box {} {
  1454. label {You can switch the interface modes anytime you want.}
  1455. xywh {30 215 360 25} box BORDER_BOX color 51 labelfont 1 labelsize 11 align 144
  1456. }
  1457. }
  1458. }
  1459. Function {updatesendwindow()} {} {
  1460. code {/*for (int neff1=0;neff1<NUM_SYS_EFX;neff1++)
  1461. for (int neff2=neff1+1;neff2<NUM_SYS_EFX;neff2++)
  1462. syseffsend[neff1][neff2]->value(master->Psysefxsend[neff1][neff2]);*/} {}
  1463. }
  1464. Function {updatepanel()} {} {
  1465. code {for (int npart=0;npart<NUM_MIDI_PARTS;npart++){
  1466. panellistitem[npart]->refresh();
  1467. };} {}
  1468. }
  1469. Function {setfilelabel(const char *filename)} {} {
  1470. code {if (filename!=NULL) snprintf(&masterwindowlabel[0],100,"%s - ZynAddSubFX",fl_filename_name(filename));
  1471. else snprintf(&masterwindowlabel[0],100,"%s","ZynAddSubFX");
  1472. masterwindowlabel[99]='\\0';
  1473. masterwindow->label(&masterwindowlabel[0]);
  1474. simplemasterwindow->label(&masterwindowlabel[0]);
  1475. masterwindow->update_title();
  1476. simplemasterwindow->update_title();
  1477. } {}
  1478. }
  1479. Function {MasterUI(int *exitprogram_, class Fl_Osc_Interface *osc_):nioui(osc_)} {open
  1480. } {
  1481. code {exitprogram=exitprogram_;
  1482. osc=osc_;
  1483. ninseff=0;
  1484. nsyseff=0;
  1485. npart=0;
  1486. last_loaded[0]=0;
  1487. loading_next[0]=0;
  1488. last_xmz = new Osc_DataModel(osc);
  1489. last_xmz->callback = [this](std::string filestr) {
  1490. const char *filename = filestr.c_str();
  1491. if (filename[0] != 0)
  1492. strncpy(last_loaded, filename, XMZ_PATH_MAX);
  1493. else if (loading_next[0] != 0) {
  1494. strncpy(last_loaded, loading_next, XMZ_PATH_MAX);
  1495. loading_next[0] = 0;
  1496. } else
  1497. last_loaded[0] = 0;
  1498. last_loaded[XMZ_PATH_MAX - 1] = 0;
  1499. char *label = NULL;
  1500. if(last_loaded[0] != 0) {
  1501. label = strrchr(last_loaded, '/');
  1502. if(label && *label)
  1503. label = label+1;
  1504. else
  1505. label = last_loaded;
  1506. }
  1507. setfilelabel(label);
  1508. };
  1509. last_xmz->doUpdate("/last_xmz");
  1510. for (int i=0;i<NUM_SYS_EFX;i++)
  1511. for (int j=0;j<NUM_SYS_EFX;j++)
  1512. syseffsend[i][j]=NULL;
  1513. microtonalui=new MicrotonalUI(osc, "/microtonal/");
  1514. virkeyboard=new VirKeyboard(osc, "/");
  1515. bankui=new BankUI(&npart, osc);
  1516. configui=new ConfigUI(osc);
  1517. make_window();
  1518. fl_open_display();
  1519. \#if !defined(PLUGINVERSION) && HAS_X11
  1520. Pixmap p, mask;
  1521. XCreatePixmapFromData(fl_display, DefaultRootWindow(fl_display),
  1522. (char**)zynaddsubfx_xpm, &p, &mask, NULL);
  1523. masterwindow->icon((char *)p);
  1524. \#endif
  1525. assert(osc);
  1526. presetsui=new PresetsUI(osc);
  1527. setfilelabel(NULL);
  1528. swapefftype=0;
  1529. simplerefresh();} {}
  1530. }
  1531. Function {~MasterUI()} {} {
  1532. code {masterwindow->hide();
  1533. delete masterwindow;
  1534. simplemasterwindow->hide();
  1535. delete simplemasterwindow;
  1536. aboutwindow->hide();
  1537. delete aboutwindow;
  1538. syseffsendwindow->hide();
  1539. delete syseffsendwindow;
  1540. delete virkeyboard;
  1541. delete microtonalui;
  1542. delete bankui;
  1543. delete configui;
  1544. delete presetsui;
  1545. delete panelwindow;
  1546. delete selectuiwindow;} {}
  1547. }
  1548. Function {showUI(int UIMode)} {} {
  1549. code {switch (UIMode){
  1550. case 0:selectuiwindow->show();
  1551. break;
  1552. case 1:masterwindow->show();
  1553. break;
  1554. case 2:simplemasterwindow->show();
  1555. break;
  1556. };} {}
  1557. }
  1558. Function {simplerefresh()} {} {
  1559. code {/*
  1560. if (master->part[npart]->Pname[0]!=0) partname->label((char *)master->part[npart]->Pname);
  1561. else partname->label("Click here to load a instrument");
  1562. */
  1563. simplelistitemgroup->redraw();} {}
  1564. }
  1565. Function {do_new_master_unconditional()} {} {
  1566. code {delete microtonalui;
  1567. microtonalui=new MicrotonalUI(osc, "/microtonal/");
  1568. osc->write("/reset_master");
  1569. osc->write("/last_xmz");
  1570. npartcounter->value(1);
  1571. refresh_master_ui();
  1572. updatepanel();} {}
  1573. }
  1574. Function {do_new_master()} {} {
  1575. code {if (fl_choice("Clear *ALL* the parameters ?","No","Yes",NULL)){
  1576. do_new_master_unconditional();
  1577. }} {}
  1578. }
  1579. Function {do_revert_changes_unconditional()} {return_type int
  1580. } {
  1581. code {strncpy(loading_next, last_loaded, XMZ_PATH_MAX);
  1582. osc->write("/load_xmz", "s", last_loaded);
  1583. osc->write("/last_xmz");
  1584. refresh_master_ui();
  1585. updatepanel();
  1586. return 1;} {}
  1587. }
  1588. Function {do_revert_changes()} {} {
  1589. code {if (last_loaded[0] == 0)
  1590. do_new_master();
  1591. else
  1592. if (fl_choice("Revert *ALL* the parameters ?","No","Yes",NULL)){
  1593. do_revert_changes_unconditional();
  1594. }} {}
  1595. }
  1596. Function {do_load_master_unconditional(const char *filename, const char *display_name)} {return_type int
  1597. } {
  1598. code {strncpy(loading_next, filename, XMZ_PATH_MAX);
  1599. osc->write("/load_xmz", "s", filename);
  1600. osc->write("/last_xmz");
  1601. refresh_master_ui();
  1602. updatepanel();
  1603. setfilelabel(display_name);
  1604. return 1;} {}
  1605. }
  1606. Function {do_load_master(const char* file = NULL)} {} {
  1607. code {const char *filename;
  1608. if (file == NULL) {
  1609. filename=fl_file_chooser("Open:","({*.xmz})",NULL,0);
  1610. if (filename==NULL) return;
  1611. }
  1612. else {
  1613. filename = file;
  1614. }
  1615. int result = do_load_master_unconditional( filename, filename );
  1616. if (result==-10) fl_alert("Error: Could not load the file\\nbecause it is not a zynaddsubfx parameters file.");
  1617. else if (result<0) fl_alert("Error: Could not load the file.");} {}
  1618. }
  1619. Function {do_save_master(const char* file = NULL)} {} {
  1620. code {const char *filename;
  1621. char *tmp;
  1622. int result=0;
  1623. if (file == NULL) {
  1624. tmp=fl_file_chooser("Save:","({*.xmz})",NULL,0);
  1625. if (tmp==NULL) return;
  1626. tmp=fl_filename_setext(tmp,".xmz");
  1627. filename=tmp;
  1628. result=fileexists(tmp);
  1629. if (result) {
  1630. result=0;
  1631. if (!fl_choice("The file exists. Overwrite it?","No","Yes",NULL)) return;
  1632. }
  1633. }
  1634. else {
  1635. filename = file;
  1636. }
  1637. osc->write("/save_xmz", "s", filename);
  1638. if (result<0) fl_alert("Error: Could not save the file.");
  1639. else
  1640. {
  1641. osc->write("/last_xmz", "s", filename);
  1642. \#if USE_NSM
  1643. if ( nsm && nsm->is_active() )
  1644. setfilelabel( nsm->display_name );
  1645. else
  1646. \#endif
  1647. setfilelabel(filename);
  1648. }
  1649. updatepanel();} {}
  1650. }
  1651. Function {refresh_master_ui()} {} {
  1652. code {ninseff=0;
  1653. nsyseff=0;
  1654. npart=0;
  1655. //the Master UI
  1656. npartcounter->do_callback();
  1657. syseffnocounter->do_callback();
  1658. inseffnocounter->do_callback();
  1659. delete microtonalui;
  1660. microtonalui=new MicrotonalUI(osc, "/microtonal/");
  1661. updatesendwindow();
  1662. updatepanel();
  1663. //the simle MasterUI
  1664. simplenpartcounter->value(1);
  1665. simplesyseffnocounter->value(1);
  1666. simpleinseffnocounter->value(1);
  1667. simplenpartcounter->do_callback();
  1668. simplesyseffnocounter->do_callback();
  1669. simpleinseffnocounter->do_callback();
  1670. simplerefresh();
  1671. bankui->hide();} {}
  1672. }
  1673. decl {class Osc_DataModel *last_xmz;} {public local
  1674. }
  1675. decl {MicrotonalUI *microtonalui;} {private local
  1676. }
  1677. decl {BankUI *bankui;} {private local
  1678. }
  1679. decl {int ninseff,npart;} {private local
  1680. }
  1681. decl {int nsyseff;} {private local
  1682. }
  1683. decl {int *exitprogram;} {private local
  1684. }
  1685. decl {Fl_Osc_Dial *syseffsend[NUM_SYS_EFX][NUM_SYS_EFX];} {private local
  1686. }
  1687. decl {VirKeyboard *virkeyboard;} {private local
  1688. }
  1689. decl {ConfigUI *configui;} {private local
  1690. }
  1691. decl {int swapefftype;} {private local
  1692. }
  1693. decl {char masterwindowlabel[100];} {private local
  1694. }
  1695. decl {Panellistitem *panellistitem[NUM_MIDI_PARTS];} {public local
  1696. }
  1697. decl {NioUI nioui;} {private local
  1698. }
  1699. decl {class Fl_Osc_Interface *osc;} {public local
  1700. }
  1701. decl {char last_loaded[XMZ_PATH_MAX];} {public local
  1702. }
  1703. decl {char loading_next[XMZ_PATH_MAX];} {public local
  1704. }
  1705. Function {close()} {open return_type void
  1706. } {
  1707. code {*exitprogram=1;} {}
  1708. }
  1709. }