Before being asked "what are you trying to acheive" it's simply a slider to select central frequency for eq
param_multiply 8000 & debug ->> 0..8000 OK
param_add 2500 & debug --> 0.0..1.0 WRONG
param_multiply 8000 & param_add 2500 & debug --> 0..8000 WRONG
param_add "param_multiply 8000" 2500 & debug --> 2500 WRONG
param_add 2500 "param_multiply 8000" & debug --> 2500 WRONG
param_add "`param_multiply 8000`" 2500 & debug --> 2500 WRONG
of course a "specific workaround exists here" : param_add 0.3125 & param_multiply 8000 & debug
but slider will never get updated
set n & param_add 0.3125 & param_multiply 8000 & debug & get_var n & debug ----> 2500..10500 WRONG
set n & get_text `param_add 0.3125 & param_multiply 8000 & param_cast int & setting equalizerHighFrequency & get_var n` --> WRONG updates ok VALUE NOT SET
not working (wrong value):
param_multiply 8000 & param_add 2500 & param_cast int & setting equalizerHighFrequency
workaround not really working (no slider update, but value is correct)
param_add 0.3125 & param_multiply 8000 & param_cast int & setting equalizerHighFrequency
Foolish try that do not help
debug & param_cast absolute& param_add 0.3125 && param_multiply 8000 && debug && param_cast int && setting equalizerHighFrequency && param_multiply 0.000125 && param_add -0.3125 && debug
FINALLY THE TOTALLY MAD WAY TO GET IT WORK (its not global workaround totally broken with relative values, param_add bug is worked around too) :
nothing & true ? param_add 0.3125 && param_multiply 8000 && param_cast int && setting equalizerHighFrequency : nothing
param_multiply 8000 & debug ->> 0..8000 OK
param_add 2500 & debug --> 0.0..1.0 WRONG
param_multiply 8000 & param_add 2500 & debug --> 0..8000 WRONG
param_add "param_multiply 8000" 2500 & debug --> 2500 WRONG
param_add 2500 "param_multiply 8000" & debug --> 2500 WRONG
param_add "`param_multiply 8000`" 2500 & debug --> 2500 WRONG
of course a "specific workaround exists here" : param_add 0.3125 & param_multiply 8000 & debug
but slider will never get updated
set n & param_add 0.3125 & param_multiply 8000 & debug & get_var n & debug ----> 2500..10500 WRONG
set n & get_text `param_add 0.3125 & param_multiply 8000 & param_cast int & setting equalizerHighFrequency & get_var n` --> WRONG updates ok VALUE NOT SET
not working (wrong value):
param_multiply 8000 & param_add 2500 & param_cast int & setting equalizerHighFrequency
workaround not really working (no slider update, but value is correct)
param_add 0.3125 & param_multiply 8000 & param_cast int & setting equalizerHighFrequency
Foolish try that do not help
debug & param_cast absolute& param_add 0.3125 && param_multiply 8000 && debug && param_cast int && setting equalizerHighFrequency && param_multiply 0.000125 && param_add -0.3125 && debug
FINALLY THE TOTALLY MAD WAY TO GET IT WORK (its not global workaround totally broken with relative values, param_add bug is worked around too) :
nothing & true ? param_add 0.3125 && param_multiply 8000 && param_cast int && setting equalizerHighFrequency : nothing
Posted Fri 24 Jul 20 @ 12:10 pm
Isn't it enough to make sure the value to param_add is also float?
param_add 2500.0
param_add 2500.0
Posted Fri 24 Jul 20 @ 12:22 pm
Yes it' far better... that fixes the param_add problem (strange add needs cast when multiply don't but it somehow works)
in a button (no param) thus "no param" == -0.3125
param_multiply 8000 & param_add 2500.00 & debug --> 2499.69
in a slider it's ok (with absolute values)
with relative values it's not:
down ==> 2250.00(relative)
up --> 2750.00(relative)
this does not fix the slider update issue and verbs parameters not being usable though
in a button (no param) thus "no param" == -0.3125
param_multiply 8000 & param_add 2500.00 & debug --> 2499.69
in a slider it's ok (with absolute values)
with relative values it's not:
down ==> 2250.00(relative)
up --> 2750.00(relative)
this does not fix the slider update issue and verbs parameters not being usable though
Posted Fri 24 Jul 20 @ 12:42 pm
Will fix param_add being too picky about types, as well as 'setting' so that the cast to int is no longer necessary.
That way you will simply be able to use
param_multiply 8000 & param_add 2500 & setting equalizerHighFrequency
Which will also work correctly the other way (so slider will update when you change equalizerHighFrequency)
That way you will simply be able to use
param_multiply 8000 & param_add 2500 & setting equalizerHighFrequency
Which will also work correctly the other way (so slider will update when you change equalizerHighFrequency)
Posted Fri 24 Jul 20 @ 12:58 pm
thanks ;)
Posted Fri 24 Jul 20 @ 1:04 pm