Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Custom Button for phrase_sync ?
My Custom Button:

deck 1 play ? deck 2 select & goto_cue 2 & loop & play_sync & phrase_sync 16 : deck 2 play ? deck 1 select & goto_cue 2 & loop & play_sync & phrase_sync 16

I want to apply this command sequence alternately to Player 1 and Player 2,
but something is wrong. Could it be that something is missing in the query?
If the command is executed with Player 1, the custom button is no longer active.
If I execute the command with Player 2, the custom button remains active (blue), so the command sequence is not completely processed.
 

Posted 2 days ago @ 3:35 pm
Most likely the issue is that you query whether a deck is playing, but you don't query if it's active.

Try this:
deck 1 select ? deck 1 play ? deck 2 select & goto_cue 2 & loop & play_sync & phrase_sync 16 : nothing : deck 2 select ? deck 2 play ? deck 1 select & goto_cue 2 & loop & play_sync & phrase_sync 16 : nothing
 

Hi Phantomdeejay,
thank you for the help, but unfortunately it doesn't work!
The error must be in the query sequence, can you briefly explain to me how these are constructed?

for example: If 1 yes then 2 if 1 no then ?? (and so on)
 

Structure is simple:

question ? this when true : that when false & a second thing as well when false

Of course you can nest questions:
question 1 ? question 2 ? this (both questions are true) : that (question 1 is true but 2 is false) : another thing (both questions are false)
If you're paying attention, in this example we miss one case (question 1 is false but question 2 is true)
Let's fix this:
question 1 ? question 2 ? this (both questions are true) : that (question 1 is true but 2 is false) : question 2 ? another thing (question 1 is false but question 2 is true) : final thing (both questions are false)

In the same way you can combine actions by using &
question 1 ? this & that : another thing & final thing

Finally, what you DON'T want to do (unless you're very carefull on your syntax and what you're doing) is to combine questions (queries) with & instead of nesting them
question ? this : that & question 2 ? another : final
This script most likely will work as intended, but this one ?
question ? this & question 2 ? that : another : final
Most likely not!
 

Hi Phantomdeejay, thanks for the info. I am testing