down ? hot_cue 2 & get_loop & param_cast & loop_roll : effect_active 'loop roll' off & sync
something along the lines of this.
geposted Wed 26 Mar 25 @ 1:16 am
Any luck in finding out how to do this:
Set '%Fader' 0.0
crossfader %Fader
Set '%Fader' 0.0
crossfader %Fader
geposted Wed 26 Mar 25 @ 2:40 pm
I have a working kludge:
set '%Dst' 1 &
set '%Fader' 0.0 &
(var_smaller "%Fader" 0.6 ?
crossfader 0.0 &
:
crossfader 1.0) &
set_deck `get_var %Dst` &
select &
stop & stop &
play
set '%Dst' 1 &
set '%Fader' 0.0 &
(var_smaller "%Fader" 0.6 ?
crossfader 0.0 &
:
crossfader 1.0) &
set_deck `get_var %Dst` &
select &
stop & stop &
play
geposted Wed 26 Mar 25 @ 3:48 pm
bgavin wrote :
Any luck in finding out how to do this:
I told you
locoDog wrote :
See examples of param_cast
geposted Wed 26 Mar 25 @ 8:34 pm
Q: How does one code the end of an If-Then-Else block?
pseudo code:
if '$sngFader' = 0.500 Then
deck 1 select
else
deck 2 select
end if
VDJ script:
var_equal '$sngFader' 0.500 ? deck 1 select : deck 3 select
& var_list
var_list only executes in the ELSE block of the structure.
Brackets () don't work here.
I can't figure out how to end the conditional statement and continue on.
pseudo code:
if '$sngFader' = 0.500 Then
deck 1 select
else
deck 2 select
end if
VDJ script:
var_equal '$sngFader' 0.500 ? deck 1 select : deck 3 select
& var_list
var_list only executes in the ELSE block of the structure.
Brackets () don't work here.
I can't figure out how to end the conditional statement and continue on.
geposted Fri 28 Mar 25 @ 7:16 pm
read my post on brackets in script, you'll find a link in the OP index.
geposted Sat 29 Mar 25 @ 12:23 am
That is what I was searching for.
Your post notes that Build 6920 and later incorporates the brackets syntax.
Brackets were working fine on my 2025 desktop version, but failing on my 6747 build on my Win 8.1 laptop.
Your post notes that Build 6920 and later incorporates the brackets syntax.
Brackets were working fine on my 2025 desktop version, but failing on my 6747 build on my Win 8.1 laptop.
geposted Sat 29 Mar 25 @ 2:58 pm
I've not quite figured out a workaround for the forward procession of time... yet
Prior to 6920 brackets in script weren't a thing, so they don't work in earlier builds.
I have ways to "function out" queries [that are far backwards compatible, make a separate branch/thread to encapsulate] but you're asking for a technician's solution, it's part of the language but it's a different dialect, so things work different.
I do technicianing solutions but only over PM [licence holders] and expect beer tokens.
Prior to 6920 brackets in script weren't a thing, so they don't work in earlier builds.
I have ways to "function out" queries [that are far backwards compatible, make a separate branch/thread to encapsulate] but you're asking for a technician's solution, it's part of the language but it's a different dialect, so things work different.
I do technicianing solutions but only over PM [licence holders] and expect beer tokens.
geposted Sat 29 Mar 25 @ 4:54 pm
Just curious: what is the last x64 build that supports DirectX 11?
I've searched the change log and all over Google land, and came up dry.
I've searched the change log and all over Google land, and came up dry.
geposted Mon 31 Mar 25 @ 8:21 pm
Hi. Is there a way to map the multiplier slider from the freestyler module to the controller slider?
geposted 3 days ago @ 5:43 pm
it's slider 1 on the freestyler fx called on deck master, what's your problem with it?
pick thru this
https://www.virtualdj.com/forums/263280/VirtualDJ_Plugins/Sending_absolute_BPM_to_Freestyler.html?page=1
pick thru this
https://www.virtualdj.com/forums/263280/VirtualDJ_Plugins/Sending_absolute_BPM_to_Freestyler.html?page=1
geposted 3 days ago @ 5:55 pm
Thank you very much, it helped
deck master param_multiply 3 & param_cast & effect_slider 'freestyler' 1
deck master param_multiply 3 & param_cast & effect_slider 'freestyler' 1
geposted 3 days ago @ 8:10 pm
A common sticking point and the docs don't give the full picture.
Years back I learnt the ugly trial and error way, then I started to get it at the "understand it but can't fully explain it" level, but as I've got better at c++ coding I can explain it.
So... this one might go on a bit [P.S edit omg], but generally the thing to keep in mind is; quotes [and ' and `] are used to say
Thing inside quotes is one thing, one value, one word, one parameter.
That probably won't make sense yet, hopefully it will by the end.
So first lets get into how script works at the "in app" c++ code level [sort of]... Strap in.
script verbs[single commands] are c++ function calls, if you don't know what a function is, it's a block of instructions given a simple name so you don't have to list every step every time.
IRL example, I might think, makeACupOfTea;
and that seems straight forward, but really there's loads of steps to it
makeACupOfTea()
{
find clean cup;
find clean tea spoon;
fill kettle with enough water;
tea bag in cup;
spoon sugar into cup
boil kettle;
}
you get the idea even if I have missed about 10 steps.
some verbs/functions have parameters you can pass something - a number - a name - a logic state [true/false, also known as boolean or bool], to the function to make it act a certain way.
Back to my stupid IRL example
makeACupOfTea( alice 1 True );
This is completely made up but param1 is who I'm making the tea for (maybe they have a special cup) param2 is number of sugars, param3 is a bool, does it need milk)
Pretty boring and basic but this is the ground work;
Now what if this was my instruction instead
makeACupOfTea( True alice 1 );
The params are in the wrong order.
I can figure it out, but a computer can't, it has to to told everything, unless it's been told [when the program is written] you might get params in this order and in that case read them in a slightly different way to get the intended result.
In c++ you can do something called overloading functions, that is to have several functions all with the same name but they accept different parameters and they have to act differently [are wrote different at the c++ level] to deal with the different data types.
The machine has been told all the different orders it might get handed params and from the types [number, name, bool] of param in order it can figure out which overload to use by a process of elimination.
That's a 2 minute explainer to what functions are, one last thing;
Functions can have default parameters, that is to say, if you don't put include a parameter the guy who wrote the program could have assumed something for you.
Back to my stupid IRL example
makeACupOfTea();
... no params, yeah I'm making a cup of tea for myself I don't need to remember anything, it's something I do before I'm entirely awake I can autopilot this.
Somewhere deep in my brain there is a set of instructions
makeACupOfTea, if no params ? myCup 2sugars milk
So how does the vdj read in params or script in general? It's pretty simple and very efficient,
c++ has a input method called "custom data" it just takes the first valid letter number or symbol and keeps reading until it hits an invalid character,
everything it read up to that point becomes the param,
what is the invalid char? [the delimiter, if you want the proper term]
It's the space char.
Notice how no script verb contains a space? lots of under_scores but never a space.
There's a tiny couple of things about invalid chars I'll come back to, but keep this in mind,
params are separated by spaces
Verbs that accept script actions as parameters.
If a verb accepts script actions as a param is down to the verb,
It down to the fact if the programmer (sClavel or adion) included an overload for that verb to accept script actions as a value.
It's not a language wide convention. The verb description will say 'accepts actions as a param', if the verb allows it.
Now, scripts usually contain a space [interesting scripts not single commands], and earlier we said a space would act as a delimiter...
So we need to tell the machine
treat everything here including the spaces as one param
We wrap it in `` '' or "" , we encapsulate it.
Now some verbs you can use any of the 3 above interchangeably no problem, there is no ambiguity because it can work out the intention from the param data types,
All these will work, the program does not care
set a 0 & set b 0 & set c 0 & var_list & wait 2000ms & set a 1 & set b 2 & param_add "get_var a" "get_var b" & param_cast & set c & var_list
set a 0 & set b 0 & set c 0 & var_list & wait 2000ms & set a 1 & set b 2 & param_add `get_var a` `get_var b` & param_cast & set c & var_list
set a 0 & set b 0 & set c 0 & var_list & wait 2000ms & set a 1 & set b 2 & param_add 'get_var a' 'get_var b' & param_cast & set c & var_list
set a 0 & set b 0 & set c 0 & var_list & wait 2000ms & set a 1 & set b 2 & param_add 'get_var a' `get_var b` & param_cast & set c & var_list
get_var LETTER is script as a parameter for the param_add verb, but it contains a space so we encapsulate with ' " or `
but there are some verbs when it might not be clear. Some verbs where there's lots of overloads and simple process of elimination won't work.
think of this, you set these vars with a button
set a 1 & set b 1
Now you have another button
param_equal "get_var a" "get_var b" ? on : off
Should return true right?
Wrong, param_equal has lots of overloads and one of those is string comparison, and from the params given it will assume string comparison.
So for param_equal script actions have to be wrapped in ` ` then there's no doubt what the intention is
param_equal `get_var a` `get_var b` ? on : off
The set verb is another where using a script action as a param [for param2] you must use ` `
Set is used for setting a variable, to a value, to a script action value, or to the value of another variable.
The first param is ALWAYS a string for the name.
The second param is the value and there are overloads, and if you neglect to include something as a value it has a default value of 1
user set value
set a 2.4
script action as a value
set a `deck 1 level`
setting the variable to the value of another variable by name
set a 0 & set b 3 & set a b
Ok some of you might have noticed I don't use ' or " when using a var name, that's because it's not really needed, the var name is a parameter, as long as it doesn't hit an invalid char it will read it as a string without encapsulation.
[and sometimes every ` ' " is precious doing complicated stuff]
So the important question what are the invalid chars?
Well there's a list and I don't know them all but I do remember a few important rules that means you don't have to know every char
When the variable is a persistent, [is remembered even after a restart] so the name starts with a @ symbol. @ is an invalid char,
ALWAYS use " " or ' ' when dealing with persistent variable names.
Don't start variable names with numbers, just a rule from c++ and it applies in vdj script too.
Avoid using symbols in var names without wrapping the var name in " " or ' ' except;
$ as a start for a global var name
% as a start for a local var name [but really don't bother with using % in names]
_underscore is fine anywhere
generally avoid using symbols.
That's pretty much it, when ' should be a little bit clearer.
I could give examples of deep ` use but I think we're good for now.
geposted 2 days ago @ 11:00 pm