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.

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