Connexion rapide:  

Forum: VirtualDJ Skins

Sujet light up button when value is higher or lower than 50%

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

I seem to be asking impossible things lately (http://www.virtualdj.com/forums/218106/VirtualDJ_Skins/slider_and_fade_special_configuration.html) so why break with tradition ;)

How can I get a button to light up if the value is inferior to 50%?
I have a plus and a minus button for hi, mid, and lo eq and want to indicate by the button light if I'm above or below 50% (= 0)...
This doesn't work:
<button action="eq_high -5%" query="eq_high < 50%">
<button action="eq_high +5%" query="eq_high > 50%">
Nor does:
<button action="eq_high -5%" query="param_smaller 50%">
<button action="eq_high +5%" query="param_bigger 50%">
Nor does:
<button action="eq_high -5%" query="var_smaller 'eq_high' 50%">
<button action="eq_high +5%" query="var_greater 'eq_high' 50%">

Anyone know how to achieve this?
 

Posté Mon 05 Jun 17 @ 5:39 pm
I'm a little rusty on code but does this work:

<button action="eq_high 50% ? on & eq_high -5% : off & eq_high -5%">
<button action="eq_high 50% ? on & eq_high +5% : off & eq_high +5%">
 

Posté Mon 05 Jun 17 @ 7:54 pm
Thanks Dan, but that'll only light up when it's exactly at 50%...
 

Posté Mon 05 Jun 17 @ 8:39 pm

<button action="eq_high 50% ? off & eq_high -5% : on & eq_high -5%">
<button action="eq_high 50% ? off & eq_high +5% : on & eq_high +5%">

Just reverse the on/off then, as above.
 

Posté Mon 05 Jun 17 @ 8:48 pm
The problem is the interval. It's supposed to light up from 0-50%, not only at 50%...
 

Posté Mon 05 Jun 17 @ 8:52 pm
query="param_bigger 50% eq_high"
or
query="param_bigger eq_high 50%"
or
query="param_smaller 50% eq_high"
or
query="param_smaller eq_high 50%"
or
query="param_bigger 0.5 eq_high"
or
query="param_bigger eq_high 0.5"
or
query="param_smaller 0.5 eq_high"
or
query="param_smaller eq_high 0.5"

ALL the above queries should work.
Of course, half of them will provide the opposite result from what you ask (they will turn the led on when EQ is lower than 50%)
I just put them here as a demonstration of the possible syntax ways
 

Posté Tue 06 Jun 17 @ 8:21 am
 

Posté Tue 06 Jun 17 @ 8:51 am


(Les anciens sujets et forums sont automatiquement fermés)