Sign In:     


Forum: VirtualDJ Technical Support

Topic: What VDJ script to write for fading out a track?
I'm trying to create a VDJ script for a custom button that will fade out a track, stop playback and reset the track:


(This is just an animation of what's supposed to happen. It's not working as expected yet.)

The script is supposed to run the following steps:

1. fade out for 4 secs
2. stop the deck
3. unload the deck
4. set volume level back to 100 %



This is my current script:

fadeout 2000ms 2000ms & wait 4050ms & stop & level 100% & unload

But it doesn't work: The track is not fading out.

What am I doing wrong? What's the right command sequence?
 

Posted Sun 01 Jun 25 @ 9:24 am
Are you specifiying the active deck?
 

Fadeout isn't a script linked or related to volume in anyway.
It's a query script for skins for a visual fadeout.

You want to use a a repeat_start script to get the results you want.
 

repeat_start myFade 40ms 99 & level -1% & level 0.0 ? repeat_stop myFade & stop & unload & level 1.0 : 
 

Nice!

But it's only partially working: The track doesn't stop and unload when the volume level reaches zero:

 

try change the 99 to 100
 

Now it's working. Excellent! Thank you!