登录:     


Forum: VirtualDJ Technical Support

Topic: Scripting help w ONSONGLOAD mapping
Would love to script something different if a track is loading to an upper deck vs a lower deck
(4 deck layout).

Is there a parameter/verb, that is available, that indicates which deck is to be loaded?

The logic seems to be, to load the first available NON-playing deck, and seems independent of Master deck selection being auto or manual.

One could query the play status of every deck in the ONSONGLOAD, to then attempt to guess which deck will be loaded, and then script for that deck.

Wanted to ask if there is a more elegant (and accurate) way to script differently if the track will be loaded on an upper versus a lower deck.

 

发表时间 3 hours ago
param_equal `get_deck` 1 ? 'tis deck 1 : ...etc
 

Thanks so much Locodog.

and it seems so easy now that you mention.

also realized that one can use load_pulse
was trying something like, which seems to work:

deck 4 load_pulse !? deck 4 scripts here : deck 3 load_pulse !? deck 3 scripts here : deck 1 load_pulse !? deck 1 scripts here : deck 2 load_pulse !? deck 2 scripts here : nothing

 

Could be problematic with load_pulse, sure the freshly loaded deck will be false when onsongload is called, but so will any unloaded [nothing on] deck so then it's just the matter of the order the script was written, so the results might not be what you wanted.

ONSONGLOAD when called, has an implied deck, so `get_deck` or action_deck N ? , is the way to go
 

good catch locodog :)

Oh yes !! load_pulse would also trigger, with an unload, also, would have been a disaster, lol.

I abandoned the load_pulse as soon as I saw your post.

very straight forward, (not hacking)
was concerned that wait, and repeat scripts would probably cause issues, with load_pulse.

again thanks :)
You the Best !