快速登录:  

Forum: General Discussion

话题: Changing a value using a variable
Hi!

I have the following command on a button:
deck left eq_mid -0.05 & deck right eq_mid +0.05

Now I would like to make the change (here by 0.05) dependent on which other button is pressed. To do this, I have assigned 3 buttons with:
set '$eqdelta' 0.05
set '$eqdelta' 0.10
set '$eqdelta' 0.20

and the following command on another button:
deck left eq_mid "get_var '$eqdelta'" &
deck right eq_mid "get_var '$eqdelta'"

Unfortunately this does not work! How can I implement the negative values?

And then a knob should not be able to be turned further than the center (=0.5).
param_greater "deck right eq_mid" ? deck right eq_mid 0.5 : nothing
unfortunately does not work either

Does anyone have an idea?
 

发表时间 Sat 25 May 24 @ 11:05 pm
locoDogPRO InfinityModeratorMember since 2013
The only param type eq_* accepts is a value [either absolute or relative, a number or a ± number] and that can be expressed as a float 0.0-1.0 or as a percent 0-100%
It does not accept an action as param.

To pass a variable you do this
to pass the value as absolute
get_var $eqDelta & param_cast & eq_mid

to pass as positive relative
get_var $eqDelta & param_cast relative & eq_mid

to pass as negative relative
get_var $eqDelta & param_multiply -1 & param_cast relative & eq_mid



Your query is incomplete, you have no value to compare against.
param_bigger 0.5 `eq_mid` ?
[is mid higher than 0.5]
 

发表时间 Sat 25 May 24 @ 11:47 pm
Hi!

Great! That works! I've been looking for it for hours! Thank you so much!
 

发表时间 Sun 26 May 24 @ 3:25 pm