Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Script help: load songs in stems_split mode w ONSONGLOAD
Wish to have a script that could be added to the KeyBoard: ONSONGLOAD mapping to automatically load the track in stems_split mode.

It appears that one needs to be careful, since the process of creating the "split stem" on the lower deck is also a seen as another Song Load.. so easy to create in infinite loop, or unsplit the track w the second song-load.

scripts that have no joy, are: (just attempting half the script for deck 1)

wait 2000ms & stems_split
deck 1 load_pulse ? nothing : deck 1 stems_split
deck 1 ? deck 1 stems_split : nothing
action_deck 1 ? deck 1 stems_split : nothing
deck 1 loaded ? wait 2000ms & deck 1 stems_split : nothing
deck 1 stems_split ? nothing : deck 1 stems_split
.
.
etc

maybe use load_pulse to toggle a variable, wait.. then do the stems_split ? Need some help.

the trick is to allow the initial song-load to initiate the stems_split.... and then to stop the loading of the "split" from repeating the same action.
And trying hard NOT to HANG VDJ.

Any help, suggestions appreciated :)

is this possible?
am I overlooking maybe a built in feature that would do this?


Thanks for the help :)


 

geposted Sun 13 Aug 23 @ 2:53 pm
locoDogPRO InfinityModeratorMember since 2013
why not query the deck

param_bigger `get_deck` 3 ? nothing : do the thing
 

geposted Sun 13 Aug 23 @ 2:59 pm
Awesome idea locodog.. a much better way to approach the scripting.. many thanks for your amazing insight.

for some reason param_bigger `get_deck` 3 ? nothing : deck 1 stems_split did not work as expected and would hang VDJ if a track was loaded to deck 3.

and seems with your approach.. that something like:
param_equal `get_deck` 1 ? wait 1000ms & deck 1 stems_split : nothing
works for deck 1..

so seems it may be possible after all, woot !
making progress !

Again many thanks !

 

geposted Sun 13 Aug 23 @ 3:37 pm
AdionPRO InfinityCTOMember since 2006
param_bigger with 3 would only be true for deck 4, so probably want to check bigger than 2
 

geposted Sun 13 Aug 23 @ 3:51 pm
locoDogPRO InfinityModeratorMember since 2013
my mistake,
I'm getting weirdness that it needs a wait in there, without the wait my variable toggles but I don't get a clone

param_bigger `get_deck` 3 ? wait 100ms & stems_split & toggle $proof :
 

geposted Sun 13 Aug 23 @ 4:10 pm
Thanks Adion .. have not tried that.

And thanks Locodog for the amazing idea !


Have got a script now that works, posting in case it's of interest to others:

var '$LoadSplitStems' 1 ? param_equal `get_deck` 1 ? wait 500ms & deck 1 stems_split : param_equal `get_deck` 2 ? wait 500ms & deck 2 stems_split : nothing : nothing

the above script would be added to the keyboard ONSONGLOAD mapping.

and one would need an additional custom button/skin button/controller button with script:
toggle '$LoadSplitStems'

which just turns ON or OFF the "Split Stems auto-loading" feature.

Additional behavior:
If one adds a track to the lower decks (3 or 4) then the split stems mode ends for the track on the upper deck, so a lower deck track can be played if wanted.
(and loading a track to upper deck, say deck 1, a playing track on deck 3 is NOT interrupted with a split stems load attempt, so the stems_split for deck 1 will NOT occur if deck 3 is audible, and playing another track, [when this feature is enabled].)
All seems to work well.



------------
Note: if using a controller button, then great to have LED feedback if the feature is enabled, w something like this for the LED Mapping:
var '$LoadSplitStems' 1 ? on : off 

or
var '$LoadSplitStems' 1 ? blink : off


 

geposted Sun 13 Aug 23 @ 4:22 pm
locoDogPRO InfinityModeratorMember since 2013
why deck specific?

var '$LoadSplitStems' 1 ? param_bigger `get_deck` 3 ? wait 1ms & stems_split : nothing : nothing

is 3 bigger than calling deck ? yes, split it
 

geposted Sun 13 Aug 23 @ 4:38 pm
Wow Locodog .. once again... a clever script..

yes that would work perfectly and, with fewer queries..

Thanks :)


PS
did not test the minimum wait time for script to work.. .. wow 1ms, is all that is required.

Again thanks.

 

geposted Sun 13 Aug 23 @ 5:01 pm