Ingreso rápido:  

Forum: VirtualDJ Technical Support

Tema: Store current value of deck level into a variable?
Hi,

I'm trying to use VDJscript to copy the level of 1 deck to another. I can set a variable to say 50 and use that to set the level but I can't seem to store the current level. Here's the code I currently have, switching out the 'deck 1 level' to say 50 sets the 3rd deck to 50% level fine.

set $deck1vol 'deck 1 level' & get_var '$deck1vol' & param_cast percent & deck 3 level


Additionally, I would also like to do this for stems volumes. I'm guessing once I've worked out how to store the level it will be similar for the stems but let me know if you know of anything that might trip me up.

Thanks!
 

Mensajes Tue 31 Jan 23 @ 1:44 pm
locodogPRO InfinityModeratorMember since 2013
set $deck1vol `deck 1 level` & get_var $deck1vol & param_cast & deck 3 level


backticks are the usual for script actions as values [this isn't a rule that works everywhere just scripts that can accept other scripts as parameters]
 

Mensajes Tue 31 Jan 23 @ 1:58 pm
Thanks, I was pretty sure I had tried all combinations of backticks and '.

This script still doesn't work though, it just sets the deck 3 volume to 100% regardless of the level of deck 1. Is there something else I am missing? I am using this script on a pad if that makes any difference, though I tried it on a midi mapped button as well and the same thing happens.

Additionally, is there a way to see wat the current values of variables are? Would make troubleshooting much easier!
 

Mensajes Tue 31 Jan 23 @ 2:22 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Tried Loco's script on a skin custom button and works fine here

var_list verb will get u the Variables and their values on a separate window
 

Mensajes Tue 31 Jan 23 @ 2:35 pm
My apologies, this:

set $deck1vol `deck 1 level` & get_var $deck1vol & param_cast & deck 3 level


works perfectly fine. I just remembered that I switched the order of my decks around in my mixer from 3,1,2,4 to 1,2,3,4 yesterday and I was testing it with the wrong fader!

Thanks!
 

Mensajes Tue 31 Jan 23 @ 4:55 pm
locodog wrote :
set $deck1vol `deck 1 level` & get_var $deck1vol & param_cast & deck 3 level


backticks are the usual for script actions as values [this isn't a rule that works everywhere just scripts that can accept other scripts as parameters]


Please add this to the main page of VDJscript. I have spent countless hours trying to figure this out. There are probably many other users who are struggling to get their script to work or are giving up trying. This is an essential thing for understanding VDJscript!
 

Mensajes Thu 09 Mar 23 @ 9:12 pm
locodogPRO InfinityModeratorMember since 2013
it is already included in the script definition for the set verb
 

Mensajes Thu 09 Mar 23 @ 10:04 pm