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

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