making a switch unable to turn itself off
-
woodslanding
- Member
- Posts: 1327
- Contact:
I have a nice setup going where a switch makes a panel visible, and then the close button on the panel turns the switch off. Great!
But if I hit the switch while it's already on, it turns off. I don't want to be able to close the panel from the switch, and I don't want the switch position to get out of sync with the panel.
How can I keep the switch from turning itself off, and still allow it to turn itself on? And still allow the close button to turn it off??
It's making my head hurt.....
Thanks!
-eric
But if I hit the switch while it's already on, it turns off. I don't want to be able to close the panel from the switch, and I don't want the switch position to get out of sync with the panel.
How can I keep the switch from turning itself off, and still allow it to turn itself on? And still allow the close button to turn it off??
It's making my head hurt.....
Thanks!
-eric
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
can you upload a little example or screenshot of the way you've pach this..?
could be more easy to help...
could be more easy to help...
To make what you ask for, i would use a script because i did not find a simple way to do that but i am really interested in find it.
Perhaps , rather than use a switch , it would be better to use a separator and panel module which produce always the same output ( button behaviour) and allow you to change his color separatly (the color would represent the state visible or not).
i think to something like that :

the problem is to always get a 1 after clicking on the sep and panel. i thought that the 0 to 1 module do that but it's not (??).
so what module produce a 1 each time it receives a button output ?
and after that, the button on your panel has to take the hand over all this loop to produce a 0 at the visible output.
Perhaps , rather than use a switch , it would be better to use a separator and panel module which produce always the same output ( button behaviour) and allow you to change his color separatly (the color would represent the state visible or not).
i think to something like that :
the problem is to always get a 1 after clicking on the sep and panel. i thought that the 0 to 1 module do that but it's not (??).
so what module produce a 1 each time it receives a button output ?
and after that, the button on your panel has to take the hand over all this loop to produce a 0 at the visible output.
I would deal with color to update the state of the panel as pansoul says and maybe use a "pass only if positive" (A>b then then A pass) so that it will only produce 1 when positiv...
are you refering to the math - logical - A>B module ? if yes , the problem is that if A is not sup to B , it produces a 0, it means as soon as you release the sep-panel.
yup but if after that you put a "pass" module, the value 1 only will pass, not 0.
either pannel mouse dwn - from 0 to 1 - pass event flow. (the input "in"of pass is either mouse dwn or constant 1 value, the "pass"input is "from 0 to 1")
or pannel mouse dwn - A>B - pass event flow.
so if you put a fader/sw after that, it will only be updated when the pannel is "enabled", the 0 value of mouse dwn will be ignored.
....so if the first switch "visible or not" is folowed by a "passonly if chg" event it should control the visibility,
and if the second switch/panel change, it will update only to go from 0 to 1, if 1 and go to zero the value won't pass... so it won't self disapear if im not wrong.
hope it's clear , or ill try to post a pic.
either pannel mouse dwn - from 0 to 1 - pass event flow. (the input "in"of pass is either mouse dwn or constant 1 value, the "pass"input is "from 0 to 1")
or pannel mouse dwn - A>B - pass event flow.
so if you put a fader/sw after that, it will only be updated when the pannel is "enabled", the 0 value of mouse dwn will be ignored.
....so if the first switch "visible or not" is folowed by a "passonly if chg" event it should control the visibility,
and if the second switch/panel change, it will update only to go from 0 to 1, if 1 and go to zero the value won't pass... so it won't self disapear if im not wrong.
hope it's clear , or ill try to post a pic.
I knew it wouldn't take a lot of modules:

..but that don't mean that it was easy to find this way of doing it!

..but that don't mean that it was easy to find this way of doing it!
Bjørn S
he very nice bsork even simpler, I really need to loose my bad habits and not forget the multivar!
great ! maybe a good candidate for the wiki / how to...?
I see if I can put something in the Wiki within a week or so (unless someone chimes in). I have a bit of bad conscience for not adding anything to it yet - about time I did I guess... Maybe the Tips'n'Tricks for scripts that I have had in the back of my head for ages (long before the Wiki appeared on the site) too.
@23fx23: I agree about the multivar module. I can't remember right now what it was, but that very same module also did the trick a while ago with a similar problem. This time I too tried different ways of using Pass/Stop/Not/Xor and whatnot without success before I found the solution.
@23fx23: I agree about the multivar module. I can't remember right now what it was, but that very same module also did the trick a while ago with a similar problem. This time I too tried different ways of using Pass/Stop/Not/Xor and whatnot without success before I found the solution.
Bjørn S
+1 for the wiki!
Olivier Sens
www.brainmodular.com
www.brainmodular.com
-
woodslanding
- Member
- Posts: 1327
- Contact:
thanks bsork!!
and thanks to all for contributing to the discussion!
-e
and thanks to all for contributing to the discussion!
-e
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
-
woodslanding
- Member
- Posts: 1327
- Contact:
okay, this is almost perfect. But, I want the switch to still have an effect when it's on--just not the effect of turning itself off!! or to be more precise:
I'd like it to turn off and then be turned back on again.
I'll see if I can get there from here.....
I'd like it to turn off and then be turned back on again.
I'll see if I can get there from here.....
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
If you want it be turned off for a split second sending 0 followed by a 1 almost like a button in reverse, what about inserting a WaitOne somewhere?
Bjørn S
-
woodslanding
- Member
- Posts: 1327
- Contact:
I've been trying that.... but event driven programming drives me batty!
Actually, maybe I'll try scripting something....
Actually, maybe I'll try scripting something....
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
-
woodslanding
- Member
- Posts: 1327
- Contact:
Hey, I got it working. Maybe not the minimum number of modules, but it does work.
If someone can explain how to upload it, I'll put up a screenshot. Or maybe I can figure out how to put it in the library.....
thanks!
-e
If someone can explain how to upload it, I'll put up a screenshot. Or maybe I can figure out how to put it in the library.....
thanks!
-e
Custom Ryzen 5900x MATX build, Win10, Fireface UFX, touchscreen
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Custom 2 manual midi keyboard
Usine, Kontakt, Reaktor, Synthmaster, Byome, Arturia, Soundtoys, Unify
Who is online
Users browsing this forum: No registered users and 11 guests
