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.

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