Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: var_smaller `get_active_loop` not working?

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

Hello, I have an issue to use a simple query="" for led
I would like to get if i have a loop < 2 beat but it's not working, i don't know why

var_smaller `get_active_loop` 2 ? true : false

Thanks a lot for your help !
 

geposted Thu 09 Apr 20 @ 2:08 pm
locoDogPRO InfinityModeratorMember since 2013
that's not a var, it's a param
 

geposted Thu 09 Apr 20 @ 2:10 pm
Ok,
but I'm sorry, I don't understend how works the syntax for the verbe: "param_smaller"

with "param_equal" I have no syntax issue and it works, like this:
param_equal "`get_active_loop`" 2 ? true : false
but not with "param_smaller"

can you help me for this.
Thanks !
 

geposted Thu 09 Apr 20 @ 2:20 pm
locoDogPRO InfinityModeratorMember since 2013
param_equal could accept either a string [so goes inside " "] or a script [goes inside ` ` ] or a number [no need for either]
param_smaller only accepts a script therefore doesn't need backticks, and only need quotes if the script contains a space

param_smaller get_active_loop 2 ? true : false

written this way it's is the second thing smaller than the first thing,
written this other way
get_active_loop & param_smaller 2 ? true : false
it evalutes left to right [first thing smaller than the second]
 

geposted Thu 09 Apr 20 @ 2:37 pm
get_active_loop & param_smaller 2 ? true : false
and
param_smaller 2 get_active_loop ? true : false
works well :)

thanks a lot for your detailed reply !!!
now I understand the syntax

it's a very curious language...

You are the best !
 

geposted Thu 09 Apr 20 @ 2:44 pm
Hi, sorry i have a last little question,
what is the best way to compare float with param_smaller :)
0.5 is rounded to 1 and 0.25 is rounded to 0

I tried this:
get_active_loop & param_multiply 100 & param_smaller 100 ? true : false
but param_multiply seems to be integer too
 

geposted Thu 09 Apr 20 @ 3:38 pm
locoDogPRO InfinityModeratorMember since 2013
param_smaller get_active_loop 0.5 ? deck 1 play_pause : deck 2 play_pause

works here
 

geposted Thu 09 Apr 20 @ 4:16 pm
NicotuxHome userMember since 2014
 

geposted Thu 09 Apr 20 @ 4:26 pm
AdionPRO InfinityCTOMember since 2006
get_active_loop was indeed rounded, will fix
get_loop should work fine though,
and
loop 0.5 should also work fine
(loop by itself only returns true when a loop is active or false otherwise)
 

geposted Thu 09 Apr 20 @ 4:36 pm
ok it's a bug :) thanks !

it's not a big issue for me because i would like to detect under 1 beat.
I just use param_smaller 2 insted of "1"

loop ? loop 1 ? true : get_active_loop & param_smaller 2 ? blink : false : false
 

geposted Thu 09 Apr 20 @ 4:41 pm
thanks Adion "get_loop" works well :)

loop ? loop 1 ? true : get_loop & param_smaller 1 ? blink : false : false
 

geposted Thu 09 Apr 20 @ 4:45 pm


(Alte Themen und Foren werden automatisch geschlossen)