Virtual DJ has a very peculiar scripting, I just can’t understand it. I need to convey the color of a song in os2l through the scene. I'm trying like this:
os2l_scene 'color' `get_loaded_song 'color'`
the output is something like:
{ evt: 'btn', page: "color", name: "`get_loaded_song 'color'`", state: 'on' }
that is, the value of the variable is not substituted
how to do it right?
Is there a way to automatically send this message when mixing?
os2l_scene 'color' `get_loaded_song 'color'`
the output is something like:
{ evt: 'btn', page: "color", name: "`get_loaded_song 'color'`", state: 'on' }
that is, the value of the variable is not substituted
how to do it right?
Is there a way to automatically send this message when mixing?
Posted Thu 26 Oct 23 @ 10:14 pm
I don't think the os2l_ scripts accept an action as a parameter, only a string is accepted
try it this way
get_loaded_song 'color' & param_cast & os2l_scene
try it this way
get_loaded_song 'color' & param_cast & os2l_scene
Posted Thu 26 Oct 23 @ 11:16 pm
it doesn`t work (
Any another ideas?
Any another ideas?
Posted Fri 27 Oct 23 @ 7:49 am
what is it sending in that case?
you could be explicit
param_equal `get_loaded_song 'color'` "red" ? os2l_scene "red" : test another case
you could be explicit
param_equal `get_loaded_song 'color'` "red" ? os2l_scene "red" : test another case
Posted Fri 27 Oct 23 @ 8:00 am
yes, it works!
Strange logic of course.
Is there some way to automatically send this event during a message?
Many thanks for the help!
Strange logic of course.
Is there some way to automatically send this event during a message?
Many thanks for the help!
Posted Fri 27 Oct 23 @ 11:53 am
To use as implicit parameter you probably need to cast to string explicitly, as os2l_scene doesn't accept color as a parameter.
Posted Fri 27 Oct 23 @ 12:22 pm
try this then
get_loaded_song 'color' 'text' & param_cast & os2l_scene
when you say "automatically", automatically when? there's always the onSongLoad entry in the keyboard mapping
get_loaded_song 'color' 'text' & param_cast & os2l_scene
when you say "automatically", automatically when? there's always the onSongLoad entry in the keyboard mapping
Posted Fri 27 Oct 23 @ 1:27 pm
By "Automatically" I intended to send an event when the song starts playing. But I think the best solution is to send an event when a button is clicked, because the transition can be lengthy
Thanks again everyone for your help
PS: the scripting language is of course very unique. I know about 10 programming languages, but I have never encountered anything like this...
Thanks again everyone for your help
PS: the scripting language is of course very unique. I know about 10 programming languages, but I have never encountered anything like this...
Posted Sun 29 Oct 23 @ 7:02 pm