Ingreso rápido:  

Forum: General Discussion

Tema: Shift Function Query - Page: 1

Esta parte del tópico es antigua y puede contener información incorrecta para la nueva versión.

RanikiPRO InfinityMember since 2018
Hi Y'all,

I've got a 'shift' function query that started out on Locodogs 'Scrip school' thread but I've ported over into it's own thread to save bandwidth on the original one...

Basically I used to script the shift button with some variation of:
set '$shift' 1 while_pressed & set 'shift' 1 while_pressed
This allowed me to either set other mapping to be global (i.e. it didn't matter which shift key was pressed) or deck specific when mapping a shift function to any other control.

Using the new 'shift' command for the shift key and then mapping another key (lets say 'shift_cue') seems to produce only a deck specific result.... Is there any way of using the new 'shift' command to produce global results (or choose between global/deck specific results)? I have found that reverting to the old way of mapping (ie mapping the the Shift button as before and then ignoring the shift_'button' key in the mapping window) still works as before....

Many thanks for any pointers on this....

 

Mensajes Sat 16 Jun 18 @ 11:19 am
From the script wiki:
http://www.virtualdj.com/wiki/VDJ8script.html

VDJscript can store states or numbers in internal variables.

  • Global :
    If the name of the variable starts with a $ (like "set $myvar"), the variable will be 'global' to both decks.
  • Local :
    If the name of the variable starts with a % (like "set %myvar") or with nothing (like "set 'myvar'"), the variable will be 'local' to this deck (and can have a different value if used on the other deck).
  • Persistent Global :
    If the name of the variable starts with @$ (like "set @$myvar"), the variable will be 'global' to both decks and its value will be saved across sessions
  • Persistent Local :
    If the name of the variable starts with @% (like "set @%myvar") or with just @ (like "set '@myvar'"), the variable will be 'local' to this deck (and can have a different value if used on the other deck) and their values will be saved across sessions

All type of variables are persistent during the whole time VirtualDJ is running (they are not local to a specific controller or skin).
 

Mensajes Sat 16 Jun 18 @ 6:54 pm
locoDogPRO InfinityModeratorMember since 2013
Interesting, I'll have to run some tests myself.
 

Mensajes Sat 16 Jun 18 @ 7:18 pm
locoDogPRO InfinityModeratorMember since 2013
I'd try ammending your shift mapping to this

key: shift Mapping: shift & set 'shift' 1 while_pressed.

I'd then change a shift+button combo to
Key: shift_cue Mapping: var 'shift' ? local action : global action
 

Mensajes Sun 17 Jun 18 @ 4:18 am
RanikiPRO InfinityMember since 2018
Hi Locodog,

Thanks for the response. I had tried something like you suggested - but maybe got the scripting wrong..... :-)

I'll have another go and let you know how I get on...
 

Mensajes Sun 17 Jun 18 @ 4:56 am
RanikiPRO InfinityMember since 2018
Hi Locodog,

Had another go setting the shift button to both local and global variable:
shift & set '($)shift' 1 while_pressed

And then the shift+button combo using both variations:
var '($)shift' ? Local/Global action : Global/Local action

...and it doesn't work - only seems to give a local result [Scratches Head :-)]
 

Mensajes Sun 17 Jun 18 @ 5:08 am
RanikiPRO InfinityMember since 2018
A bit more playing about with script....

Using the 'Shift' function with two controllers the shift is seems to be not only deck specific but also controller specific, whereas using the old-skool mapping of "set '$shift' 1 while_pressed" makes it global across both decks and controllers....
 

Mensajes Sun 17 Jun 18 @ 5:18 am
locoDogPRO InfinityModeratorMember since 2013
Might have to stick with the old skool,
I'll have another test when ive got some hw in front of me

Although with the cross controllers variable (if you use 2 variable names) could give you a 3rd layer to your buttons!
 

Mensajes Sun 17 Jun 18 @ 6:14 am
RanikiPRO InfinityMember since 2018
 

Mensajes Sun 17 Jun 18 @ 6:28 am
"what we doing next?"
"try the new unit"
...
;o))))
 

Mensajes Sun 17 Jun 18 @ 9:26 am
RanikiPRO InfinityMember since 2018
Just wondering whether any of the Atomix Wizards can confirm whether the built-in 'shift' variable is indeed controller and deck specific and whether there is anything that can be done about this when mapping other than to revert to the 'old skool' scripting?

Cheers
 

Mensajes Tue 19 Jun 18 @ 4:59 am
AdionPRO InfinityCTOMember since 2006
What are you trying to do specifically? You want to use the shift key on the left with another key on the right?
 

Mensajes Tue 19 Jun 18 @ 5:16 am
Shift action was meant to be local (per deck) for controllers.However on a controller definition you can instruct elements to have a 'global' shift (or, in order to be precise, to shift their function if 'shift' is true on ANY deck)

Generally speaking, with controllers deck elements use local (deck) shift, and mixer elements use global (any deck) shift.
Also for any controller we supported after VirtualDJ 8.1 release the shift should work for all controllers as described above.
The only case that shift won't get shared between multiple controllers is if one controller is using the old way and another the new one.
 

Mensajes Tue 19 Jun 18 @ 6:16 am
RanikiPRO InfinityMember since 2018
Hi Adion,
I'm just wanting to be able to map the shift function of a control to be activated with any shift button being pressed.

So for example let's say I've mapped the cue button to activate 'smart_cue' if shift is pressed, and I am wanting to use this on the left deck... I want this to be activated if the shift button on the right deck is pressed (or indeed another controller) rather than just if the left deck shift button is pressed. In other words,as I understand it, for the shift function to be global.

I hope that this make sense?
 

Mensajes Tue 19 Jun 18 @ 6:21 am
AdionPRO InfinityCTOMember since 2006
I think mapping your shift button to 'deck all shift' should work.
 

Mensajes Tue 19 Jun 18 @ 6:24 am
RanikiPRO InfinityMember since 2018
Thanks Phantom,

Does that mean that it was me doing something odd by scripting the 'shift' button with:
set '$shift' 1 while_pressed & set 'shift' 1 while_pressed
so that I could map individual controls to either be deck specific or global with the shift button? :-) :-)
 

Mensajes Tue 19 Jun 18 @ 6:26 am
RanikiPRO InfinityMember since 2018
Thanks Adion,

I'll give that a go when I can get to my gear and let you know how I get on..... presumably though this would mean that it was now always global rather than being able to decide on a case by case basis whether one wanted it deck specific or global as was possible with the old scripting?
 

Mensajes Tue 19 Jun 18 @ 6:27 am
AdionPRO InfinityCTOMember since 2006
So you want some buttons to only act as shift when shift on the same side is pressed, and some buttons to act as shift whichever side shift is pressed?

I don't really understand why that would be useful, but yes, that can't be done with the shift action.
 

Mensajes Tue 19 Jun 18 @ 7:01 am
RanikiPRO InfinityMember since 2018
Yes, that's what I'm after Adion. Probably only some personal workflow weirdness that makes it useful! :-)

Basically I prefer the shift to be global, with some occasional exceptions to make sure that I don't inadvertently make a mess of things! Belt and braces...

But it sounds like with the built in shift variable that is not possible and it needs to be either one or the other.... I can live with that - or can revert to the old style scripting if I need to.

Thanks for your help.
 

Mensajes Wed 20 Jun 18 @ 5:22 am
RanikiPRO InfinityMember since 2018
Just tried 'deck all shift' and that doesn't seem to make any difference.... which presumably means that the built in shift variable is always deck specific?
 

Mensajes Wed 20 Jun 18 @ 6:39 am
91%