Ingreso rápido:  

Forum: VirtualDJ Technical Support

Tema: Script help: Phrase sync LED

Este tópico es antiguo y puede contener información incorrecta para la nueva versión.

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.
 

Mensajes Fri 12 Feb 21 @ 3:17 am
NicotuxHome userMember since 2014
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
 

Mensajes Fri 12 Feb 21 @ 4:56 am
locoDogPRO InfinityModeratorMember since 2013
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
 

Mensajes Fri 12 Feb 21 @ 5:08 am
AdionPRO InfinityCTOMember since 2006
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.
 

Mensajes Fri 12 Feb 21 @ 5:15 am
NicotuxHome userMember since 2014
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
 

Mensajes Fri 12 Feb 21 @ 5:56 am
Thank you for the quick replies and all the amazing solutions.

Everyone at VDJ ROCKs !!

Thanks again
 

Mensajes Fri 12 Feb 21 @ 7:41 am


(Los tópicos y foros antiguos son automáticamente cerrados)