Sign In:     


Forum: VirtualDJ Technical Support

Topic: software and hardware pad not matching up
Hi. I've written a script to activate/deactive a cue jump mode. Uniquely among *all* the scripts I've ever written, it behaves differently when activated with a hardware controller pad vs pressing the corresponding pad area on screen/in software. This mismatch in expected behavior occurs regardless of which pad or button its assigned to. I kind of feel like I'm losing my mind and must have forgotten something incredibly obvious.

Here's the script:
has_cue 102 ? toggle '@%cueaction20' : has_cue 101 ? set_cue 102 & cue_name 102 'Target 1' : set_cue 101 & cue_name 101 'Jump 1' & cue_action 101 `var_equal '@%cueaction20' 1 ? goto_cue 102 : nothing`

Anyone have any idea why this, and ONLY this, script would behave differently?

And the color script (in case it's relevant):
var_equal '@%cueaction20' 1 ? blink 250ms ? color 100% "red" : color 10% "red"
 

Posted 10 hours ago
Ps the controller is a NI Kontrol S8
 

Please escape the action to be recorded properly and try again.

Assuming that I understand what you want to do properly, you need to use this:

has_cue 102 ? toggle '@%cueaction20' : has_cue 101 ? set_cue 102 & cue_name 102 'Target 1' : set_cue 101 & cue_name 101 'Jump 1' & cue_action 101 "var_equal '@%cueaction20' 1 ? goto_cue 102 : nothing"
 

Thanks, I used the revised script you provided but the issue hasn't changed.

For context, the software pad behavior is as expected. The physical controller pad will add the cues as desired, and successfully store the macro in cue 101 but it does not actually toggle the state of the var once those preconditions are in place. It does activate/deactivate the color script accurately though.

I can, however, set up the preconditions of the script using the hardware pad (creating the cues and storing the cue macro), then successfully toggle the var with the software pad.
 

Not that it really matters, but can you try removing the % from your variable ? like @cueaction20
The variable will still be persistent local.
 

I would but it's a variable from the skin I use (Dennyo's project control), not one I made, and I'd have to edit the xml 275 times.
 

You can do it as a test at least. To check if that's the issue or not (and then we can fix)
 

Well that did it! I was hesitant to edit the xml for fear of messing it up but I'm glad you insisted. Thanks!
...Any idea *why* that would make a difference in this case?

I'm also curious why, despite doing a 'find and replace all' edit of the skin xml there is still an on-screen indicator of the state of the variable that now does not respond to changes in the underlying var. I can definitely live with it, just curious what would be controlling that if not the skin xml.