Anmelden:     


Forum: VirtualDJ Technical Support

Topic: Reverse Help
so I’m working on some Reverse Play scripts and have 1 Question:
First, this is my script:
reverse 4 & wait 4bt & reverse off

Basically, when the cue is reached, I want the deck to reverse for 4 beats, and then play forward normally from there. But of course, I’m now 4 beats BEFORE this cue and when the deck plays in forward again, I hit the cue again and the whole thing just keeps going...

Am I thinking of this all wrong? Do I need to establish a loop, and then play it backwards, and then exit the loop? But just thinking I’m going to run into the same problem once the deck starts playing forward before the cue in questions. I’m assuming there is an easy way to exit this script after it activates once… but don’t see how…..

Any help is appreciated….
 

geposted Sat 15 Mar 25 @ 9:28 pm
var doOnce 0 ? set doOnce 1 & reverse & wait 4bt & reverse off : set doOnce 0
 

Super. and THANKS

Sooooo is the “do once” part applicable to other scenarios as well? No doubt I’m going to run into sequences that get “looped” not in purpose… so guess I’m hoping that end part will help when those situations arise… ???
 

naturally the cue will be hit and because the variable is zero, it will do the backwards thing and it will change the variable to one,
next time the cue is hit after the reverse thing is done, the variable will be one so the only thing that will happen is the variable is set back to zero and playback continues.
So it cleans up after itself. You can use the same variable later on and know it will be zero.

doOnce isn't anything special, it's just a variable name, it could be any name.
 

Thanks.

I’m not at all a script person, but given pieces and parts, I can kind of glean whats happening and make changes to suite my needs. I can’t thank you enough for taking the time to help with this. I do always read the documentation…. but most of the time I can’t figure it out from there.

THANKS!