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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125
  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. \#ifdef NTK_GUI
  1007. adsynenabledcheck->selection_color(55);
  1008. subsynenabledcheck->selection_color(55);
  1009. padsynenabledcheck->selection_color(55);
  1010. \#endif
  1011. partgroup->position(this->parent()->x()+2,this->parent()->y()+2);
  1012. partgroup->show();
  1013. end();
  1014. //if (config.ui.showinstrumentinfo!=0) instrumenteditwindow->show();
  1015. int klimits[]={1,2,3,4,5,6,7,8,9,10,15,20,30,50,100,0};
  1016. keylimitlist->add("OFF");
  1017. int k=0;
  1018. int val=-1;
  1019. char tmp[10];
  1020. while (klimits[k]!=0){
  1021. sprintf(tmp,"%d",klimits[k]);
  1022. keylimitlist->add(tmp);
  1023. if (val==-1){
  1024. if (klimits[k]>part->Pkeylimit) val=k;
  1025. };
  1026. k++;
  1027. };
  1028. if (val==-1) val=k;
  1029. keylimitlist->value(val);} {}
  1030. }
  1031. Function {showparameters(int kititem,int engine)} {} {
  1032. code {if (engine==-1){//this is used if I want to clear the engine from the part
  1033. if (kititem==lastkititem) kititem=-1;
  1034. else kititem=lastkititem;
  1035. };
  1036. if (kititem!=lastkititem){
  1037. if (adnoteui!=NULL) delete (adnoteui);
  1038. if (subnoteui!=NULL) delete (subnoteui);
  1039. if (padnoteui!=NULL) delete (padnoteui);
  1040. adnoteui=NULL;subnoteui=NULL;padnoteui=NULL;
  1041. lastkititem=kititem;
  1042. if (kititem>=NUM_KIT_ITEMS) return;//bad kit item
  1043. if (kititem<0) return;
  1044. if (part->kit[kititem].adpars!=NULL)
  1045. adnoteui=new ADnoteUI(part->kit[kititem].adpars,master);
  1046. if (part->kit[kititem].subpars!=NULL)
  1047. subnoteui=new SUBnoteUI(part->kit[kititem].subpars);
  1048. if (part->kit[kititem].padpars!=NULL)
  1049. padnoteui=new PADnoteUI(part->kit[kititem].padpars,master);
  1050. };
  1051. if ((engine==0)&&(adnoteui!=NULL)) adnoteui->ADnoteGlobalParameters->show();
  1052. if ((engine==1)&&(subnoteui!=NULL)) subnoteui->SUBparameters->show();
  1053. if ((engine==2)&&(adnoteui!=NULL)) padnoteui->padnotewindow->show();} {}
  1054. }
  1055. Function {~PartUI()} {} {
  1056. code {if (adnoteui!=NULL) delete (adnoteui);
  1057. if (subnoteui!=NULL) delete (subnoteui);
  1058. if (padnoteui!=NULL) delete (padnoteui);
  1059. partgroup->hide();
  1060. //delete(partgroup);
  1061. ctlwindow->hide();
  1062. delete(ctlwindow);
  1063. partfx->hide();
  1064. delete(partfx);
  1065. instrumentkitlist->hide();
  1066. delete(instrumentkitlist);
  1067. instrumenteditwindow->hide();
  1068. delete(instrumenteditwindow);} {}
  1069. }
  1070. decl {Part *part;} {}
  1071. decl {Master *master;} {}
  1072. decl {BankUI *bankui;} {}
  1073. decl {ADnoteUI *adnoteui;} {}
  1074. decl {SUBnoteUI *subnoteui;} {}
  1075. decl {PADnoteUI *padnoteui;} {}
  1076. decl {PartSysEffSend *psyef[NUM_SYS_EFX];} {}
  1077. decl {int npart;} {}
  1078. decl {int ninseff;} {}
  1079. decl {int lastkititem;} {}
  1080. decl {PartKitItem *partkititem[NUM_KIT_ITEMS];} {}
  1081. }