Forum: VirtualDJ Technical Support

For reporting any bug, questions or comment related to the latest version of VirtualDJ
(NOTE: VirtualDJ continuously updated, so many older topic on this forum are most probably already fixed in the current build)

If you need extended support, contact our Support Team.
Forum Guidelines  (*) The moderators hold the rights to remove, move or modify posts.
Sujet BUG and FIX : skin definition making pads script not to work as expected
NicotuxHome userMember since 2014
trying to implement pad parameters with timer to auto increment/decrement - easy ?-

as only auto decrement is working in this script :
up ? repeat_stop 'rep' : set 'v' & repeat_start_instant 'rep' 250ms & var_greater 'v' 0 ? cycle 'byte' +256 : cycle 'byte' -256

I tested this one in parameter2
up ? repeat_stop 'rep' : set 'v' & repeat_start_instant 'rep' 250ms & var_smaller 'v' 0 ? cycle 'byte2' -256 : cycle 'byte2' +256
strangely auto decrement is working while auto increment isn't

Note I tried with while_pressed too there is no difference

maybe is a problem with loop thus i tested:
up ? repeat_stop 'rep' : set 'v' & var_greater 'v' 0 ? repeat_start_instant 'rep' 250ms & cycle 'byte' +256 : repeat_start_instant 'rep' 250ms & cycle 'byte' -256
and
up ? repeat_stop 'rep' : set 'v' & var_smaller 'v' 0 ? repeat_start_instant 'rep' 250ms & cycle 'byte2' -256 : repeat_start_instant 'rep' 250ms & cycle 'byte2' +256

with exactly the same result

i inverted the cycle values

up ? repeat_stop 'rep' : set 'v' & repeat_start_instant 'rep' 250ms & var_greater 'v' 0 ? cycle 'byte' -256 : cycle 'byte' +256
up ? repeat_stop 'rep' : set 'v' & repeat_start_instant 'rep' 250ms & var_smaller 'v' 0 ? cycle 'byte2' +256 : cycle 'byte2' -256
strangely auto decrement is not working anymore while auto increment do, of course the arrows are inverted

i tested without cycle:
up ? repeat_stop 'rep' : param_greater 0 ? repeat_start_instant 'rep' 250ms & set 'byte' `param_add "get_var 'byte'" -1` : repeat_start_instant 'rep' 250ms & set 'byte' `param_add "get_var 'byte'" +1`
and familly... the right arrow does not work while the left one does

Finally took a look at arrows definition in the skin:
there is no problem with <button class="padarrowleft" action="pad_param -1" >
but the other one <button class="padarrowright" action="pad_param +1" > doesn't work when holding

the fix is to quote the +1 in the skin:

replace every
<button class="padarrowright" action="pad_param +1" >
<pos x="+117" y="+21"/>
</button>
<button class="padarrowright" action="pad_param2 '+1'" >
<pos x="+117" y="+34"/>
</button>

with
<button class="padarrowright" action="pad_param '+1'" >
<pos x="+117" y="+21"/>
</button>
<button class="padarrowright" action="pad_param2 '+1'" >
<pos x="+117" y="+34"/>
</button>

once done all the solutions above are working fine

by the way... as the right arrow can appear alone by itself in the default skin
its define is one pixel erroneous
<define class="padarrow" >
<tooltip></tooltip>
<size width="129" height="13"/>
<over x="733" y="1693"/>
</define>

the right one would be

<define class="padarrow" >
<tooltip></tooltip>
<size width="130" height="13"/>
<over x="733" y="1693"/>
</define>


Posté Tue 11 Jun 19 @ 3:34 am
NicotuxHome userMember since 2014
the script i finally keep ...:
up ? repeat_stop 'rep' : repeat_start_instant 'rep' 250ms & param_smaller 0 ? cycle 'byte' -256 : cycle 'byte' +256

Posté Tue 11 Jun 19 @ 3:48 am
NicotuxHome userMember since 2014
About the FIX : all skin variation are affected 2, 4, 6 Decks and Tablet
and as far as i can see most of the existing Skins are affected

About the arrow showing stand alone: 4 Decks variation size differ but issue is still there, same issue same fix
<define class="padarrow" >
<tooltip></tooltip>
<size width="110" height="13"/>
<over x="1189" y="2672"/>
<down x="1189" y="2672"/>
<selected x="1189" y="2672"/>
</define>

Posté Tue 11 Jun 19 @ 6:50 am
NicotuxHome userMember since 2014
to be perfect translation needs to be fix too - for every languages

<pad_param param="+1">Increase Parameter 1</pad_param>
<pad_param param="'+1'">Increase Parameter 1</pad_param>
<pad_param2 param="+1">Increase Parameter 2</pad_param2>
<pad_param2 param="'+1'">Increase Parameter 2</pad_param2>

otherwhise tooltip will be wrong

Posté Tue 11 Jun 19 @ 7:57 am
AdionPRO InfinityCTOMember since 2006
That may fix your script, but it probably breaks most other scripts, since they may expect +1 as a value, not "+1" as a string as parameter.

The problem is more likely that the parameter gets passed to the repeat_start_instant script.
So in the case of +1, the script becomes
repeat_start_instant 250ms 1
which means the script will only execute 1 time.

You can fix this by passing -1 yourself to ensure that the script runs until it is stopped.
up ? repeat_stop 'rep' : repeat_start_instant 'rep' 250ms -1 & param_smaller 0 ? cycle 'byte' -256 : cycle 'byte' +256

Posté Tue 11 Jun 19 @ 8:44 am
NicotuxHome userMember since 2014
Ok
-1 & +1 are passed as the optional parameter to repeat_start verb
'+1' is cast to 0 numeric if used in set 'v' , and in param_smaller and in repeat_start because of its non numeric value
I'm wrong with it :/

this wanna say optional parameters in verbs are not so optional and are passed from pipe
that may explain many strange things with scripts and verbs that seems not to work in scripts boddy but are as pad or button

default 0 or -x are working here and thanks for that
if i understand correctly this is because repeat_start only have one optional numeric positif parameter
left arrow seem to work because the received value -1 was the default or act as default
many other verbs would work the same way by simply specifiing the default value when possible, fine

what about related harder to workaround things like that

one of the worth possible example:
effect_select and video_fx_select verbs
both do not act the same with or without parameters which may optionally be numeric or alpha

we may want use something like "holding ? effect_select : video_fx_select" but no way
a common workaround is to split the script
pad 1 being " holding ? pad 2 : pad 3"
with pad2 being "effect_select"
and pad 3 being "video_fx_select"

badly this time pad 1 is once more a big 'nop'
however pad 2 and pad 3 are working

is there a way ?
thanks

Posté Tue 11 Jun 19 @ 2:34 pm
AdionPRO InfinityCTOMember since 2006
You could try adding default as parameter, I think that's currently not really used, so might allow you to skip parameters.
effect_select default

Posté Tue 11 Jun 19 @ 5:08 pm