Quick Sign In:  

Forum: VirtualDJ Skins

Topic: slider and fade special configuration

Dieses Thema ist veraltet und kann veraltete oder falsche Informationen enthalten.

Here' a tough one for you skinners...
:)
I need a volume slider that starts fading out when I lower the level to 50% and not before. So, I can freely vary the volume from 50 - 100% without influencing the clarity of the video... But as soon as i drop below the 50%, the video starts fading out (or if reversed: fade in).

Is this possible with VDJscript? If so, what would my code look like?

I now have this:

<slider action="level" orientation="vertical" direction="up">
<size width="43" height="460"/>
<pos x="619" y="37"/>
<up x="619" y="37"/>
<selected x="759" y="1118"/>
<down x="759" y="1118"/>
<fader/>
</slider>

Any help is greatly appreciated!
 

geposted Fri 02 Jun 17 @ 7:49 am
djdadPRO InfinityDevelopment ManagerMember since 2005
action="level & param_smaller 50% ? param_multiply 2 & video_level : video_level 100%"

Make sure you have VideoVolumeLink to No
 

geposted Fri 02 Jun 17 @ 8:10 am
Thanks Babis, but the code you gave does something else: the slider moves twice as fast as my finger and the fade still starts and ends at the top and bottom...
 

geposted Fri 02 Jun 17 @ 9:22 am
Hmm... maybe there's another approach possible:

How about this: when a song starts, it will always start black, independent of the volume slider position. And then, over a two-second interval, it is faded in. Same thing when it ends: two seconds before the end of the song (or before the last beat or sound), the video is faded out to black...

Is that possible with VDJscript?
 

geposted Sat 03 Jun 17 @ 7:28 am
Apparently not.
I'll have to re-do all my videoclips then, with fades...
 

geposted Mon 05 Jun 17 @ 8:21 am
The action Babis (djdad) gave you is correct.
However you need to complement it with a query so that the skin shows the correct fader movement

Therefore, try this:
<slider action="level & param_smaller 50% ? param_multiply 2 & video_level : video_level 100%" query="level" orientation="vertical" direction="up">
<size width="43" height="460"/>
<pos x="619" y="37"/>
<up x="619" y="37"/>
<selected x="759" y="1118"/>
<down x="759" y="1118"/>
<fader/>
</slider>
 

geposted Tue 06 Jun 17 @ 10:01 am
Thanks Phantom, but even with your code the same thing happens: the slider is already lit at 100% when my finger is only halfway the slider (in other words: the slider moves twice as fast as my finger), and the video fade starts at zero and ends at 100%... Any thoughts as to why this would be?
 

geposted Tue 06 Jun 17 @ 11:07 am
For the video fade, you must ensure that the option to link volume and video fader is set to no (VideoVolumeLink=no)

For your custom volume slider try this action:
set 'MyVolSlider' & var_smaller 'MyVolSlider' 0.5 ? level & get_var 'MyVolSlider' & param_cast & param_multiply 2 & video_level : level & video_level 100%

IT'S NOT the cleanest solution since it depends on a variable (and therefore if you use a controller you need to assign the same action on your volume faders as well) but it should work (I just tried it)

 

geposted Tue 06 Jun 17 @ 12:29 pm
Deejay Corny wrote :
Hmm... maybe there's another approach possible:

How about this: when a song starts, it will always start black, independent of the volume slider position. And then, over a two-second interval, it is faded in. Same thing when it ends: two seconds before the end of the song (or before the last beat or sound), the video is faded out to black...

Is that possible with VDJscript?


That's also possible, but it requires rsi (repeat) scripts, which I believe you should avoid.
The bad thing with rsi scripts is that the user may enter an infinity loop if he does something that the rsi script didn't predict.
 

geposted Tue 06 Jun 17 @ 12:34 pm
I have the VideoVolumeLink=no.
I'm on a touch screen, so no controller involved.
Yes, maybe it's because of my customized skin...

The code works like a charm!
Thank you very much, again. Your support is really appreciated!
:)

 

geposted Tue 06 Jun 17 @ 12:35 pm
Ok, since this is for a touchscreen and there's no controller involved:

On your skin add an <ONINIT> section and put this code:

<ONINIT action="deck 1 set 'MyVolSlider' 1.0 & deck 2 set 'MyVolSlider' 1.0 & deck 3 set 'MyVolSlider' 1.0 & deck 4 set 'MyVolSlider' 1.0"/>

That's necessary in order to "link" your custom volume faders with the "real" volumes of VirtualDj.
When VirtualDj starts, all volumes are set to 100%
However, the parameters that control your custom volume sliders are set to 0.
This means that upon startup your custom volume faders will show 0% volume, but the real volume will be 100%

Another way to "link" your custom faders with the real volume of the decks would be to have all volumes set to 0% upon startup.
You will need to do the same as before: Add an <ONINIT> action to turn all decks volume to 0%:

<ONINIT action="deck 1 level 0% & deck 1 video_level 0% & deck 2 level 0% & deck 2 video_level 0% & deck 3 level 0% & deck 3 video_level 0% & deck 4 level 0% & deck 4 video_level 0%"/>

Attention: You need to use ONE of the two <ONINIT> actions only. NOT BOTH!
So, choose what you prefer and add it to your skin.
 

geposted Tue 06 Jun 17 @ 1:03 pm
Thinking with me... again much appreciated.

Things however work fine, pure by chance, because I happen to have the level always set to 0% when I load a song (it's the same button).

I have your code only for the sliders for deck 1 and 2.

I've put in the ONINIT this part: deck 1 level 0% & deck 1 video_level 0% & deck 2 level 0% & deck 2 video_level 0%, just to be on the safe side...
 

geposted Tue 06 Jun 17 @ 1:27 pm
The ONINIT thing is just for the startup of VirtualDj.
If you have an action like "load & level 0%" on your skin then you should also add "& set 'MyVolSlider' 0"

I didn't understand your other question though...
I gave you ONINIT scripts for 4 decks configuration.
If you use only 2 deck then just ommit the actions that start with deck 3 and deck 4

Edit:
After your edit, I get it.
Yes your script is correct for a 2 decks skin
 

geposted Tue 06 Jun 17 @ 1:33 pm
:)
 

geposted Tue 06 Jun 17 @ 1:37 pm
PhantomDeejay wrote :

If you have an action like "load & level 0%" on your skin then you should also add "& set 'MyVolSlider' 0"


That's CRUCIAL BTW!
Your volume governor now is the 'MyVolSlider' variable.

So now, you need to revise your entire skin and make sure that wherever you adjust the volume, you also adjust it's governor, the 'MyVolSlider' variable as well!
 

geposted Tue 06 Jun 17 @ 1:40 pm
But as I said, I only used your code for the volume sliders of decks 1 and 2. So i added the code to the load button of those two decks. That should suffice, right?
 

geposted Tue 06 Jun 17 @ 1:43 pm
Yes
 

geposted Tue 06 Jun 17 @ 1:49 pm
FruitPRO InfinityMember since 2003
This can be achieved with a simple custom crossfader curve I believe.
 

geposted Tue 06 Jun 17 @ 2:26 pm
No crossfader in my skin, I'm afraid...
:)
 

geposted Tue 06 Jun 17 @ 2:35 pm
FruitPRO InfinityMember since 2003
Yes nvm, I forgot the VOL sliders ^^
 

geposted Tue 06 Jun 17 @ 2:57 pm


(Alte Themen und Foren werden automatisch geschlossen)