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 !
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 !
Posted Thu 09 Apr 20 @ 2:08 pm
that's not a var, it's a param
Posted 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 !
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 !
Posted Thu 09 Apr 20 @ 2:20 pm
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]
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]
Posted 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 !
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 !
Posted 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
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
Posted Thu 09 Apr 20 @ 3:38 pm
param_smaller get_active_loop 0.5 ? deck 1 play_pause : deck 2 play_pause
works here
works here
Posted Thu 09 Apr 20 @ 4:16 pm
does not work here (b5630 32bit & 64bit)
(similar bug with loop and get_loop) loops < 0.5 beat are wrong 0 0.5 gives 1 and does not cast to float
see https://www.virtualdj.com/forums/234271/General_Discussion/loop_with_a_knob.html
(similar bug with loop and get_loop) loops < 0.5 beat are wrong 0 0.5 gives 1 and does not cast to float
see https://www.virtualdj.com/forums/234271/General_Discussion/loop_with_a_knob.html
Posted Thu 09 Apr 20 @ 4:26 pm
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)
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)
Posted 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
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
Posted 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
loop ? loop 1 ? true : get_loop & param_smaller 1 ? blink : false : false
Posted Thu 09 Apr 20 @ 4:45 pm