If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Set GUI Controls to a Value - Halp?
13 posts
• Page 1 of 2 • 1, 2
Set GUI Controls to a Value - Halp?
Hey all. This is an issue I kind of hinted at in another thread, but basically what it comes down to is I really need to be able to set a given GUI control (knobs, sliders, etc) to a particular value via some sort of input. This includes the value that the control is set to internally and outputting as well as the graphical representation (the graphics need to match the internal value). I need it to be able to be set instantly or continuously.
So, very simply, if I have a knob set to 25%, I want to be able to remotely set it to 75% from somewhere else in the schematic.
This functionality would open up a great deal of possibilities, a few of which I already have plans to take advantage of. Unfortunately though, when I click through the knob and slider modules I have, it all goes over my head at this point. So I'm stuck not knowing where to start on this. I'm not sure whether it's a complicated procedure I'm suggesting or a simple matter of injecting a value into a particular parameter somewhere.
If anyone can offer any insight that would be greatly appreciated!
So, very simply, if I have a knob set to 25%, I want to be able to remotely set it to 75% from somewhere else in the schematic.
This functionality would open up a great deal of possibilities, a few of which I already have plans to take advantage of. Unfortunately though, when I click through the knob and slider modules I have, it all goes over my head at this point. So I'm stuck not knowing where to start on this. I'm not sure whether it's a complicated procedure I'm suggesting or a simple matter of injecting a value into a particular parameter somewhere.
If anyone can offer any insight that would be greatly appreciated!
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Set GUI Controls to a Value - Halp?
Have you tried wireless connections? "Module wireless out" spreads 1 level up and then down to all other modules, and "wireless out" spreads directly down into all modules on your level. Then you just connect "last" switch to you schematic, one node to pass through knobs data, and another node to "wireless input". Note, that wireless links must have the same names (case sensitive) and be of the same type in order to communicate.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: Set GUI Controls to a Value - Halp?
tester wrote:Then you just connect "last" switch to you schematic, one node to pass through knobs data, and another node to "wireless input".
I think you're describing what I was looking for in the other thread, where you can simply pass through green data using lastswitch. Unfortunately that's not good enough; I need to be able to set the knob/slider itself to a particular value.
I'm aware of the wireless links and I'm sure they'll be useful. I just don't understand the GUI control modules' guts enough to ascertain how I can set their values. There's a lot going on in there. I also understand very little about the draw elements in FS at this point.
From a more traditional "programming" standpoint, there must be a variable stored somewhere that designates the control's setting, but I don't even know where that is. Maybe I just need to sit down and stare at it long enough.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Set GUI Controls to a Value - Halp?
you also could initialise the knob via a doubleclick command to an fixed value just add an input to your knob ruby module wher you connect the value you want to have, name it, for example "init" , and add this code inside the ruby module below the mouseMoveCaptured method:
now you can set the value to the init value via doubleclick
- Code: Select all
def mouseLDouble x,y
@value = @init
output 0, @ init
end
now you can set the value to the init value via doubleclick
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Set GUI Controls to a Value - Halp?
Oh I'm actually not using Ruby knobs at all. Once I found out the default knobs wouldn't reset to a default value I downloaded some others (pre-Ruby, I'm sure) that do. I've been gradually modifying them to my liking and so far they've worked perfectly. They look cooler too.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Set GUI Controls to a Value - Halp?
you can do this without ruby too , you will need the "Mouse LDbl-click" primitive...
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Set GUI Controls to a Value - Halp?
Okay, but I will want to be able to set the value within the schematic, not by user input, so is there some way I can set the knob to a custom value (not just a set default) via input?
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: Set GUI Controls to a Value - Halp?
Post a simple schematic with your isolated issue (just put together all you need, and remove all else), that will help beyond any words.
Need to take a break? I have something right for you.
Feel free to donate. Thank you for your contribution.
Feel free to donate. Thank you for your contribution.
- tester
- Posts: 1786
- Joined: Wed Jan 18, 2012 10:52 pm
- Location: Poland, internet
Re: Set GUI Controls to a Value - Halp?
so you dont want a particular value?
anyway therefore use the lastswitch or maybe a selector like mentioned in the other thread, you can use any value to set the knob, doesn`t matter from where it comes in the schematic and you have different possibilities how to set this value,
also the value for the doubleklick can come from anywhere in your schematic, for example you could choose via a selector form where the value is taken, you dont need to give a particular value for that, also when you use the lastswitch you could choose between different value sources via a selector or by using more lastswitches in serie then its always the last valuechange which is setting the knob, therefore you could also build in a switch for every source you have to turn the individual source on or off.... there are a lot of possibilities to do stuff like this... you just need to find out which one fits best for you..
another place to set values is inside the preset module of the knob, also with a lastswitch right before the value meets the value-in from the presetparameter primitive like the midi in is set... but from there it is the same story - choose a source from where you want to take a value and set it in a way (via pushbutton, doubleclick, selector, or trigger from within the schematic..) it fits for you
anyway therefore use the lastswitch or maybe a selector like mentioned in the other thread, you can use any value to set the knob, doesn`t matter from where it comes in the schematic and you have different possibilities how to set this value,
also the value for the doubleklick can come from anywhere in your schematic, for example you could choose via a selector form where the value is taken, you dont need to give a particular value for that, also when you use the lastswitch you could choose between different value sources via a selector or by using more lastswitches in serie then its always the last valuechange which is setting the knob, therefore you could also build in a switch for every source you have to turn the individual source on or off.... there are a lot of possibilities to do stuff like this... you just need to find out which one fits best for you..
another place to set values is inside the preset module of the knob, also with a lastswitch right before the value meets the value-in from the presetparameter primitive like the midi in is set... but from there it is the same story - choose a source from where you want to take a value and set it in a way (via pushbutton, doubleclick, selector, or trigger from within the schematic..) it fits for you
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: Set GUI Controls to a Value - Halp?
Nubeat7 wrote:another place to set values is inside the preset module of the knob, also with a lastswitch right before the value meets the value-in from the presetparameter primitive like the midi in is set...
Ah, I just found this on my own. Got my knobs rigged up now and it's working beautifully. Thank goodness that wasn't too hard after poking my nose around things for long enough. Now I can make some real progress.
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
13 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 67 guests