Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Changing Shaders with VDJ Script
I would like to be able to assign a button to change the master shader to the next available shader, I tried
'deck master video_fx_select "shader" +1'
but that doesn't work, any help appreciated
 

Posted Wed 21 Apr 21 @ 3:14 am
locoDogPRO InfinityModeratorMember since 2013
 

Posted Wed 21 Apr 21 @ 3:49 am
NicotuxHome userMember since 2014
there is no really correct way to do it correctly

deck master video_fx_slider 1 +0.0125
deck master video_fx_slider 1 -0.0125

to cycle :
deck master video_fx_slider 1 1 ? video_fx_slider 1 0 : deck master video_fx_slider 1 +0.0125

where 0.0125 is 1/number of available shaders
 

Posted Wed 21 Apr 21 @ 3:49 am
locoDogPRO InfinityModeratorMember since 2013
effect_string 1 matey,
the dial way makes me wonder what happens when you have more than 4095 shaders

*edit string 1 not 2, it's been a while
 

Posted Wed 21 Apr 21 @ 3:54 am
NicotuxHome userMember since 2014
don't really know since only 80 with only almost half working ^^
4095 would have miss some steps due to 12bit in old SDK2 but sliders are not integer or float anymore since SDK 7 and shaders appeared in V8
There is sure a limit where it won't work but currently SDK8 uses double with 23bit fraction 8 388 607 shaders may be the limit no ?
may be wrong but 4k shaders is really a lot, not sure being able to find time to create or discover so much working and nice enough to add to VDJ just to test ;)

the other hand; maybe some kind of raw list in integer (like with effects) would help or simply implement the prev/next as a button

 

Posted Wed 21 Apr 21 @ 4:20 am
AdionPRO InfinityCTOMember since 2006
As loco dog said, you can use effect_string with parameter "+1" or "-1" to scroll
 

Posted Wed 21 Apr 21 @ 4:38 am
NicotuxHome userMember since 2014
The best way ?

generic (may work for other effects with same control):
deck master effect_string video 2 +1

or specific (works even shader is not in slot):
deck master effect_string shader 2 +1

 

Posted Wed 21 Apr 21 @ 5:01 am
Thanks Guys, great information there I have used the following to adjust the overlay and audio only shader

device_side "left" ? deck master effect_string shader 2 -1 : deck master effect_string shader 2 +1

device_side "left" ? deck master video_transition_select +1 : effect_string audioonlyvisualisation 1 +1

Works perfectly
 

Posted Wed 21 Apr 21 @ 6:53 am
The Command effect_string is don't in the Mapper Command List ;-)
It works a little , but i need it on Effect Slider , for my Encoder Knops on the Controller , it works also with the command effect_slider 'audioonlyvisualisation' 1 , because i need this for the other FX too.... But it scrolls not one by one the Shaderlist...
When I use effect_string other Sliders on effects don't work....
 

Posted Fri 23 Apr 21 @ 4:49 pm
locoDogPRO InfinityModeratorMember since 2013
Yes, not all effects have/need a string. The command is there as get_effect_string which can get or set, although effect_string also works to set.

if you need certain function of certain aov fx you can query effect_select to make that happen.
 

Posted Sat 24 Apr 21 @ 11:09 am
I'd like a little help here too please!

As VDJ crashed on me earlier when trying to bring the window to the front (clicking on the taskbar button) I'd rather script what I was about to do (turn off the shader) so i can do it remotely from a controller pad.

The thing is I can't figure out the script required to simply turn on/off any given video source.

At the moment I switch between shader, slideshow and milkdrop by specifying the name of each:

video_source_select "shader"
(etc) but this doesn't turn each on/off - it just switches between them.

I've tried things like video_source_select "shader" on ? video_source_select "shader" off : video_source_select "shader" on and ditto without the 'select' part - video_source "shader" on ? video_source "shader" off : video_source "shader" on but nothing I've tried so far works.
 

Posted Sat 24 Apr 21 @ 1:00 pm
locoDogPRO InfinityModeratorMember since 2013
@groovin

effect_active 'audioonlyvisualisation' none
video_source_select "none"
 

Posted Sat 24 Apr 21 @ 1:08 pm
Thanks!
 

Posted Sat 24 Apr 21 @ 1:32 pm
NicotuxHome userMember since 2014
The use of "none" with video_source_select is a "dangerous hack" ^^ because it loads the transition "none" in the video slot.
As a result (one of the bugs in selecting fx) the selector for V.Source becomes the transition menu only until a correct (valid visualization or invalid overlay or invalid visualization) video fx is affected to slot
(other bug: the selection list is determined by the root folder the effect stay in, does not enter sub-folders and show it as the effect)

video_source 'shader' should work, officially supported (lists in menu selector for sources) but no way to manually de-activate a source, it automatically toggles only when no video
(that's why the hack is used)

shader can be used as a video effect when in source mode even if not officially in the list of available video fx for in Source mode


 

Posted Sat 24 Apr 21 @ 1:46 pm
none is a standard choice, and I use it all the time.. totally fine
Available in settings as well (just not shown in drop down)



You can also turn off video source in the drop down itself (far left switch button in the list)
In essence, setting it to "none" (that also will be displayed)

 

Posted Sat 24 Apr 21 @ 2:13 pm
locodog wrote :
@groovin

effect_active 'audioonlyvisualisation' none
video_source_select "none"


For turn Off Video and Video Output I have this Cammand on a Button .

holding ? has_video_mix : video_output ? video_output off & video_source_select 'none' : video_output on

With holding I can change the Video Output for mix or Audio only , normal i for turn off the Video Window and select to none FX in the slot.

Thats works wondeful.
 

Posted Sat 24 Apr 21 @ 4:53 pm
locodog wrote :
Yes, not all effects have/need a string. The command is there as get_effect_string which can get or set, although effect_string also works to set.

if you need certain function of certain aov fx you can query effect_select to make that happen.


But get_effect_string is for display the FX String .
Not for set this.
 

Posted Sat 24 Apr 21 @ 4:55 pm
Hi I've been searching and just can't find an answer to this.
Effect_string "audioonlyvisualisation" 1 +1 moves to the next shader nicely
Effect_button "shader" 1 opens the position window
But either variation of the above with a 2 just doesn't seem to allow me to change the "auto change" or 3 "beat nice"? I'm using single video source. Help!

Secondly can you close the shader pop up window by script so I can sign it to a key.

 

Posted Thu 19 Oct 23 @ 9:14 pm
locoDogPRO InfinityModeratorMember since 2013
effect_show_gui audioOnlyVisualisation
or
deck master effect_show_gui shader
depending on where you use it

effect_button audioOnlyVisualisation 2
effect_button shader 2
depends on where, both do work, but it seems there's a disconnect between the effect_gui and reality
 

Posted Fri 20 Oct 23 @ 12:19 am