Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Script help: Phrase sync LED

Questo argomento è obsoleto e potrebbe contenere informazioni obsolete o errate.

How would one have an LED light when 2 tracks are phrase sync-ed?

is_sync in wiki is:

and
 is_sync 16 ? on : off 

The above, lights the LED when ever the 2 tracks are in sync, even when they are NOT phrase sync-ed.


AND
 phrase_sync 16 ? on : off 

Above line, does not work at all.

Is there a way to have an LED light when 2 tracks are phrase sync-ed?

seems there should be a way to test if 2 tracks are phrase sync-ed.

Need Help !

* I realize, phase sync is not same as phrase sync.
 

Inviato Fri 12 Feb 21 @ 3:17 am
you found a bugs or thing i can't figure out : there are issues with get_phrase_num
and is_sync seems not to work anymore (always on when bpm match)

deck left get_phrase_num & param_cast & debug
int : n
deck right get_phrase_num & param_cast & debug
int : n
deck left get_phrase_num & param_cast & debug & deck right get_phrase_num & param_cast & debug
bool : 0
int : n
deck left get_phrase_num & param_cast int & debug & deck right get_phrase_num int & param_cast & debug
int : 0 (the boolean is cast)
int : n
once again the result status of previous action (not the returned value) is taken as a parameter

using param_equal with them does not work

what is working is
deck left get_phrase_num & param_equal "deck right get_phrase_num"
* can be near one bar diff
 

param_equal `deck 1 get_beat_bar 16` `deck 2 get_beat_bar 16` ? on : off

there are less precise ways too, allowing for ~there abouts sync'd
 

param_equal `deck left get_beat_num 16` `deck right get_beat_num 16` && is_sync

works fine for me.
You can change the 16 to the number of beats you want to sync to.

param_equal `deck left get_phrase_num` `deck right get_phrase_num`
works fine too, but this only looks at the phrase, not the beat within each bar, so is not accurate enough.

is_sync works correctly for me. When one of the songs is not playing it will indeed be bpm-based only, but if both songs are playing it only returns true when the phase is in sync.
 

That's the point with parameters that works,
without parameter the parameter is taken from SUCCESS
if looks like many functions now return "no_param" or false/true by default and needs to cast the return result in a way to become usable (important to know, because some scripts have to be fixed)

I notice you are using backquote with param_equal (that used to need quotes only) to make it work
this prevent it to be used as the name of a pad / button
deck left get_phrase_num && param_equal "deck right get_phrase_num" && is_sync
can be used as name of a pad / button
there is no other benefice to use one or the other though
 

Thank you for the quick replies and all the amazing solutions.

Everyone at VDJ ROCKs !!

Thanks again
 



(Vecchi argomenti e forum sono automaticamente chiusi)