Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Make a custom slider work when setting a variable

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

NicotuxHome userMember since 2014
setting a variable in range 0..1 with a custom slider updating its position both in absolute and relative is a real pain

set v & param_not_equal 'get_var v' ? : param_smaller 0.03125 ? var_smaller v 0.03125 ? set v 0 : set v : var_greater v 1 ? set v 1 : set v

Equivalent older version (obsolete for near 2 years) :
set v
 

geposted Mon 07 Sep 20 @ 2:36 pm
NicotuxHome userMember since 2014
Oups!!
missing the most important action in the script

Really working version is :
set v & nothing & param_equal 'get_var v' ? : param_smaller 0.03125 ? var_smaller v 0.03125 ? set v 0 : set v : var_greater v 1 ? set v 1 : set v
 

geposted Mon 07 Sep 20 @ 2:51 pm
AdionPRO InfinityCTOMember since 2006
set v works fine for me on a custom slider, but not sure what you mean by setting it relative.
 

geposted Mon 07 Sep 20 @ 3:59 pm
NicotuxHome userMember since 2014
I know for years now you don't figure out this ;)
I only explain simply :

mouse : scroll the mouse roller
touch screen : slide (not all may depend on movment settings)
infinite roller : turn the button (i.e. Some keyboards "Volume" infinite key)

they all pass +/-<value>(relative) as parameter; <value> mostly +/-0.3125 or +/-0.625 depending on speed

var value goes out of bounds [ 0 .. 1 ] to become ] -INF ... +INF [
fader stay in range 0..1 but out of sync with the values of var

trying to use the parameter to some action kills the fader update
 

geposted Mon 07 Sep 20 @ 4:37 pm
NicotuxHome userMember since 2014
Just an idea : maybe set a "scroll" verb to handle relative values in sliders as exist for buttons would help
 

geposted Mon 07 Sep 20 @ 4:55 pm
AdionPRO InfinityCTOMember since 2006
Tried with mouse wheel, and while it isn't bound to range 0..1 (and since you can use variables for anything I don't think they should be bound to that range) it just continued negative and positive.
Not sure how you'd reach infinity that way.
 

geposted Tue 08 Sep 20 @ 4:30 am
NicotuxHome userMember since 2014
It took time because many versions of the post needed to be concise
I just end testing the 18 sliders possible slider configurations:
- 3 directions: linear, round, circle
- 2 modes: absolute and relative
- 3 actions: click move scroll
-- with frommidle the count could have been be 36 but i just note where it is buggy
It's badder than it initially seemed to be :(
I now know i am trying to use things that are.... simply not fully implemented ^^

"it just continued negative and positive": i agree, that's what it is wanted sometimes (not in this specific case)
not always though and VDJ already know that and handle some of these cases correctly (Absolute values relative to previous value)

"you can use variables for anything": yes, that would be the case! Badly current implementation prevents script to do that within sliders (true for both relative and absolute, for variables or any returned value - strangely this is possible in any buttons and other elements and was possible in sliders long time ago)

"they (the variables) shouldn't be bound to that range": yes and NO as VDJ already does
... currently depending on slider configuration they already are in bounds or not (in a random way);
sometime they are both depending on value (bug), sometime it's working as needed (with or without bounds when needed)

In fact among the 18 possible configs only 6 are REALLY FULLY OK and one can be think as ok (even it is not really because bugs do not hurt)
These 6 working slider configurations ALL are the ones used to display sliders. ALL are absolute (but one using other kind of position relative values)
None of slider configurations needed to use on screen sliders are fully ok (but all what is needed is implemented at least once)
This make sense because the way VDJ skin are mostly used is Monitoring a controller and database lookup, not touchscreen, mouse, keyboard

The only ONE usable as a on screen slider with no visible issue is the infinite roller circle knob (because the -0.0 and origin bugs do not hurt there)
never saw it in use anywhere though

I have the full result of these tests handly, with a table of what is working what is not in a grid view
 

geposted Wed 09 Sep 20 @ 1:10 am


(Alte Themen und Foren werden automatisch geschlossen)