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.

1683 lines
54KB

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