Quick Sign In:  

Forum: VirtualDJ Technical Support

Topic: Break in Script

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

Hello,

Is there any possibility to add "Breaks" into scripts? For example: "Stop playing, wait for 2 seconds, play"

 

geposted Sat 28 Sep 19 @ 8:35 pm
locoDogPRO InfinityModeratorMember since 2013
pause & repeat_start "repeatName" 2000ms & play
 

geposted Sat 28 Sep 19 @ 9:02 pm
locodog wrote :
pause & repeat_start "repeatName" 2000ms & play


You forgot to either STOP the repeat script, or specify amount of times to execute so that it stops automatically.

So, the correct answer is:

pause & repeat_start "repeatName" 2000ms 1 & play
 

geposted Sun 29 Sep 19 @ 10:29 am
Is it also possible to make the break as long as the remaining time of the song? Sth. like this: repeat_start "repeatName" (remaining time of the song in ms)
And thx for all your reply.


 

geposted Sun 29 Sep 19 @ 11:28 am
NicotuxHome userMember since 2014
As parameters can't be a script such things like that
pause & repeat_start "repeatName" `get_time 1000 'remain' & param_cast ms` 1 & play
badly can't be used in this case

thus one ot the possible workarounds will do

- this one using a countdown variable with +/- 100ms error - may be improved :
play ? pause & set 'waitvar' `get_time 10 'remain'` & repeat_start_instant "repeatName" 100ms -1 & set 'waitvar' `get_var 'waitvar' & param_add -1` & var 'waitvar' 0 ? repeat_stop "repeatName" & play : nothing : nothing

do not try to use a get_time 'remain' 100 with 10ms or less because of repeat latency depend on config and is at best 10ms
first "play ? " test prevent infinite wait while stopped or paused

- a better one using cue : this one with - video if any - still displaying, pitch change and skip in song are also take in consideration :
press stop at anytime to short the wait time

play ? mute on & set_cue 42 & repeat_start 'repeatName' 10ms & play ? nothing : repeat_stop 'repeatName' & mute off & cue_play 42 & delete_cue 42 : nothing

- finally the more secure one, all the previous one above, plus allowing to be stopped once in use by pressing button again - will try it for use in karaoke
repeat_start 'repeatName' ? repeat_stop 'repeatName' & delete_cue 42 & mute off : play ? mute on & set_cue 42 & repeat_start 'repeatName' 10ms & play ? nothing : repeat_stop 'repeatName' & mute off & cue_play 42 & delete_cue 42 : nothing
 

geposted Sun 29 Sep 19 @ 5:15 pm


(Alte Themen und Foren werden automatisch geschlossen)