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.

PartUI.fl 39KB

9 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213
  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-2005 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 <string>} {public local
  16. }
  17. decl {\#include "Fl_Osc_Dial.H"} {public local
  18. }
  19. decl {\#include "Fl_Osc_Input.H"} {public local
  20. }
  21. decl {\#include "PartNameButton.h"} {public local
  22. }
  23. decl {\#include "EffUI.h"} {public local
  24. }
  25. decl {\#include "BankUI.h"} {public local
  26. }
  27. decl {\#include "ADnoteUI.h"} {public local
  28. }
  29. decl {\#include "SUBnoteUI.h"} {public local
  30. }
  31. decl {\#include "PADnoteUI.h"} {public local
  32. }
  33. decl {\#include "../Misc/Config.h"} {public local
  34. }
  35. decl {\#include "../Misc/Master.h"} {public local
  36. }
  37. decl {\#include "../Misc/Part.h"} {public local
  38. }
  39. class PartSysEffSend {open : {public Fl_Group}
  40. } {
  41. Function {make_window()} {open private
  42. } {
  43. Fl_Window syseffsend {
  44. private xywh {604 244 100 100} type Double box NO_BOX
  45. class Fl_Group visible
  46. } {
  47. Fl_Dial widget {
  48. label 01
  49. xywh {0 0 25 25} box ROUND_UP_BOX labelfont 1 labelsize 10 align 130 maximum 127 step 1
  50. code0 {o->size(25,25);}
  51. code1 {o->alt_init("/","Psysefxvol"+to_s(neff)+"/part"+to_s(npart));}
  52. code2 {o->mark_dead();}
  53. code3 {char tmp[10];snprintf(tmp,10,"%d",neff+1);o->copy_label(tmp);}
  54. class Fl_Osc_Dial
  55. }
  56. }
  57. }
  58. Function {PartSysEffSend(int x,int y, int w, int h, const char *label=0):Fl_Group(x,y,w,h,label)} {} {
  59. code {neff=0;
  60. npart=0;} {}
  61. }
  62. Function {init(int npart_,int neff_)} {} {
  63. code {npart=npart_;
  64. neff=neff_;
  65. make_window();
  66. syseffsend->show();
  67. end();} {}
  68. }
  69. Function {rebase(int part)} {} {
  70. code {
  71. auto *osc = widget->osc;
  72. std::string old = "Psysefxvol"+to_s(neff)+"/part"+to_s(npart);
  73. std::string next = "Psysefxvol"+to_s(neff)+"/part"+to_s(part);
  74. widget->ext = next;
  75. osc->renameLink("/"+old, "/"+next, widget);
  76. osc->requestValue("/"+next);
  77. npart = part;
  78. } {}
  79. }
  80. Function {~PartSysEffSend()} {} {
  81. code {syseffsend->hide();
  82. //delete(syseffsend);} {}
  83. }
  84. decl {int neff;} {private local
  85. }
  86. decl {int npart;} {private local
  87. }
  88. }
  89. class PartKitItem {open : {public Fl_Osc_Group}
  90. } {
  91. Function {make_window()} {open private
  92. } {
  93. Fl_Window partkititem {
  94. private xywh {488 521 670 100} type Double box NO_BOX
  95. class Fl_Osc_Group visible
  96. } {
  97. Fl_Group partkititemgroup {
  98. private xywh {55 0 605 20}
  99. class Fl_Osc_Group
  100. } {
  101. Fl_Counter minkcounter {
  102. xywh {225 0 55 15} type Simple minimum 0 maximum 128 step 1
  103. code0 {o->init("Pminkey");}
  104. class Fl_Osc_Counter
  105. }
  106. Fl_Button {} {
  107. label m
  108. callback {o->oscWrite("captureMin");
  109. minkcounter->update();
  110. maxkcounter->update();}
  111. tooltip {set the minimum key to the last pressed key} xywh {285 3 15 12} box THIN_UP_BOX labelsize 10
  112. class Fl_Osc_Button
  113. }
  114. Fl_Button {} {
  115. label M
  116. callback {o->oscWrite("captureMax");
  117. minkcounter->update();
  118. maxkcounter->update();}
  119. tooltip {set the maximum key to the last pressed key} xywh {315 3 15 12} box THIN_UP_BOX labelsize 10
  120. class Fl_Osc_Button
  121. }
  122. Fl_Button {} {
  123. label R
  124. callback {minkcounter->value(0);
  125. minkcounter->do_callback();
  126. maxkcounter->value(127);
  127. maxkcounter->do_callback();}
  128. tooltip {reset the minimum key to 0 and maximum key to 127} xywh {300 3 15 12} box THIN_UP_BOX labelfont 1 labelsize 10
  129. }
  130. Fl_Button adeditbutton {
  131. label edit
  132. callback {
  133. if (Fl::event_shift())
  134. partui->showvoiceparams(n, true);
  135. else if (Fl::event_ctrl())
  136. partui->showvoiceparams(n, false);
  137. else
  138. partui->showparameters(n,0);
  139. }
  140. xywh {420 0 40 15} box THIN_UP_BOX labelsize 11
  141. }
  142. Fl_Button subeditbutton {
  143. label edit
  144. callback {partui->showparameters(n,1);}
  145. xywh {490 0 40 15} box THIN_UP_BOX labelsize 11
  146. }
  147. Fl_Check_Button mutedcheck {
  148. xywh {60 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
  149. code0 {o->init("Pmuted");}
  150. class Fl_Osc_Check
  151. }
  152. Fl_Counter maxkcounter {
  153. xywh {335 0 55 15} type Simple minimum 0 maximum 128 step 1
  154. code0 {o->init("Pmaxkey");}
  155. class Fl_Osc_Counter
  156. }
  157. Fl_Input labelbutton {
  158. label {Bass Drum}
  159. xywh {90 0 130 15} box THIN_DOWN_BOX labelfont 1 labelsize 10 align 20
  160. code0 {o->init("Pname");}
  161. callback { o->oscWrite(o->ext, "s", o->value()); }
  162. class Fl_Osc_Input
  163. }
  164. Fl_Check_Button adcheck {
  165. callback {if (o->value()!=0) adeditbutton->activate();
  166. else adeditbutton->deactivate();}
  167. private xywh {400 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
  168. code0 {o->init("Padenabled");}
  169. class Fl_Osc_Check
  170. }
  171. Fl_Check_Button subcheck {
  172. callback {if(o->value()!=0) subeditbutton->activate();
  173. else subeditbutton->deactivate();}
  174. private xywh {470 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
  175. code0 {o->init("Psubenabled");}
  176. class Fl_Osc_Check
  177. }
  178. Fl_Choice sendtoeffect {
  179. xywh {615 0 45 15} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
  180. code0 {char nrstr[10]; for(int i=0;i<NUM_PART_EFX;i++){sprintf(nrstr,"FX%d",i+1);o->add(nrstr);};o->add("OFF");}
  181. code1 {o->init("Psendtoparteffect");//TODO check semantics}
  182. class Fl_Osc_Choice
  183. } {}
  184. Fl_Button padeditbutton {
  185. label edit
  186. callback {partui->showparameters(n,2);}
  187. xywh {560 0 40 15} box THIN_UP_BOX labelsize 11
  188. }
  189. Fl_Check_Button padcheck {
  190. callback {if (o->value()!=0) padeditbutton->activate();
  191. else padeditbutton->deactivate();}
  192. private xywh {540 0 20 15} down_box DOWN_BOX labelfont 1 labelsize 11 align 4
  193. code0 {o->init("Ppadenabled");}
  194. class Fl_Osc_Check
  195. }
  196. }
  197. Fl_Check_Button enabledcheck {
  198. label 01
  199. callback {int answer=1;
  200. //TODO special case
  201. if (o->value()==0 && !o->is_osc)
  202. answer=fl_choice("Delete the item?","No","Yes",NULL);
  203. if(!answer)
  204. o->value(true);
  205. if (o->value()==0) partkititemgroup->deactivate();
  206. else partkititemgroup->activate();
  207. o->redraw();
  208. partui->showparameters(n,-1);//use to delete the ui, if it is not to item 0}
  209. private xywh {30 0 20 15} down_box DOWN_BOX labeltype EMBOSSED_LABEL labelfont 1 labelsize 13 align 4
  210. code0 {snprintf(label,10,"%d",n+1);o->label(label);}
  211. code1 {o->init("Penabled");}
  212. code2 {if (n==0) o->deactivate();}
  213. class Fl_Osc_Check
  214. }
  215. }
  216. }
  217. Function {PartKitItem(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {} {
  218. code {n=0;} {}
  219. }
  220. Function {refresh()} {} {
  221. code {this->redraw();} {}
  222. }
  223. Function {init(int n_,class PartUI *partui_)} {} {
  224. code {n=n_;
  225. ext = "kit"+to_s(n)+"/";
  226. partui=partui_;
  227. make_window();
  228. if (n == 0)
  229. mutedcheck->deactivate();
  230. else
  231. deactivate();
  232. //partkititem->show();
  233. end();} {}
  234. }
  235. Function {~PartKitItem()} {} {
  236. code {} {}
  237. }
  238. decl {int n;} {private local
  239. }
  240. decl {char label[10];} {private local
  241. }
  242. decl {class PartUI *partui;} {private local
  243. }
  244. }
  245. class PartUI {open : {public Fl_Osc_Group}
  246. } {
  247. Function {make_window()} {open private
  248. } {
  249. Fl_Window partgroup {
  250. private xywh {703 379 385 180} type Double box NO_BOX
  251. class Fl_Group visible
  252. } {
  253. Fl_Group partgroupui {open
  254. xywh {0 0 385 180}
  255. class Fl_Osc_Group
  256. } {
  257. Fl_Dial {} {
  258. label Pan
  259. xywh {50 40 25 25} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
  260. code0 {o->init("Ppanning"); o->reset_value=64;}
  261. class Fl_Osc_Dial
  262. }
  263. Fl_Counter {} {
  264. label KeyShift
  265. xywh {195 45 90 20} labelsize 11 align 1 minimum -64 maximum 64 step 1
  266. code0 {o->lstep(12);}
  267. code1 {o->init("Pkeyshift", 'i', -64);}
  268. class Fl_Osc_Counter
  269. }
  270. Fl_Scroll {} {open
  271. xywh {166 91 125 49} box UP_BOX labelfont 1 labelsize 10 align 21
  272. } {
  273. Fl_Pack {} {open
  274. xywh {171 96 115 35} type HORIZONTAL
  275. code0 {o->spacing(5);}
  276. code1 {for (int i=0;i<NUM_SYS_EFX;i++){psyef[i]=new PartSysEffSend(0,0,25,35,"");psyef[i]->init(npart,i);}}
  277. } {}
  278. }
  279. Fl_Button {} {
  280. label {Grand Piano}
  281. callback {int event=Fl::event_button();
  282. if (event==FL_RIGHT_MOUSE){
  283. const char *tmp=fl_input("Instrument name:",o->label());
  284. if (tmp!=NULL)
  285. o->oscWrite("Pname", "s", tmp);
  286. } else {
  287. if (event==FL_LEFT_MOUSE) bankui->show();
  288. else instrumenteditwindow->show();
  289. };}
  290. tooltip {left mousebutton - to choose/save/.. from/to bank or right mousebutton to change the name or middle button to change the instrument information}
  291. xywh {195 5 185 20} box UP_FRAME down_box DOWN_FRAME labelfont 1 labelsize 11 align 84
  292. code0 {/*o->label((char *)part->Pname);*/}
  293. code1 {o->ext = "Pname";o->oscRegister("Pname");}
  294. class PartNameButton
  295. }
  296. Fl_Box {} {
  297. label {To Sys.Efx.}
  298. xywh {166 81 95 10} labelfont 1 labelsize 10
  299. }
  300. Fl_Check_Button {} {
  301. label NoteOn
  302. tooltip {set if the part receives NoteOn messages} xywh {10 155 65 20} down_box DOWN_BOX labelfont 1 labelsize 11
  303. code0 {o->init("Pnoteon");}
  304. class Fl_Osc_Check
  305. }
  306. Fl_Counter minkcounter {
  307. label {Min.k}
  308. callback {if (minkcounter->value() > maxkcounter->value()) o->textcolor(FL_RED);
  309. else o->textcolor(FL_BLACK);}
  310. tooltip {Minimum key (that the part receives NoteOn messages)} xywh {295 125 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10
  311. code0 {o->init("Pminkey");}
  312. class Fl_Osc_Counter
  313. }
  314. Fl_Counter maxkcounter {
  315. label {Max.k}
  316. callback {if (minkcounter->value() > maxkcounter->value()) o->textcolor(FL_RED);
  317. else o->textcolor(FL_BLACK);}
  318. tooltip {Maximum key (that the part receives NoteOn messages)} xywh {340 125 40 15} type Simple labelfont 1 labelsize 10 minimum 0 maximum 127 step 1 textsize 10
  319. code0 {o->init("Pmaxkey");}
  320. class Fl_Osc_Counter
  321. }
  322. Fl_Dial {} {
  323. label Volume
  324. tooltip {Part Volume} xywh {10 35 30 30} box ROUND_UP_BOX labelsize 11 maximum 127 step 1
  325. code0 {o->init("Pvolume"); o->reset_value=96;}
  326. class Fl_Osc_Dial
  327. }
  328. Fl_Dial {} {
  329. label {Vel.Ofs.}
  330. tooltip {Velocity Offset} xywh {135 40 25 25} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
  331. code0 {o->init("Pveloffs"); o->reset_value=64;}
  332. class Fl_Osc_Dial
  333. }
  334. Fl_Dial {} {
  335. label {Vel.Sns.}
  336. tooltip {Velocity Sensing Function} xywh {95 40 25 25} box ROUND_UP_BOX labelsize 10 maximum 127 step 1
  337. code0 {o->init("Pvelsns"); o->reset_value=64;}
  338. class Fl_Osc_Dial
  339. }
  340. Fl_Button {} {
  341. label Controllers
  342. callback {ctlwindow->show();}
  343. xywh {295 90 85 30} labelfont 1 labelsize 11
  344. }
  345. Fl_Check_Button {} {
  346. label Portamento
  347. tooltip {Enable/Disable the portamento} xywh {95 155 88 20} down_box DOWN_BOX labelfont 1 labelsize 11
  348. code0 {o->init("ctl/portamento.portamento");}
  349. class Fl_Osc_Check
  350. }
  351. Fl_Button {} {
  352. label {Edit instrument}
  353. callback {
  354. if (Fl::event_shift() || Fl::event_ctrl())
  355. instrumentkitlist->show();
  356. else
  357. instrumenteditwindow->show();
  358. }
  359. xywh {15 90 130 30} color 52 labelfont 1 labelsize 13
  360. }
  361. Fl_Button {} {
  362. label m
  363. callback {o->oscWrite("captureMin");
  364. o->oscWrite("Pminkey");
  365. o->oscWrite("Pmaxkey");}
  366. tooltip {set the minimum key to the last pressed key} xywh {315 155 15 12} box THIN_UP_BOX labelsize 10
  367. class Fl_Osc_Button
  368. }
  369. Fl_Button {} {
  370. label M
  371. callback {o->oscWrite("captureMax");
  372. o->oscWrite("Pminkey");
  373. o->oscWrite("Pmaxkey");}
  374. tooltip {set the maximum key to the last pressed key} xywh {345 155 15 12} box THIN_UP_BOX labelsize 10
  375. class Fl_Osc_Button
  376. }
  377. Fl_Button {} {
  378. label R
  379. callback {o->oscWrite("Pminkey", "i", 0);
  380. o->oscWrite("Pmaxkey", "i", 127);}
  381. tooltip {reset the minimum key to 0 and maximum key to 127} xywh {330 155 15 12} box THIN_UP_BOX labelfont 1 labelsize 10
  382. class Fl_Osc_Button
  383. }
  384. Fl_Choice {} {
  385. label {MIDI Chn.Rcv.}
  386. tooltip {receive from Midi channel} xywh {310 45 70 20} down_box BORDER_BOX labelsize 10 align 5 textfont 1 textsize 10
  387. code0 {char nrstr[10]; for(int i=0;i<NUM_MIDI_CHANNELS;i++){sprintf(nrstr,"Chn%d",i+1);if (i!=9) o->add(nrstr); else o->add("Drms10");};}
  388. code1 {o->init("Prcvchn");}
  389. class Fl_Osc_Choice
  390. } {}
  391. Fl_Counter keylimitlist {
  392. label KLmt
  393. tooltip {Key Limit} xywh {215 155 50 20} labelsize 10 align 8 textfont 1 textsize 10
  394. code0 {o->init("Pkeylimit",'i');}
  395. code1 {o->step(1.0,10.0);}
  396. code2 {o->range(0,127);}
  397. class Fl_Osc_Counter
  398. }
  399. Fl_Choice {} {
  400. label {Mode :}
  401. tooltip {Poly, Mono or Legato mode} xywh {80 130 64 18} down_box BORDER_BOX labelfont 1 labelsize 11 textfont 1 textsize 10
  402. code0 {o->add("Poly"); o->add("Mono"); o->add("Legato");}
  403. code1 {o->init("polyType");}
  404. class Fl_Osc_Choice
  405. } {}
  406. }
  407. Fl_Check_Button partenablebutton {
  408. label Enabled
  409. callback {if (o->value()==0) partgroupui->deactivate();
  410. else partgroupui->activate();}
  411. xywh {90 5 75 20} down_box DOWN_BOX labelfont 1 labelsize 11
  412. code0 {o->init("Penabled");}
  413. class Fl_Osc_Check
  414. }
  415. }
  416. Fl_Window ctlwindow {
  417. label Controllers
  418. private xywh {777 376 500 135} type Double box NO_BOX
  419. class Fl_Osc_Window visible
  420. } {
  421. Fl_Box {} {
  422. xywh {0 0 0 0}
  423. code0 {ctlwindow->init(osc,"/part"+to_s(npart)+"/ctl/");}
  424. }
  425. Fl_Check_Button {} {
  426. label Expr
  427. tooltip {Expression enable} xywh {155 58 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  428. code0 {o->init("expression.receive");}
  429. class Fl_Osc_Check
  430. }
  431. Fl_Dial {} {
  432. label PanDpth
  433. tooltip {Panning Depth} xywh {10 55 30 30} labelsize 10 maximum 127 step 1
  434. code0 {o->init("panning.depth");o->reset_value=64;}
  435. class Fl_Osc_Dial
  436. }
  437. Fl_Dial {} {
  438. label FltCut
  439. tooltip {Filter Cutoff depth} xywh {90 55 30 30} labelsize 10 maximum 127 step 1
  440. code0 {o->init("filtercutoff.depth");o->reset_value=64;}
  441. class Fl_Osc_Dial
  442. }
  443. Fl_Dial {} {
  444. label FltQ
  445. tooltip {Filter Q depth} xywh {50 55 30 30} labelsize 10 maximum 127 step 1
  446. code0 {o->init("filterq.depth");o->reset_value=64;}
  447. class Fl_Osc_Dial
  448. }
  449. Fl_Dial {} {
  450. label BwDpth
  451. tooltip {BandWidth depth} xywh {125 10 30 30} labelsize 10 maximum 127 step 1
  452. code0 {o->init("bandwidth.depth");o->reset_value=64;}
  453. class Fl_Osc_Dial
  454. }
  455. Fl_Dial {} {
  456. label ModWh
  457. tooltip {Modulation Wheel depth} xywh {50 10 30 30} labelsize 10 maximum 127 step 1
  458. code0 {o->init("modwheel.depth");o->reset_value=80;}
  459. class Fl_Osc_Dial
  460. }
  461. Fl_Check_Button benddir {
  462. label Downward
  463. callback {if (o->value()) {bendrng->oscMove("pitchwheel.bendrange_down");}
  464. else {bendrng->oscMove("pitchwheel.bendrange");}}
  465. xywh {205 37 69 15} down_box DOWN_BOX labelsize 10
  466. }
  467. Fl_Counter bendrng {
  468. label {PWheelB.Rng (cents)}
  469. tooltip {Pitch Wheel Bend Range (cents)} xywh {165 15 110 20} labelsize 10 align 1 minimum -6400 maximum 6400 step 1
  470. code0 {o->init("pitchwheel.bendrange", 'i');}
  471. code1 {o->lstep(100);}
  472. class Fl_Osc_Counter
  473. }
  474. Fl_Check_Button bendsplt {
  475. label Split
  476. callback {if(o->value()) {benddir->activate();}
  477. else {benddir->deactivate(); benddir->value(0); benddir->do_callback();}}
  478. xywh {167 37 38 15} down_box DOWN_BOX labelsize 10
  479. code0 {o->init("pitchwheel.is_split");}
  480. class Fl_Osc_Check
  481. }
  482. Fl_Check_Button {} {
  483. label FMamp
  484. tooltip {FM amplitude enable} xywh {205 58 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  485. code0 {o->init("fmamp.receive");}
  486. class Fl_Osc_Check
  487. }
  488. Fl_Check_Button {} {
  489. label Vol
  490. tooltip {Volume enable} xywh {155 83 45 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  491. code0 {o->init("volume.receive");}
  492. class Fl_Osc_Check
  493. }
  494. Fl_Check_Button {} {
  495. label Sustain
  496. callback {//TODO
  497. /*if (ctl.sustain.receive==0) {
  498. ReleaseSustainedKeys();
  499. ctl.setsustain(0);
  500. };*/}
  501. tooltip {Sustain pedal enable} xywh {205 83 60 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  502. code0 {o->init("sustain.receive");}
  503. class Fl_Osc_Check
  504. }
  505. Fl_Button {} {
  506. label Close
  507. callback {ctlwindow->hide();}
  508. xywh {400 110 95 20} box THIN_UP_BOX
  509. }
  510. Fl_Button {} {
  511. label {Reset all controllers}
  512. callback {o->oscWrite("defaults");//part->SetController(C_resetallcontrollers,0);
  513. ctlwindow->update();
  514. }
  515. xywh {5 110 210 20} box THIN_UP_BOX
  516. class Fl_Osc_Button
  517. }
  518. Fl_Group {} {
  519. label Portamento open
  520. xywh {280 15 160 90} box UP_FRAME labelsize 10
  521. class Fl_Osc_Group
  522. } {
  523. Fl_Check_Button {} {
  524. label Rcv
  525. tooltip {Receive Portamento Controllers} xywh {285 20 40 20} box THIN_UP_BOX down_box DOWN_BOX labelsize 10
  526. code0 {o->init("portamento.receive");}
  527. class Fl_Osc_Check
  528. }
  529. Fl_Dial {} {
  530. label time
  531. tooltip {Portamento time} xywh {285 60 25 25} labelsize 10 maximum 127 step 1
  532. code0 {o->init("portamento.time");o->reset_value=64;}
  533. class Fl_Osc_Dial
  534. }
  535. Fl_Counter {} {
  536. label thresh
  537. tooltip {Minimum or max. difference of the notes in order to do the portamento (x 100 cents)} xywh {340 20 50 20} type Simple labelsize 10 minimum 0 maximum 127 step 1
  538. code0 {o->init("portamento.pitchthresh");}
  539. class Fl_Osc_Counter
  540. }
  541. Fl_Check_Button {} {
  542. label {th.type}
  543. tooltip {Threshold type (min/max)} xywh {365 70 15 15} down_box DOWN_BOX labelsize 10 align 2
  544. code0 {o->init("portamento.pitchthreshtype");}
  545. class Fl_Osc_Check
  546. }
  547. Fl_Box {} {
  548. label {x100 cnt.}
  549. xywh {340 50 55 15} labelsize 10 align 16
  550. }
  551. Fl_Dial {} {
  552. label {t.dn/up}
  553. tooltip {Portamento time stretch (up/down)} xywh {315 60 25 25} labelsize 10 maximum 127 step 1
  554. code0 {o->init("portamento.updowntimestretch");o->reset_value=64;}
  555. class Fl_Osc_Dial
  556. }
  557. Fl_Dial propta {
  558. label {Prp.Rate}
  559. tooltip {Distance required to double change from nonpropotinal portamento time} xywh {405 20 25 25} labelsize 9 maximum 127 step 1
  560. code0 {o->init("portamento.propRate");o->reset_value=80;}
  561. class Fl_Osc_Dial
  562. }
  563. Fl_Dial proptb {
  564. label {Prp.Dpth}
  565. tooltip {The difference from nonproportinal portamento} xywh {405 60 25 25} labelsize 9 maximum 127 step 1
  566. code0 {o->init("portamento.propDepth");o->reset_value=90;}
  567. class Fl_Osc_Dial
  568. }
  569. Fl_Check_Button {} {
  570. label {Proprt.}
  571. callback {if(o->value()){propta->activate();proptb->activate();}
  572. else {propta->deactivate();proptb->deactivate();}}
  573. tooltip {Enable Proportinal Portamento (over fixed Portamento)} xywh {285 40 50 15} box THIN_UP_BOX down_box DOWN_BOX labelsize 9
  574. code0 {o->init("portamento.proportional");}
  575. class Fl_Osc_Check
  576. }
  577. }
  578. Fl_Group {} {
  579. label Resonance
  580. xywh {445 15 50 90} box UP_FRAME labelsize 10
  581. class Fl_Osc_Group
  582. } {
  583. Fl_Dial {} {
  584. label BWdpth
  585. tooltip {BandWidth controller depth} xywh {455 60 25 25} labelsize 10 maximum 127 step 1
  586. code0 {o->init("resonancebandwidth.depth");o->reset_value=64;}
  587. class Fl_Osc_Dial
  588. }
  589. Fl_Dial {} {
  590. label CFdpth
  591. tooltip {Center Frequency controller Depth} xywh {455 20 25 25} labelsize 10 maximum 127 step 1
  592. code0 {o->init("resonancecenter.depth");o->reset_value=64;}
  593. class Fl_Osc_Dial
  594. }
  595. }
  596. Fl_Check_Button {} {
  597. label {Exp MWh}
  598. tooltip {Exponential modulation wheel} xywh {10 15 40 25} down_box DOWN_BOX labelsize 10 align 148
  599. code0 {o->init("modwheel.exponential");}
  600. class Fl_Osc_Check
  601. }
  602. Fl_Check_Button {} {
  603. label {Exp BW}
  604. tooltip {Exponential BandWidth Controller} xywh {85 15 35 25} down_box DOWN_BOX labelsize 10 align 148
  605. code0 {o->init("bandwidth.exponential");}
  606. class Fl_Osc_Check
  607. }
  608. }
  609. Fl_Window partfx {
  610. label {Part's Insert Effects}
  611. private xywh {569 775 390 145} type Double box NO_BOX
  612. class Fl_Osc_Window visible
  613. } {
  614. Fl_Box {} {
  615. xywh {0 0 0 0}
  616. code0 {partfx->init(osc, part_path);}
  617. }
  618. Fl_Counter inseffnocounter {
  619. label {FX No.}
  620. callback {ninseff=(int) o->value()-1;
  621. insefftype->oscMove("partefx"+to_s(ninseff)+"/efftype");
  622. inseffectuigroup->reext("partefx"+to_s(ninseff)+"/");
  623. bypasseff->oscMove("Pefxbypass"+to_s(ninseff));
  624. sendtochoice->oscMove("Pefxroute"+to_s(ninseff));
  625. /*insefftype->value(part->partefx[ninseff]->geteffect());*/
  626. //insefftype->do_callback();
  627. inseffectui->refresh();
  628. int x=127;/*part->Pefxroute[ninseff];*/
  629. if (x==127) x=1;
  630. sendtochoice->value(x);}
  631. xywh {5 110 80 20} type Simple labelfont 1 align 6 minimum 1 maximum 127 step 1 textfont 1
  632. code0 {o->bounds(1,NUM_PART_EFX);}
  633. code1 {o->value(ninseff+1);}
  634. }
  635. Fl_Choice insefftype {
  636. label EffType
  637. callback {inseffectui->efftype = o->value();
  638. inseffectui->refresh();}
  639. xywh {155 110 70 15} down_box BORDER_BOX labelsize 10 align 6
  640. code0 {o->init(("partefx"+to_s(ninseff)+"/efftype").c_str());}
  641. class Fl_Osc_Choice
  642. } {
  643. MenuItem {} {
  644. label {No Effect}
  645. xywh {35 35 100 20} labelfont 1 labelsize 10
  646. }
  647. MenuItem {} {
  648. label Reverb
  649. xywh {45 45 100 20} labelfont 1 labelsize 10
  650. }
  651. MenuItem {} {
  652. label Echo
  653. xywh {55 55 100 20} labelfont 1 labelsize 10
  654. }
  655. MenuItem {} {
  656. label Chorus
  657. xywh {65 65 100 20} labelfont 1 labelsize 10
  658. }
  659. MenuItem {} {
  660. label Phaser
  661. xywh {70 70 100 20} labelfont 1 labelsize 10
  662. }
  663. MenuItem {} {
  664. label AlienWah
  665. xywh {80 80 100 20} labelfont 1 labelsize 10
  666. }
  667. MenuItem {} {
  668. label Distortion
  669. xywh {90 90 100 20} labelfont 1 labelsize 10
  670. }
  671. MenuItem {} {
  672. label EQ
  673. xywh {100 100 100 20} labelfont 1 labelsize 10
  674. }
  675. MenuItem {} {
  676. label DynFilter
  677. xywh {110 110 100 20} labelfont 1 labelsize 10
  678. }
  679. }
  680. Fl_Group inseffectuigroup {
  681. xywh {5 5 380 100} box FLAT_BOX color 48
  682. class Fl_Osc_Group
  683. } {
  684. Fl_Box {} {
  685. xywh {0 0 0 0}
  686. code0 {inseffectuigroup->ext = "partefx0/";}
  687. }
  688. Fl_Group inseffectui {
  689. xywh {5 5 380 95}
  690. code0 {o->init(true);}
  691. class EffUI
  692. } {}
  693. }
  694. Fl_Button {} {
  695. label Close
  696. callback {partfx->hide();}
  697. xywh {325 115 60 20} box THIN_UP_BOX
  698. }
  699. Fl_Choice sendtochoice {
  700. label {Send To.}
  701. callback {(void)o;/*int x=(int) o->value();
  702. part->Pefxroute[ninseff]=x;
  703. if (x==2) part->partefx[ninseff]->setdryonly(true);
  704. else part->partefx[ninseff]->setdryonly(false);*/}
  705. xywh {235 110 80 15} down_box BORDER_BOX labelsize 10 align 6
  706. code0 {/*int x=part->Pefxroute[ninseff]; if (x==127) x=1;*/}
  707. code1 {o->init(("Pefxroute"+to_s(ninseff)).c_str());}
  708. class Fl_Osc_Choice
  709. } {
  710. MenuItem {} {
  711. label {Next Effect}
  712. xywh {45 45 100 20} labelfont 1 labelsize 10
  713. }
  714. MenuItem {} {
  715. label {Part Out}
  716. xywh {55 55 100 20} labelfont 1 labelsize 10
  717. }
  718. MenuItem {} {
  719. label {Dry Out}
  720. xywh {65 65 100 20} labelfont 1 labelsize 10
  721. }
  722. }
  723. Fl_Check_Button bypasseff {
  724. label bypass
  725. tooltip {if the effect is not used (is bypassed)} xywh {90 110 60 15} down_box DOWN_BOX labelsize 11
  726. code0 {o->init("Pefxbypass"+to_s(ninseff));}
  727. class Fl_Osc_Check
  728. }
  729. Fl_Button {} {
  730. label C
  731. callback {presetsui->copy(partfx->loc()+"partefx"+to_s(ninseff)+"/");}
  732. xywh {90 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  733. }
  734. Fl_Button {} {
  735. label P
  736. callback {presetsui->paste(partfx->loc()+"partefx"+to_s(ninseff)+"/",inseffectui);}
  737. xywh {120 127 25 15} box THIN_UP_BOX color 179 labelfont 1 labelsize 11 labelcolor 55
  738. }
  739. }
  740. Fl_Window instrumentkitlist {
  741. label {Instrument Kit}
  742. xywh {601 611 670 370} type Double box NO_BOX
  743. class Fl_Osc_Window visible
  744. } {
  745. Fl_Box {} {
  746. xywh {0 0 0 0}
  747. code0 {instrumentkitlist->init(osc, "/part"+to_s(npart)+"/");}
  748. }
  749. Fl_Button {} {
  750. label {Close Window}
  751. callback {instrumentkitlist->hide();}
  752. xywh {255 350 160 20} box THIN_UP_BOX
  753. }
  754. Fl_Scroll kitlist {open
  755. xywh {0 15 670 330} type VERTICAL box UP_FRAME
  756. } {
  757. Fl_Pack {} {
  758. xywh {0 20 670 320}
  759. code0 {for (int i=0;i<NUM_KIT_ITEMS;i++){partkititem[i]=new PartKitItem(0,0,670,20);partkititem[i]->init(i,this);}}
  760. } {}
  761. }
  762. Fl_Box {} {
  763. label {No.}
  764. xywh {5 0 25 15} labelfont 1 labelsize 11 align 18
  765. }
  766. Fl_Box {} {
  767. label {M.}
  768. xywh {55 0 25 15} labelfont 1 labelsize 11 align 18
  769. }
  770. Fl_Box {} {
  771. label {Min.k}
  772. xywh {235 0 40 15} labelfont 1 labelsize 11 align 18
  773. }
  774. Fl_Box {} {
  775. label {Max.k}
  776. xywh {345 0 40 15} labelfont 1 labelsize 11 align 18
  777. }
  778. Fl_Box {} {
  779. label ADsynth
  780. xywh {405 0 50 15} labelfont 1 labelsize 11 align 18
  781. }
  782. Fl_Box {} {
  783. label SUBsynth
  784. xywh {470 0 60 15} labelfont 1 labelsize 11 align 18
  785. }
  786. Fl_Choice {} {
  787. label Mode
  788. callback {if (o->value()==0) {
  789. for (int i=1;i<NUM_KIT_ITEMS;i++)
  790. partkititem[i]->deactivate();
  791. partkititem[0]->mutedcheck->deactivate();
  792. } else {
  793. for (int i=1;i<NUM_KIT_ITEMS;i++)
  794. partkititem[i]->activate();
  795. partkititem[0]->mutedcheck->activate(); };}
  796. xywh {35 350 70 15} down_box BORDER_BOX labelsize 11 textfont 1 textsize 11
  797. code0 {o->init("Pkitmode");}
  798. class Fl_Osc_Choice
  799. } {
  800. MenuItem {} {
  801. label OFF
  802. xywh {0 0 100 20} labelfont 1 labelsize 11
  803. }
  804. MenuItem {} {
  805. label MULTI
  806. xywh {10 10 100 20} labelfont 1 labelsize 11
  807. }
  808. MenuItem {} {
  809. label SINGLE
  810. xywh {20 20 100 20} labelfont 1 labelsize 11
  811. }
  812. }
  813. Fl_Check_Button {} {
  814. label {Drum mode}
  815. xywh {125 350 80 15} down_box DOWN_BOX labelsize 10
  816. code0 {o->init("Pdrummode");}
  817. class Fl_Osc_Check
  818. }
  819. Fl_Button {} {
  820. label Comments
  821. callback {instrumenteditwindow->show();}
  822. xywh {481 350 106 20} box THIN_UP_BOX
  823. }
  824. Fl_Button {} {
  825. label Effects
  826. callback {partfx->show();} selected
  827. xywh {600 350 70 20} box THIN_UP_BOX
  828. }
  829. Fl_Box {} {
  830. label {FX.r.}
  831. xywh {620 0 30 15} labelfont 1 labelsize 11 align 18
  832. }
  833. Fl_Box {} {
  834. label PADsynth
  835. xywh {540 0 60 15} labelfont 1 labelsize 11 align 18
  836. }
  837. }
  838. Fl_Window instrumenteditwindow {
  839. label {Instrument Edit} open
  840. xywh {262 621 395 360} type Double box NO_BOX
  841. class Fl_Osc_Window visible
  842. } {
  843. Fl_Box {} {
  844. xywh {0 0 0 0}
  845. code0 {instrumenteditwindow->init(osc, "/part"+to_s(npart)+"/");}
  846. }
  847. Fl_Group editgroup {
  848. xywh {0 220 395 110} box UP_FRAME
  849. class Fl_Osc_Group
  850. } {
  851. Fl_Box {} {
  852. xywh {0 220 0 0}
  853. code0 {editgroup->ext = "kit0/";}
  854. }
  855. Fl_Group {} {
  856. label PADsynth
  857. xywh {205 245 100 80} box ENGRAVED_FRAME labelfont 1
  858. } {
  859. Fl_Button padeditbutton {
  860. label Edit
  861. callback {showparameters(0,2);}
  862. xywh {215 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
  863. }
  864. Fl_Check_Button padsynenabledcheck {
  865. label Enabled
  866. callback {if (o->value()==0) padeditbutton->deactivate();
  867. else padeditbutton->activate();}
  868. tooltip {enable/disable PADsynth} xywh {215 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
  869. code1 {o->init("Ppadenabled");}
  870. class Fl_Osc_Check
  871. }
  872. }
  873. Fl_Group {} {
  874. label ADsynth
  875. xywh {5 245 100 80} box ENGRAVED_FRAME labelfont 1
  876. } {
  877. Fl_Check_Button adsynenabledcheck {
  878. label Enabled
  879. callback {if (o->value()==0) adeditbutton->deactivate();
  880. else adeditbutton->activate();}
  881. tooltip {enable/disable ADsynth} xywh {15 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
  882. code1 {o->init("Padenabled");}
  883. class Fl_Osc_Check
  884. }
  885. Fl_Button adeditbutton {
  886. label Edit
  887. callback {
  888. if (Fl::event_shift()) {
  889. showvoiceparams(0, true);
  890. } else if (Fl::event_ctrl()) {
  891. showvoiceparams(0, false);
  892. } else
  893. showparameters(0,0);
  894. }
  895. xywh {15 281 80 34} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
  896. }
  897. }
  898. Fl_Group {} {
  899. label SUBsynth
  900. xywh {105 245 100 80} box ENGRAVED_FRAME labelfont 1
  901. } {
  902. Fl_Check_Button subsynenabledcheck {
  903. label Enabled
  904. callback {if (o->value()==0) subeditbutton->deactivate();
  905. else subeditbutton->activate();}
  906. tooltip {enable/disable SUBsynth} xywh {115 255 80 20} box UP_BOX down_box DOWN_BOX color 51 selection_color 0 labelfont 1 labelsize 11
  907. code1 {o->init("Psubenabled");}
  908. class Fl_Osc_Check
  909. }
  910. Fl_Button subeditbutton {
  911. label Edit
  912. callback {showparameters(0,1);}
  913. xywh {115 280 80 35} color 51 selection_color 51 labelfont 1 labelsize 13 align 128
  914. }
  915. }
  916. Fl_Button {} {
  917. label {Kit Edit}
  918. callback {instrumentkitlist->show();}
  919. xywh {310 245 80 35} color 51 selection_color 51 labelfont 1 align 128
  920. }
  921. Fl_Button {} {
  922. label Effects
  923. callback {partfx->show();}
  924. xywh {310 290 80 35} color 51 selection_color 51 labelfont 1 labelsize 13
  925. }
  926. }
  927. Fl_Group {} {
  928. xywh {0 5 395 215} box UP_FRAME
  929. } {
  930. Fl_Input {} {
  931. label {Author and Copyright}
  932. xywh {5 60 385 50} type Multiline color 124 labelsize 10 align 5
  933. code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);}
  934. code1 {o->init("info.Pauthor");}
  935. callback { o->oscWrite(o->ext, "s", o->value()); }
  936. class Fl_Osc_Input
  937. }
  938. Fl_Input {} {
  939. label Comments
  940. xywh {5 125 385 90} type Multiline color 124 labelsize 11 align 5
  941. code0 {o->maximum_size(MAX_INFO_TEXT_SIZE);}
  942. code1 {o->init("info.Pcomments");}
  943. callback { o->oscWrite(o->ext, "s", o->value()); }
  944. class Fl_Osc_Input
  945. }
  946. Fl_Choice {} {
  947. label {Type:}
  948. xywh {5 25 155 20} down_box BORDER_BOX labelfont 1 labelsize 11 align 5 textsize 10
  949. code0 {o->init("info.Ptype");}
  950. class Fl_Osc_Choice
  951. } {
  952. MenuItem {} {
  953. label {--------------------------}
  954. xywh {20 20 100 20} labelfont 1 labelsize 11
  955. }
  956. MenuItem {} {
  957. label Piano
  958. xywh {10 10 100 20} labelfont 1 labelsize 11
  959. }
  960. MenuItem {} {
  961. label {Chromatic Percussion}
  962. xywh {20 20 100 20} labelfont 1 labelsize 11
  963. }
  964. MenuItem {} {
  965. label Organ
  966. xywh {30 30 100 20} labelfont 1 labelsize 11
  967. }
  968. MenuItem {} {
  969. label Guitar
  970. xywh {40 40 100 20} labelfont 1 labelsize 11
  971. }
  972. MenuItem {} {
  973. label Bass
  974. xywh {50 50 100 20} labelfont 1 labelsize 11
  975. }
  976. MenuItem {} {
  977. label {Solo Strings}
  978. xywh {60 60 100 20} labelfont 1 labelsize 11
  979. }
  980. MenuItem {} {
  981. label Ensemble
  982. xywh {70 70 100 20} labelfont 1 labelsize 11
  983. }
  984. MenuItem {} {
  985. label Brass
  986. xywh {80 80 100 20} labelfont 1 labelsize 11
  987. }
  988. MenuItem {} {
  989. label Reed
  990. xywh {90 90 100 20} labelfont 1 labelsize 11
  991. }
  992. MenuItem {} {
  993. label Pipe
  994. xywh {100 100 100 20} labelfont 1 labelsize 11
  995. }
  996. MenuItem {} {
  997. label {Synth Lead}
  998. xywh {110 110 100 20} labelfont 1 labelsize 11
  999. }
  1000. MenuItem {} {
  1001. label {Synth Pad}
  1002. xywh {120 120 100 20} labelfont 1 labelsize 11
  1003. }
  1004. MenuItem {} {
  1005. label {Synth Effects}
  1006. xywh {130 130 100 20} labelfont 1 labelsize 11
  1007. }
  1008. MenuItem {} {
  1009. label Ethnic
  1010. xywh {140 140 100 20} labelfont 1 labelsize 11
  1011. }
  1012. MenuItem {} {
  1013. label Percussive
  1014. xywh {150 150 100 20} labelfont 1 labelsize 11
  1015. }
  1016. MenuItem {} {
  1017. label {Sound Effects}
  1018. xywh {160 160 100 20} labelfont 1 labelsize 11
  1019. }
  1020. }
  1021. }
  1022. Fl_Button {} {
  1023. label Close
  1024. callback {instrumenteditwindow->hide();}
  1025. xywh {150 335 95 25} box THIN_UP_BOX
  1026. }
  1027. }
  1028. }
  1029. Function {PartUI(int x,int y, int w, int h, const char *label=0):Fl_Osc_Group(x,y,w,h,label)} {open
  1030. } {
  1031. code {adnoteui=NULL;
  1032. subnoteui=NULL;
  1033. padnoteui=NULL;
  1034. lastkititem=-1;} {}
  1035. }
  1036. Function {init(std::string part_path_, int npart_,BankUI *bankui_, std::string loc_, Fl_Osc_Interface *osc_)} {open
  1037. } {
  1038. code {assert(osc_);
  1039. assert(!loc_.empty());
  1040. bankui=bankui_;
  1041. part_path = part_path_;
  1042. base = part_path;
  1043. npart=npart_;
  1044. ninseff=0;
  1045. osc=osc_;
  1046. loc=loc_;
  1047. make_window();
  1048. \#ifdef NTK_GUI
  1049. adsynenabledcheck->selection_color(55);
  1050. subsynenabledcheck->selection_color(55);
  1051. padsynenabledcheck->selection_color(55);
  1052. \#endif
  1053. partgroup->position(this->parent()->x()+2,this->parent()->y()+2);
  1054. partgroup->show();
  1055. end();
  1056. //if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show();
  1057. } {}
  1058. }
  1059. Function {cleanuplastkit(int kititem)} {open return_type int
  1060. } {
  1061. code {
  1062. if (kititem==lastkititem)
  1063. return 0;
  1064. delete adnoteui;
  1065. delete subnoteui;
  1066. delete padnoteui;
  1067. adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
  1068. lastkititem=kititem;
  1069. if(kititem>=NUM_KIT_ITEMS) return 1;//bad kit item
  1070. if(kititem<0) return 1;
  1071. return 0;
  1072. } {}}
  1073. Function {showparameters(int kititem,int engine)} {open
  1074. } {
  1075. code {
  1076. if (engine==-1){//this is used if I want to clear the engine from the part
  1077. //if (kititem==lastkititem) kititem=-1;
  1078. //else kititem=lastkititem;
  1079. delete adnoteui;
  1080. delete subnoteui;
  1081. delete padnoteui;
  1082. adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
  1083. return;
  1084. }
  1085. if (cleanuplastkit(kititem))
  1086. return;
  1087. if(!adnoteui && engine==0)//adsynenabledcheck->value())
  1088. adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc);
  1089. if(!subnoteui && engine==1)//subsynenabledcheck->value())
  1090. subnoteui=new SUBnoteUI(osc, loc+"kit"+to_s(kititem)+"/subpars/");
  1091. if(!padnoteui && engine==2)//padsynenabledcheck->value())
  1092. padnoteui=new PADnoteUI(loc+"kit"+to_s(kititem)+"/padpars/", osc);
  1093. if (engine==0&&adnoteui) adnoteui->ADnoteGlobalParameters->show();
  1094. if (engine==1&&subnoteui) subnoteui->SUBparameters->show();
  1095. if (engine==2&&padnoteui) padnoteui->padnotewindow->show();} {}
  1096. }
  1097. Function {showvoiceparams(int kititem, bool voicelist)} {open
  1098. } {
  1099. code {
  1100. if (cleanuplastkit(kititem))
  1101. return;
  1102. if(adnoteui ||
  1103. (adnoteui=new ADnoteUI(loc+"kit"+to_s(kititem)+"/adpars/", osc))) {
  1104. if(voicelist)
  1105. adnoteui->ADnoteVoiceList->show();
  1106. else {
  1107. if (adnoteui->advoice->mod_type->value() == 0)
  1108. adnoteui->advoice->voiceFMparametersgroup->deactivate();
  1109. else
  1110. adnoteui->advoice->voiceFMparametersgroup->activate();
  1111. adnoteui->ADnoteVoice->show();
  1112. }}} {}}
  1113. Function {~PartUI()} {} {
  1114. code {delete adnoteui;
  1115. delete subnoteui;
  1116. delete padnoteui;
  1117. partgroup->hide();
  1118. //delete(partgroup);
  1119. ctlwindow->hide();
  1120. delete(ctlwindow);
  1121. partfx->hide();
  1122. delete(partfx);
  1123. instrumentkitlist->hide();
  1124. delete(instrumentkitlist);
  1125. instrumenteditwindow->hide();
  1126. delete(instrumenteditwindow);} {}
  1127. }
  1128. decl {BankUI *bankui;} {private local
  1129. }
  1130. decl {ADnoteUI *adnoteui;} {selected public local
  1131. }
  1132. decl {SUBnoteUI *subnoteui;} {private local
  1133. }
  1134. decl {PADnoteUI *padnoteui;} {private local
  1135. }
  1136. decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {private local
  1137. }
  1138. decl {int npart;} {private local
  1139. }
  1140. decl {int ninseff;} {private local
  1141. }
  1142. decl {int lastkititem;} {private local
  1143. }
  1144. decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {private local
  1145. }
  1146. decl {std::string part_path;} {private local
  1147. }
  1148. decl {std::string loc;} {private local
  1149. }
  1150. decl {Fl_Osc_Interface *osc;} {private local
  1151. }
  1152. Function {rebase(std::string new_loc)} {open
  1153. } {
  1154. code {
  1155. loc = new_loc;
  1156. partgroupui->rebase(new_loc);
  1157. ctlwindow->rebase(new_loc+"ctl/");
  1158. partfx->rebase(new_loc);
  1159. instrumentkitlist->rebase(new_loc);
  1160. instrumenteditwindow->rebase(new_loc);
  1161. partenablebutton->rebase(new_loc);
  1162. int next_part = 0;
  1163. const char *tmp = new_loc.c_str();
  1164. while(*tmp && !isdigit(*tmp)) tmp++;
  1165. next_part = atoi(tmp);
  1166. for (int i=0;i<NUM_SYS_EFX;i++)
  1167. psyef[i]->rebase(next_part);
  1168. } {selected
  1169. }
  1170. }
  1171. }