Hello!
I have a question about the display behavior of buttons or pads. (on/off)
I tried creating pads with these:
(browser_window 'remixes' && show_splitpanel 'sideview')
(browser_window 'automix' && show_splitpanel 'sideview')
If the remixes tab is active, then my remixes pad will be on, and the automix one will be off as expected.
Unfortunately, the action is not exactly what I wanted so I did this instead:
(browser_window 'remixes' && show_splitpanel 'sideview') ? show_splitpanel 'sideview' off : (show_splitpanel 'sideview' on & browser_window 'remixes' on)
(browser_window 'automix' && show_splitpanel 'sideview') ? show_splitpanel 'sideview' off : (show_splitpanel 'sideview' on & browser_window 'automix' on)
The action is now fine but the pad status is now reversed?? I don't undersant why and I'm running in circles trying to fix it.
Thanks in advance for your help!
I have a question about the display behavior of buttons or pads. (on/off)
I tried creating pads with these:
(browser_window 'remixes' && show_splitpanel 'sideview')
(browser_window 'automix' && show_splitpanel 'sideview')
If the remixes tab is active, then my remixes pad will be on, and the automix one will be off as expected.
Unfortunately, the action is not exactly what I wanted so I did this instead:
(browser_window 'remixes' && show_splitpanel 'sideview') ? show_splitpanel 'sideview' off : (show_splitpanel 'sideview' on & browser_window 'remixes' on)
(browser_window 'automix' && show_splitpanel 'sideview') ? show_splitpanel 'sideview' off : (show_splitpanel 'sideview' on & browser_window 'automix' on)
The action is now fine but the pad status is now reversed?? I don't undersant why and I'm running in circles trying to fix it.
Thanks in advance for your help!
Posted Mon 28 Jul 25 @ 12:06 pm
locoDog wrote :
deck 'side' will work, best practice depends on case.
Thanks!
Posted Mon 28 Jul 25 @ 12:07 pm
(browser_window 'remixes' && show_splitpanel 'sideview') ? on & show_splitpanel 'sideview' off : off & (show_splitpanel 'sideview' on & browser_window 'remixes' on)
common mistake when first dealing with button led logic, the reply to the query to turn the thing off should first tell the led to be on [because it is on], LED queries happen constantly, unlike button press triggered queries that only happen when button pressed.
Posted Mon 28 Jul 25 @ 12:34 pm
@Yan Duval:
A lot of times it's easier (and preferable) to "unlink" the led query (when the led is on) from the action of the pad.
Take a look at these examples:
A lot of times it's easier (and preferable) to "unlink" the led query (when the led is on) from the action of the pad.
Take a look at these examples:
<pad1 name="`get_effect_name 1`" color="effect_active 1 on ? var_equal 'FX1MomPush' 0 ? color 'green' : color 'blue' : color 'blue'" query="var_equal 'FX1MomPush' 0 ? effect_active 1" autodim="false">effect_active 1</pad1>
<pad5 name="^ MP" color="effect_active 1 on ? var_equal 'FX1MomPush' 1 ? color 'green' : color 'blue' : color 'blue'" query="var_equal 'FX1MomPush' 1 ? effect_active 1" autodim="false">effect_active 1 on while_pressed & set 'FX1MomPush' 1 while_pressed</pad5>
Posted Mon 28 Jul 25 @ 1:04 pm
Thank you both for your help.
I'll try these and come back to you!
I'll try these and come back to you!
Posted Mon 28 Jul 25 @ 4:15 pm
This works fine, thanks again. It brings more questions:
1- When part of a "query=...", are the actions actually performed or are they simply muted and used only as queries?
2- "A ? B" used above is the same as "A or B" if "or" was available in VDJ script?
3- Can "A ? B" used in any context without the ":" or does it sometimes need to be: "A ? B : nothing"
4- If an action is quite complex, can it be useful for performance reasons to modify a variable in the action in order to have a very simple query? I assume that if a query is available, the action stops being queried and is only performed when the button is presse?
With extras:
5- I sometimes see $myvar used without the ''. Like "set_var $myvar" instead of "set_var '$myvar'" Does it have a special meaning, or is it only that it's tolerated by VDJ in certain situations?
6- When used with a varialbe, is there any difference between "set" and "set_var".
Thanks!!
1- When part of a "query=...", are the actions actually performed or are they simply muted and used only as queries?
2- "A ? B" used above is the same as "A or B" if "or" was available in VDJ script?
3- Can "A ? B" used in any context without the ":" or does it sometimes need to be: "A ? B : nothing"
4- If an action is quite complex, can it be useful for performance reasons to modify a variable in the action in order to have a very simple query? I assume that if a query is available, the action stops being queried and is only performed when the button is presse?
With extras:
5- I sometimes see $myvar used without the ''. Like "set_var $myvar" instead of "set_var '$myvar'" Does it have a special meaning, or is it only that it's tolerated by VDJ in certain situations?
6- When used with a varialbe, is there any difference between "set" and "set_var".
Thanks!!
Posted 5 days ago @ 3:39 pm
5 tolerated, I have a topic quite recently on when " ' or ` can be omitted. Not sure if I added it to the first page index.
[I haven't yet it's a few pages back Posted Sun 20 Apr 25 @ 11:00 pm
6 Generally no difference for values, although set_var makes strings easier, example
set a 1 & set b a, both a & b will be set to 1, because that's how the set verb has worked forever, b is set to the same value as a.
set a 1 & set_var b a, a will be 1 as you'd expect but b will be set to the literal text "a"
1 LED/skin queries perform no actions they don't set variables they don't cause actions like "play" to happen, they just query
Other questions I'm not following your meaning.
[I haven't yet it's a few pages back Posted Sun 20 Apr 25 @ 11:00 pm
6 Generally no difference for values, although set_var makes strings easier, example
set a 1 & set b a, both a & b will be set to 1, because that's how the set verb has worked forever, b is set to the same value as a.
set a 1 & set_var b a, a will be 1 as you'd expect but b will be set to the literal text "a"
1 LED/skin queries perform no actions they don't set variables they don't cause actions like "play" to happen, they just query
Other questions I'm not following your meaning.
Posted 4 days ago @ 7:31 pm
Thanks for answers 1, 5 and 6.
For questions 2 and 3, I was refering to the following
I am perplexed by the fact that there is no ":" That is "A ? B" instead of "A ? B : nothing"
Question 3 can also be reformulated as: Is "A ? B" valid not only in "query" but also in "action"? Does it mean the same as "A ? B : nothing" , or "A ? B : false" ?
Question 2 answer was no, I made an error. But I guess " A or B" can be written as "A ? true : B" in vdj script. Is that right?
Question 4 was not too important.
Thanks again!
For questions 2 and 3, I was refering to the following
query="var_equal 'FX1MomPush' 0 ? effect_active 1"
I am perplexed by the fact that there is no ":" That is "A ? B" instead of "A ? B : nothing"
Question 3 can also be reformulated as: Is "A ? B" valid not only in "query" but also in "action"? Does it mean the same as "A ? B : nothing" , or "A ? B : false" ?
Question 2 answer was no, I made an error. But I guess " A or B" can be written as "A ? true : B" in vdj script. Is that right?
Question 4 was not too important.
Thanks again!
Posted 4 days ago @ 10:48 pm