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.

MasterUI.fl 57KB

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