Forum: General Discussion
If you need extended support, contact our Support Team.
Forum Guidelines (*) The moderators hold the rights to move or modify posts in order to keep the discussions clear or to facilitate the search.
Shift Function Query
Topic: Shift Function Query - Page: 1
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....
Posted Sat 16 Jun 18 @ 11:19 am
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).
Posted Sat 16 Jun 18 @ 6:54 pm
Posted Sat 16 Jun 18 @ 7:18 pm
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
Posted Sun 17 Jun 18 @ 4:18 am
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...
Posted Sun 17 Jun 18 @ 4:56 am
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 :-)]
Posted Sun 17 Jun 18 @ 5:08 am
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....
Posted Sun 17 Jun 18 @ 5:18 am
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!
Posted Sun 17 Jun 18 @ 6:14 am
Posted Sun 17 Jun 18 @ 6:28 am
"try the new unit"
Posted Sun 17 Jun 18 @ 9:26 am
Posted Tue 19 Jun 18 @ 4:59 am
Posted Tue 19 Jun 18 @ 5:16 am
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.
Posted Tue 19 Jun 18 @ 6:16 am
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?
Posted Tue 19 Jun 18 @ 6:21 am
Posted Tue 19 Jun 18 @ 6:24 am
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? :-) :-)
Posted Tue 19 Jun 18 @ 6:26 am
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?
Posted Tue 19 Jun 18 @ 6:27 am
I don't really understand why that would be useful, but yes, that can't be done with the shift action.
Posted Tue 19 Jun 18 @ 7:01 am
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.
Posted Wed 20 Jun 18 @ 5:22 am
Posted Wed 20 Jun 18 @ 6:39 am