Accesso rapido:  

Forum: VirtualDJ Technical Support

Topic: Help with specifing Left and Right Decks in Script

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

Hi

How do I specify leftdeck and rightdeck?

would like a controller LED to blink when a condition false.
level 100% ? off : blink 

will cause LED to blink when one of the volume faders is not at 100% (works)



I would like the controller LED to blink when BOTH the left AND right volume faders are NOT at 100%
 leftdeck level 100% &  rightdeck level 100% ? off : blink 
<< (is always false, blinking) NOT WORKING



---------------------------------
PS
 leftdeck level 100%  ? off : blink 
<< (is also always false, blinking) NOT WORKING, so don't know how to specify left and right volume faders it seems.
 

Inviato Mon 19 Oct 20 @ 10:53 pm
NicotuxHome userMember since 2014
only blinks when both are not 100%
deck left level 1 ? off : deck right level 1 ? off : blink

and some related
only blink when both are 100%
not param_equal 'param_add "deck left level" "deck right level"' 2 ? off : blink

blink when one is not 100%
param_equal 'param_add "deck left level" "deck right level"' 2 ? off : blink

blink when one is 100%
deck left level 1 ? blink : deck right level 1 ? blink : off

blink when 1 is 100% lit when both are 100%
param_equal 'param_add "deck left level" "deck right level"' 2 ? on : deck left level 1 ? blink : deck right level 1 ? blink : off
 

Inviato Mon 19 Oct 20 @ 11:19 pm
 deck left level 100% ? deck right level 100% ? off : blink : blink


In other words, you use deck left or deck right to perform your queries. You can also use deck 1, deck 2, e.t.c.

Also...
When you do queries it's NOT advised to use "AND" logic because of the way VDJ Script is structured.
It's always best to nest multiple queries (IF's)

So, in a nutshell, with VirtualDJ you don't say
If apples=red AND bananas=yellow then make fruit salad else leave them on fridge

With VirtualDJ you say:
If apples=red then
---->if bananas=yellow then
---->---->make fruit salad else
---->leave them on fridge (apples are red but bananas are not yellow) else
leave them on fridge (apples are not red, we don't examine what color bananas are)
 

Inviato Mon 19 Oct 20 @ 11:21 pm
Nicotux wrote :
and some related
only blink when both are 100%
not param_equal 'param_add "deck left level" "deck right level"' 2 ? off : blink

blink when one is not 100%
param_equal 'param_add "deck left level" "deck right level"' 2 ? off : blink

blink when 1 is 100% lit when both are 100%
param_equal 'param_add "deck left level" "deck right level"' 2 ? on : deck left level 1 ? blink : deck right level 1 ? blink : off


I think someone must learn to walk before he can learn to run... :P

Those scripts are 'complex' even for advanced users! :)
 

Inviato Mon 19 Oct 20 @ 11:26 pm
Big Thanks, Guys

So happy to learn from the Amazingly Talented DJs here in the Forum.

And I always welcome more info, then too little, as I learn VDJ Scripting.

Again you Guys ROCK . Thank you.!!




PS
Thank you PhantomDeejay for the TIP on structuring queries with VDJ Script.

Is there a limit to level of nesting allowed ?
 

Inviato Tue 20 Oct 20 @ 12:04 am
To follow up, to maybe help someone wishing to something related.

deck left level 1 ? off : deck right level 1 ? off : blink
<<< Does NOT work (Bug? that it needs to be decimal)

While these both WORK
deck left level 100% ? off : deck right level 100% ? off : blink

deck left level 1. ? off : deck right level 1. ? off : blink
< While BOTH WORK Blinks when BOTH are NOT at 100% (the AND logic structure nesting)




--------------------------------------------------------------------------------

deck left level 100% ? deck right level 100% ? off : blink : blink 
<<< BLINKS when either the Left or Right is NOT at 100% (The OR logic structure nesting)





---------------------------------

Again Thanks PhantomDeejay & Nicotux !!
 

Inviato Tue 20 Oct 20 @ 12:47 am
locoDogPRO InfinityModeratorMember since 2013
There's no limit to the level of nesting. You can go as mad as you want.
 

Inviato Tue 20 Oct 20 @ 12:54 am
NicotuxHome userMember since 2014
just copy/paste
deck left level 1 ? off : deck right level 1 ? off : blink

it is working well here both in pad & custom_button
 

Inviato Tue 20 Oct 20 @ 1:03 am
Nicotux wrote :
just copy/paste
deck left level 1 ? off : deck right level 1 ? off : blink

it is working well here both in pad & custom_button


Its strange I can only get that amazing script above to work when I change the "1" (integer) >> "1." (decimal) or "100%" (percentage).

Cannot get it to work in a custom button or in a controller mapping... once I change the 1 to 1. or 100% it works perfectly for both the custom button and in mapping for the LED.

Don't know if its a bug. or ?

Again Much Thanks you for your help !

Let me know if there is anything I should test/check ?

------------------------------------------------------------
CPU: AMD Ryzen 7 2700X Eight-Core Processor (3700 MHz)
Memory: 65487 MB
OS Version: Microsoft Windows 10 64-bit (Build 19041.572)
Graphics Card Vendor: NVIDIA Corporation
Graphics Card: GeForce GTX 1080 Ti/PCIe/SSE2
VDJ v8.5-64 b6106 w Default Pro Skin
 

Inviato Tue 20 Oct 20 @ 4:14 am
NicotuxHome userMember since 2014
interesting, strange script reaction that differ from one machine to another one :/
intel i5 2400s & nvidia 520m

or maybe due to ghost parameter...

Clearly a bug

but tracking it... would be fine to see if level & param_cast trunc returns 1 or 0 in such a case
reveal a set of bugs here: (known and already reported bugs - one with parameter passing and one with casting and one with relative)
"level & debug" as "well as level && debug" always return "no param" (or previous param if in a chain): there is no return value BUG
"get_level" returns the signal level thus not related
"level & cast_float & debug" gives the correct value GOOD so that the value returns but not as a parameter
"level & param_cast trunc & debug gives the decimal value !!! BUG
"level & param_cast int_trunc & debug gives the decimal value !!! BUG
"level & param_cast trunc & param_cast float & debug gives the decimal value !!! BUG
"level & param_cast int_trunc & param_cast float & debug gives 1.0 or 0.0 as wanted GOOD
"get_constant 10 & param_cast float & level & param_cast trunc & debug" gives bool: 0 >>> why? level takes the param and set level and returns FALSE ?
"get_constant 0 & param_cast float & level & param_cast trunc & debug" gives bool: 1 >>> why? level takes the param and set level and returns OK ? (range [0..1] returns 1; range ]1..[ returns 0)
... negative values .... ^^ TYPE: value (relative)
+ prepend values .... ^^ TYPE: value (relative)
 

Inviato Tue 20 Oct 20 @ 5:47 am

Let me know if there is a script I can run to test...

Again thank you for your help, and I am happy that it works, big smile !

and yes strange.
 

Inviato Tue 20 Oct 20 @ 10:36 am


(Vecchi argomenti e forum sono automaticamente chiusi)