Ingreso rápido:  

Forum: Old versions

Tema: Help to create a Script on DDJ-SZ

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

Hello everyone, I have a DDJ-SZ and do mixes with many videos, sometimes with 3 decks at the same time and i would like to set the effects selector above each channel as the left and right video selector.

if anyone can tb me explain a few things about the VDJ script, I do not quite understand things like "set '$ FX1' 0 " and also do not know which order to follow when you have more parameters within macros with query like:

command1? command2? command3: Command4? Command5: Command6

if the command2 is false, where enters the command to the false action?
 

Mensajes Mon 10 Aug 15 @ 8:45 am
PachNPRO InfinityMember since 2009
brunoliv wrote :
Hello everyone, I have a DDJ-SZ and do mixes with many videos, sometimes with 3 decks at the same time and i would like to set the effects selector above each channel as the left and right video selector.

if anyone can tb me explain a few things about the VDJ script, I do not quite understand things like "set '$ FX1' 0 " and also do not know which order to follow when you have more parameters within macros with query like:

command1? command2? command3: Command4? Command5: Command6

if the command2 is false, where enters the command to the false action?


set '$ FX1' 0 means that a variable named "FX1" gets the value of 0. The $ declares the variable as "global", meaning can be used by all decks for example.

If command2 is false, command4 would be executed.

The general structure is as like this.

query1 ? action1 : action2

if query1is true, action1 will be executed,
else action2 will be executed.

It is also possible to nest more than 1 "if-else" structures.
That will look like this:

query1 ? query2 ? action1 : action2 : action3

You can even extend that to something like this:

query1 ? query2 ? [color=orange] query3 ? action4 : action 5 : action2[/color] : action3

Here you can finde some examples and a general description of VDJScript
http://www.virtualdj.com/wiki/VDJscript.html
 

Mensajes Mon 10 Aug 15 @ 10:44 am
PachN wrote :

set '$ FX1' 0 means that a variable named "FX1" gets the value of 0. The $ declares the variable as "global", meaning can be used by all decks for example.

If command2 is false, command4 would be executed.

The general structure is as like this.

query1 ? action1 : action2

if query1is true, action1 will be executed,
else action2 will be executed.

It is also possible to nest more than 1 "if-else" structures.
That will look like this:

query1 ? query2 ? action1 : action2 : action3

You can even extend that to something like this:

query1 ? query2 ? [color=orange] query3 ? action4 : action 5 : action2[/color] : action3


Thank you for your explanation!
only two more questions:

1) when there is a command: set '$ FX1' 0 I'm 'creating' and 'applying' the FX1 parameter or the FX1 parameter need already exist in other command line?

for example, I create an entry called FX1 in a Mapper and assign an action as: <map value = "FX1" action = "leftvideo" /> and when I put SET $ FX1 I'm applying this entry and the action to a button or do not need to create the entry? the action set $ FX1 is just to say that button now has the "name" of FX1?

2) then the first entry after: immediately referred to the previous command? in this case:

QueryA ? (yes to QA) Query B ? (yes to QB) Query C ? Yes to QC : No to QC : No to QB : No to QA ?

The curent state of the button its this:

CODE wrote :

action_deck 1 ? var_equal '$fx1' 1 ? on & set '$fx1' 0 : off & set '$fx1' 1 : action_deck 2 ? var_equal '$fx1' 2 ? on & set '$fx1' 0 : off & set '$fx1' 2 : action_deck 3 ? var_equal '$fx1' 3 ? on & set '$fx1' 0 : off & set '$fx1' 3 : action_deck 4 ? var_equal '$fx1' 4 ? on & set '$fx1' 0 : off & set '$fx1' 4 : off & set '$fx1' 0


how can i change this to make the button set the deck as "leftvideo"

 

Mensajes Mon 10 Aug 15 @ 11:35 am
PachNPRO InfinityMember since 2009
1)

$FX1 is just a name for a variable. A variable is used to check if e.g. a Shift Button is pressed. If Shift is pressed, the $shift-Variable would be 1, if not pressed it would be 0.

In your case, it is just a coincidence that there is a button with the name FX1 and a variable $FX1. That might be a bit confusing. But the $FX1 could also be named $mySuperSpecialVariable. It's just a name.

Your script, as above, does only set the variable $FX1 to a value of 1,2,3 or 4 depending on which button was pressed. Nothing more.

To achive what you want it should only be this:

Go to config - controllers and select your SZ mapping.
Click on Key Learn, now press one of the [1] buttons.
Klick on the name of the button, I assume it is FX1, and delete the Action right next to the button name.
Replace it with:

leftvideo

if that doesn't work, try this on:

action_deck 1 ? deck 1 leftvideo : action_deck 2 ? deck 2 leftvideo : action_deck 3 ? deck 3 leftvideo : action_deck 4 ? deck 4 leftvideo : nothing


Do the same for the [2] button and try this:

rightvideo

or this on:

action_deck 1 ? deck 1 rightvideo: action_deck 2 ? deck 2 rightvideo : action_deck 3 ? deck 3 rightvideo : action_deck 4 ? deck 4 rightvideo : nothing



2) Yes, that is how the execution order would be.

 

Mensajes Mon 10 Aug 15 @ 12:21 pm
Thanks a lot PachN,
thanks to your explanation, I managed to configure the buttons in the right way.
If someone wants to set the effects selection buttons on each channel as a left and right video selector on the PIONEER DDJ-SZ , here are the scripts:

For the LEFT VIDEO, you must put on FX1_ASSIGN the following script:
Brunoliv wrote :
action_deck 1 ? var_equal '$lv' 1 ? on & leftvideo auto & set '$lv' 0 : off & deck 1 leftvideo & set '$lv' 1 : action_deck 2 ? var_equal '$lv' 2 ? on & leftvideo auto & set '$lv' 0 : off & deck 2 leftvideo & set '$lv' 2 : action_deck 3 ? var_equal '$lv' 3 ? on & leftvideo auto & set '$lv' 0 : off & deck 3 leftvideo & set '$lv' 3 : action_deck 4 ? var_equal '$lv' 4 ? on & leftvideo auto & set '$lv' 0 : off & deck 4 leftvideo & set '$lv' 4 : on & set '$lv' 0


For the RIGHT VIDEO you must put on FX2_ASSIGN the following script:

Brunoliv wrote :
action_deck 1 ? var_equal '$rv' 1 ? on & rightvideo auto & set '$rv' 0 : off & deck 1 rightvideo & set '$rv' 1 : action_deck 2 ? var_equal '$rv' 2 ? on & rightvideo auto & set '$rv' 0 : off & deck 2 rightvideo & set '$rv' 2 : action_deck 3 ? var_equal '$rv' 3 ? on & rightvideo auto & set '$rv' 0 : off & deck 3 rightvideo & set '$rv' 3 : action_deck 4 ? var_equal '$rv' 4 ? on & rightvideo auto & set '$rv' 0 : off & deck 4 rightvideo & set '$rv' 4 : on & set '$rv' 0
 

Mensajes Mon 10 Aug 15 @ 2:50 pm
djdadPRO InfinityDevelopment ManagerMember since 2005
Hmm why so complicated ? Just leftvideo/rightvideo should do and you could assign SHIFT+FX/FX2 ASSIGN as leftvideo 'auto' /rightvideo 'auto'
No ?
 

Mensajes Mon 10 Aug 15 @ 3:24 pm
No, because there is only TWO key in the mapper. FX1_ASSIGN and FX2_ASSIGN for 8 buttons and because that VDJ needs to know in wich deck the button was pressed.
trust me, I tried to put only leftvideo, it doesnt work.

if look at this image of DDJ-SZ:

the area in red has 8 buttons, but only 2 entries in the mapper. no matter which button you press, the controller tells to VDJ that was FX1_ASSIGN or FX2_ASSIGN then you need a script a bit more complicated to differentiate the decks
 

Mensajes Tue 11 Aug 15 @ 3:58 am
djdadPRO InfinityDevelopment ManagerMember since 2005
FX1_ASSIGN mapped as : leftvideo
FX2_ASSIGN mapped as : rightvideo
should work.
Having them mapped as above, simply means that each deck can be leftvideo or rightvideo
So if you press the FX1 of deck 3, it will make deck 3 to be leftvideo and if you press the FX2 of deck 4, deck 4 will become rightvideo
I really dont see why this doesnt work for you.
If the scripts you came up with, work for you, keep them. Just need topoint others to a much easier direction in case someone needs to use those buttons in a same way.
 

Mensajes Tue 11 Aug 15 @ 12:28 pm
djdad wrote :
FX1_ASSIGN mapped as : leftvideo
FX2_ASSIGN mapped as : rightvideo
should work.
Having them mapped as above, simply means that each deck can be leftvideo or rightvideo
So if you press the FX1 of deck 3, it will make deck 3 to be leftvideo and if you press the FX2 of deck 4, deck 4 will become rightvideo
I really dont see why this doesnt work for you.
If the scripts you came up with, work for you, keep them. Just need topoint others to a much easier direction in case someone needs to use those buttons in a same way.


Jesus.... it works hahahahahaha you're absolutely right! I tried it once and did not work because I had written DECK 1 LEFTVIDEO, so I thought I needed a code more complicated code to operate hahahahahah I'm feeling an idiot for not having tried to put only leftvideo and rightvideo.
But at least I learned a little more about Macros and also learned to think simpler before attempting complex things
 

Mensajes Wed 12 Aug 15 @ 2:31 am
Alright, here we go :D its my first time at virtual dj and I dont really know how to use this app! I was just thinking if you guys could help me how?!
 

Mensajes Thu 13 Aug 15 @ 8:15 am
locoDogPRO InfinityModeratorMember since 2013
Search YT for videos, your best bet is find a friend who uses VDJ , 1 to 1 tuition is one of the best ways for learning the basics.

In future open a thread here http://www.virtualdj.com/forums/15/Mix_lessons.html, hijacking someone else's thread is akin to interrupting someone else conversation.
 

Mensajes Fri 14 Aug 15 @ 5:34 am


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