快速登录:  

Forum: VirtualDJ Technical Support

话题: Autoplay Script
robHome userMember since 2022
Hi,

I realise this is not the intended purpose of VirtualDJ but it is such a great bit of software that I have been looking at how it may fit.

The idea is to autoplay a number of playlists each day using the event scheduler. The complications are that 1. some of the playlists comprise of very long mp3s and so need to be stopped, I can't just rely on it changing at the end of a song, 2. the device that is running it may be restarted at any time of the day. 3. It would be really nice if there was a fadeout of the last playlist before the new one started, rather than a hard stop.

I got close using a schedule such as this:

<?xml version="1.0" encoding="UTF-8"?>
<schedule>
<event starttime="18000" action="script" param="stop &amp; playlist_clear &amp; unload deck default " />
<event starttime="21600" endafter="53999" action="playlist" param="pathto\playlist1.m3u" />
<event starttime="54000" endtime="61198" action="playlist" param="pathto\playlist2.m3u" />
<event starttime="61199" action="script" param="stop &amp; playlist_clear &amp; unload deck default " />
<event starttime="61200" endtime="71998" action="playlist" param="pathto\playlist3.m3u" />
<event starttime="71999" action="script" param="stop &amp; playlist_clear &amp; unload deck default " />
<event starttime="72000" endtime="16200" action="playlist" param="pathto\playlist4.m3u" />
</schedule>

This allowed the schedule to be started at any time of the day but had a hard stop at the end of each playlist at a certain time. A couple of quirks, if I didn't add the seconds to each then the scheduler UI didn't show them in the correct order. Then in an update the "Repeat once finished" option was introduced which caused some problems.

So I tried using a script that had a 3 second fade out and loading and delaying playing the playlists using a script. The issue with this is if I have "Repeat once finished" checked then it simply constantly cycles on the fade out and the turning on of Automix seems very hit and miss.

<?xml version="1.0" encoding="UTF-8"?>
<schedule repeat="no">
<event starttime="18000" action="script" param="stop & playlist_clear & unload deck default " />
<event starttime="21600" action="script" param="wait 5000ms & browser_gotofolder 'pathto\playlist1.m3u' playlist_load &amp; play & automix ? nothing : automix" />
<event starttime="50400" action="script" param="repeat_start_instant & 'customfade' 30ms 101 & level & param_smaller 1% ? stop & repeat_stop 'customfade' & wait 100ms & level 100% : level -1% & playlist_clear & unload deck default" />
<event starttime="50400" action="script" param="wait 5000ms & browser_gotofolder 'pathto\playlist2.m3u' & playlist_load & play & automix ? nothing : automix" />
<event starttime="64800" action="script" param="repeat_start_instant 'customfade' 30ms 101 & level & param_smaller 1% ? stop & repeat_stop 'customfade' & wait 100ms & level 100% : level -1% & playlist_clear & unload deck default" />
<event starttime="64800" action="script" param="wait 5000ms & browser_gotofolder 'pathto\playlist3.m3u' & playlist_load & play & automix ? nothing : automix" />
<event starttime="72000" action="script" param="repeat_start_instant &apos;customfade&apos; 30ms 101 & level & param_smaller 1% ? stop & repeat_stop 'customfade' & wait 100ms & level 100% : level -1% & playlist_clear & unload deck default" />
<event starttime="72000" action="script" param="wait 5000ms & browser_gotofolder 'pathto\playlist4.m3u' & playlist_load & play & automix ? nothing : automix" />
</schedule>

Many thanks to those on the forums already - you may recognise parts of your scripts above.

Any pointers would be gratefully received!

 

发表时间 Tue 21 Nov 23 @ 9:34 am
How does playthrough work, I mean so it doesn't stop after each song.
am completely new here, thanks in advance.

Hoe werkt doorspelen?
Ik bedoel dat hij niet stopt na elk liedje.
Ben helemaal nieuw hier.
Alvast bedankt.
 

发表时间 Tue 21 Nov 23 @ 4:02 pm