Home › Forums › General › Programming › Strange behaviour with buttons and LUA
- This topic has 8 replies, 2 voices, and was last updated 12 years, 4 months ago by dasfaker.
-
AuthorPosts
-
December 14, 2011 at 3:59 pm #512
Hi Atom
I have a uiImageSlider that send modulatorValue to a group of buttons thru LUA to make the buttons act like a radio group and vice versa, clicking the buttons change the option displayed in the uiImageSlider.
If the button that is "on" has an odd value, when I choose a even option in the uiImageSlider the buttons with even value doesn’t get on. And if the button on is even, I can’t get on the odd buttons.
I’ve revised the code and it seems ok, but I could be wrong.
You can see this behaviour in the Virus VC panel in several places, the buttons to select the filter type + little text in the upper side inside cutoff knobs and the buttons to select the lfo waves + the text with the wave name.
December 14, 2011 at 5:16 pm #3569Could you make a small example panel that demonstrates the problem, it’s hard to debug such big panels cause i run Ctrlr i debug mode witch is like 100x slower.
December 14, 2011 at 6:23 pm #3570Of course.
December 15, 2011 at 10:53 am #3571It’s a very complicated problem to handle. I did fix it (you need the latest nightly 907 build) however you should consider simplifying your panels. They’re too complex i think you are presenting the same value in two ways witch is redundant i think. The whole idea is to keep it simple and useful. This text slider that displays the name of the filter is waaay to small for me i had to resize it, also you are using images everywhere, wouldn’t it be more compact and portable if you just used normal TEXT ? I know you are aiming at showing custom fonts, so my question is, would it be easier for you if you could embed your fonts in the panel (i can do that) ? I didn’t want to add font embedding due to copyright issues, but i now i think it might help a lot.
Also i simplified your code a lot. Have a look:
[attachment=0:naxbqwcs]FIXED – Strange button behaviour.bpanelz[/attachment:naxbqwcs]
December 15, 2011 at 12:20 pm #3572Hi Atom, thx a lot for your help.
Redundant modulators have a reason: If I have a bunch of radio buttons that modify only 1 parameter, when you automate this parameter you have as much automation lines as number of buttons. So it’s better to have one modulator (a uiCombo with all the buttons values) to automate and the buttons will only be ornamental. At the end, for simplicity is better to eliminate any radio buttons and replace them with a uiCombo.
Regarding the simplification of the panels. The idea was to clone the Access editor and test what Ctrlr can do. If having a lot of images and a few redundant modulators is going to affect the performance of the system, then I will simplify the panel. I don’t know if complexity is a problem for performance or if it’s a problem when making the panel. If it’s the last, I don’t mind.
You have give us a lot of functions to make complex panels, so why not to make them? If there is a limit in what Ctrlr can do may be I should have know before starting the panel.
Bear in mind that I (and surely many users here) am fighting with the fact of the lack of documentation, lack of programming skill, new revisions that make things that worked not working any more, beta testing new features.
About the fonts. If you can make fonts embedded it will be fantastic. But I have images instead of fonts to have some kind of uiCombos with scrolling, or some kind of uiSlider with text, something not present now in Ctrl.
December 15, 2011 at 2:08 pm #3573Yes documentation is a problem and the way i’m releasing builds is a problem but i’m one guy and a very bad programmer remember that ” title=”Smile” />
Any program you use will have performance impacted if you add complex structures to it. Ctrlr is no different i have no idea at what point that will be annoying and how complex can a panel be, it’s for the people that make panels to figure out (i haven’t done any complicated structures yet). I’m not saying you shouldn’t do complex panels cause it will cause some sort of problems, any problems that will appear i’ll try to fix, i’m saying if you keep it simple there won’t be that much to fix by me ” title=”Smile” /> that’s all.
I’ll re-add the fonts stuff to my todo list.
December 15, 2011 at 4:34 pm #3574I can imagine the complexity of what you are doing for free, so I applaud your effort and generosity. I didn’t want to sound rude (remember, my English is as bad as my programming).
The panel has to be complex, as the synth is complex. There are +- 500 parameters to edit in a Virus patch; some parameters share the midi message doing very different things, some parameters are active depending on other parameters… And part of this complexity is aimed at having a panel easy to use and with all the info possible to the final user. Yes, you can remove all the graphic stuff, but is not the same.
December 15, 2011 at 5:50 pm #3575You weren’t rude don’t worry, everybody keeps telling me what a great job i’m doing ” title=”Smile” /> no need for that the fact that someone uses Ctrlr is thanks enough.
And let me know if the new build helped.
December 15, 2011 at 6:51 pm #3576Yes, it works perfect.
-
AuthorPosts
- The forum ‘Programming’ is closed to new topics and replies.