Ingreso rápido:  

Forum: VirtualDJ Technical Support

Tema: Controller scripting - Page: 1

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

Is there a way to create a script so the controller pads automatically switch to the hot cue pads when a track is loaded onto a deck? I have a ddj-sx2 if that matters.

Thanks!
 

Mensajes Mon 19 Sep 16 @ 11:08 pm
locoDogPRO InfinityModeratorMember since 2013
Sure, you need a repeat start script to keep checking load pulse, something like


repeat_start_instant 'rsiPulseCheck' 190ms & load_pulse ? nothing : pad_page 'hotcues'


put this on your mapping for oninit or a button/keyboard key,

if you want this action to be switched, on and off by command just ask.
 

Mensajes Mon 19 Sep 16 @ 11:28 pm
Thank you locodog. I added this to my oninit command but unfortunately nothing is happening when i load a track to a deck. Let me know if you need clarification on what im looking for, maybe i didnt explain myself properly.

Although i would plan on leaving this on all the time, it would be good to be able to disable as well.

Thanks again!
 

Mensajes Tue 20 Sep 16 @ 12:38 am
i need code for virtual dj le
 

Mensajes Tue 20 Sep 16 @ 12:44 am
locoDogPRO InfinityModeratorMember since 2013
try this on a button then.

toggle '$pulseCheck' & var 'pulseCheck' ? repeat_start_instant 'rsiPulseCheck' 190ms & load_pulse ? nothing : pad_page 'hotcues' : repeat_stop 'rsiPulseCheck'
 

Mensajes Tue 20 Sep 16 @ 1:19 am
djdadPRO InfinityDevelopment ManagerMember since 2005
If you load tracks using the DDJ-SX2, then you can map the LOAD button as ..
from ..
var 'hwmixer' ? nothing : holding ? unload : load
to ...
var 'hwmixer' ? nothing : holding ? unload : load & pad_page 'hotcues'

If you need something similar to work even if you use mouse or keyboard (or any other controller) then you need to follow Loco's script, but keep in mind that it will only work on the "default/selected" deck.
 

Mensajes Tue 20 Sep 16 @ 1:23 am
I generally load tracks with the trackpad/mouse. I see that is working for the pad page on deck 1 (within VDJ), however I am looking for the pads on the controller to switch to the hot cue mode upon load. So if I load a track into deck 1 (left deck), I would like for the pads on the controller to switch to 'hot cues' on the left side and leave the right controls as is. Same would be true if a track is loaded on deck 2 and the right hot cue pads, leaving the left side as is. Would that be possible?

thanks
 

Mensajes Tue 20 Sep 16 @ 1:57 am
locoDogPRO InfinityModeratorMember since 2013
have you actually tried the pads, whilst the pad mode lights on the hardware will won't change the pad actions will [this is a hw limitation]

Also I believe deck select always follows the last loaded track therefore should work with no fuss.
 

Mensajes Tue 20 Sep 16 @ 2:04 am
yes, I tried the pads. It's performing the sampler's (or whatever the selected bank's) action. Is there a way to use a "set 'padmode' " command? I have that linked to the keyboard for something else, but is there a way to trigger that with a track being loaded?
 

Mensajes Tue 20 Sep 16 @ 2:24 am
locoDogPRO InfinityModeratorMember since 2013
Then your mapping isn't default,
default the padmode buttons perform a hardware shift, but all pads just call the pad.number

Try the default mapping
 

Mensajes Tue 20 Sep 16 @ 4:10 am
locodog wrote :
have you actually tried the pads, whilst the pad mode lights on the hardware will won't change the pad actions will [this is a hw limitation]


The "PAD MODE" lights WILL change when you change pad mode from the software. The only limitation is that they change only if you select one of the predefined padmodes for the SX2.

If you want to "replace" one pad page on your controller with another (so that PAD MODE leds follow as well) then all you need to do is to change the padpage name on the mapper of your device for BOTH the button, and it's associated LED.
 

Mensajes Tue 20 Sep 16 @ 7:11 am
locodog wrote :
Then your mapping isn't default


Thats correct, im using a mapper since i got the sx2 prior to it being supported by default.

I will try the default mapper and revert back, however being i have used this mapper for so long im not sure if id be willing to change for this small feature at this point.

Going back to my previous point, can this be scripted using the 'set padmode' method? I currenty have a script where when i select a keyboard shortcut for a sampler bank, the sampler pads on the sx2 become active. This would be the same theory, its just activated by loading a track rather than pressing a letter on the keyboard.

Apologize if oversimplifing this, as you can tell im not a pro with scripting.

Thanks
 

Mensajes Wed 21 Sep 16 @ 2:40 am
locoDogPRO InfinityModeratorMember since 2013
Ok start putting together what you know

toggle '$pulseCheck' & var 'pulseCheck' ? repeat_start_instant 'rsiPulseCheck' 190ms & load_pulse ? nothing : pad_page 'hotcues' : repeat_stop 'rsiPulseCheck'

the underlined bit is the action just as a track is loaded, just add to it with whatever it is to set the padmode.
 

Mensajes Wed 21 Sep 16 @ 3:29 am
djdadPRO InfinityDevelopment ManagerMember since 2005
set 'padmode' 0 is probably the action you will need in that script replacing pad_page 'hotcues'
 

Mensajes Wed 21 Sep 16 @ 10:55 am
I will give that a shot when i get home tonight. Thank you both!
 

Mensajes Wed 21 Sep 16 @ 11:17 am
Unfortunately nothing is happening when using the below script. I tested this with the default and my custom mapper, no luck. I appreciate your guys help and would be happy to try a different script, but no worries if not. This isn't a big deal, would just help as a work flow tool.


toggle '$pulseCheck' & var 'pulseCheck' ? repeat_start_instant 'rsiPulseCheck' 190ms & load_pulse ? nothing : set 'padmode' 0 : repeat_stop 'rsiPulseCheck'
 

Mensajes Thu 22 Sep 16 @ 12:48 am
djdadPRO InfinityDevelopment ManagerMember since 2005
small typo
toggle '$pulseCheck' & var '$pulseCheck' ? repeat_start_instant 'rsiPulseCheck' 190ms & load_pulse ? nothing : set 'padmode' 0 : repeat_stop 'rsiPulseCheck'

If the HOTCUE mode button on your controller is mapped as .. set 'padmode' 0, then the above should work fine.
 

Mensajes Thu 22 Sep 16 @ 1:57 am
Brilliant! That works as expected now. Thank you very much for everyone's help!
 

Mensajes Thu 22 Sep 16 @ 2:22 am
@djdad - i switched over to a new laptop. When I copy this script over to the new mapping file the script no longer works.

I literally copy and pasted it, no manual typing at all. It still works fine on my old laptop. I switched from a mac to pc, don't think that should matter but worth mentioning. Any thoughts as to why I am having issues now?
 

Mensajes Thu 01 Jun 17 @ 9:55 pm
Sometimes when I've copy/pasted a line of script from one place to another in VDJ, I've accidentally added a new line character in the end, which makes the script not work. Could that be the reason?
 

Mensajes Thu 01 Jun 17 @ 10:12 pm
95%