When I press Ctrl-B
IF the active or selected deck is currently PLAYING
If Cue 1 is set
go to Cue 1
start playing
else
go to Beginning of track
start playing
endif
ELSE (if the deck is not playing)
If Cue 1 is set
go to Cue 1
else
go to Beginning of track
endif
ENDIF
Could someone kindly help with the script? TIA
IF the active or selected deck is currently PLAYING
If Cue 1 is set
go to Cue 1
start playing
else
go to Beginning of track
start playing
endif
ELSE (if the deck is not playing)
If Cue 1 is set
go to Cue 1
else
go to Beginning of track
endif
ENDIF
Could someone kindly help with the script? TIA
geposted yesterday @ 11:12 am
The script you asked is this:
play ? has_cue 1 ? goto_cue 1 : goto_start & play : has_cue 1 ? goto_cue 1 : goto_start
You can also get away with this more simple script: has_cue 1 ? goto_cue 1 : goto 0%
That's because goto 0% doesn't change the playback state of the deck (doesn't start or stop the deck)
goto 0% is NOT exactly the same as goto_start but it should produce the exact same result at 99.999999% of the time.
play ? has_cue 1 ? goto_cue 1 : goto_start & play : has_cue 1 ? goto_cue 1 : goto_start
You can also get away with this more simple script: has_cue 1 ? goto_cue 1 : goto 0%
That's because goto 0% doesn't change the playback state of the deck (doesn't start or stop the deck)
goto 0% is NOT exactly the same as goto_start but it should produce the exact same result at 99.999999% of the time.
geposted yesterday @ 12:05 pm
Thank you so much ... This worked perfectly!!
I was using this script:
playing ? has_cue 1 ? goto_cue 1 & play : goto_first_beat & play : has_cue 1 ? goto_cue 1 : goto_first_beat
It only worked partially. Any idea why?
I have a fair knowledge of programming constructs but can't understand the script here as it's all in 1 line.
Would it be possible for you to kindly break it down & explain it to me so I can hopefully manage myself in future?
Could you also please point me towards some extensive tutorials and examples on VDJ Scripting?
TIA
I was using this script:
playing ? has_cue 1 ? goto_cue 1 & play : goto_first_beat & play : has_cue 1 ? goto_cue 1 : goto_first_beat
It only worked partially. Any idea why?
I have a fair knowledge of programming constructs but can't understand the script here as it's all in 1 line.
Would it be possible for you to kindly break it down & explain it to me so I can hopefully manage myself in future?
Could you also please point me towards some extensive tutorials and examples on VDJ Scripting?
TIA
geposted 18 hours ago
If you look at your script and the one I provided you, you should understand your errors.
Your basic syntax is correct.
However playing ? is not a valid action/query
Therefore VirtualDJ won't understand it as a query to start performing the "if then else" logic.
Other than that, goto_cue action does not change the playback state of the deck. Therefore on your first condition (if a deck is playing) you don't need to add the "play" action after it. The deck is already playing and therefore it will keep playing. The play statement won't hurt, but it's not needed.
Finally, goto_first_beat is not the same as goto_start or as goto 0%
These 3 actions exist exactly because they behave differently.
Depending on what you're after, there's no right or wrong action to use there. Just different variations/flavors.
PS:
Your entire "if true then this else that" logic / syntax IS CORRECT! Bravo!
Your basic syntax is correct.
However playing ? is not a valid action/query
Therefore VirtualDJ won't understand it as a query to start performing the "if then else" logic.
Other than that, goto_cue action does not change the playback state of the deck. Therefore on your first condition (if a deck is playing) you don't need to add the "play" action after it. The deck is already playing and therefore it will keep playing. The play statement won't hurt, but it's not needed.
Finally, goto_first_beat is not the same as goto_start or as goto 0%
These 3 actions exist exactly because they behave differently.
Depending on what you're after, there's no right or wrong action to use there. Just different variations/flavors.
PS:
Your entire "if true then this else that" logic / syntax IS CORRECT! Bravo!
geposted 17 hours ago
Thank you so much ... This greatly clarifies things.
Could you kindly point me to a repository of information where i can get all the syntax + more importantly, a good collection of working examples to get me going?
Thx! 🙏
Could you kindly point me to a repository of information where i can get all the syntax + more importantly, a good collection of working examples to get me going?
Thx! 🙏
geposted 5 hours ago
Syntax and verbs along with some basic examples : https://virtualdj.com/wiki/VDJscript.html
More advanced examples and community assistance : https://virtualdj.com/forums/223743/General_Discussion/Script_School.html
More advanced examples and community assistance : https://virtualdj.com/forums/223743/General_Discussion/Script_School.html
geposted 5 hours ago