Hi folks
I checked out all the verbs in the VirtualDJ Script list, but could not find one that would delay for a certain time.
I would like to perform one action, then wait (say) 100ms, then perform another action.
Is such a thing possible within the scripting system? I can't fathom it.
Thanks
Chris
I checked out all the verbs in the VirtualDJ Script list, but could not find one that would delay for a certain time.
I would like to perform one action, then wait (say) 100ms, then perform another action.
Is such a thing possible within the scripting system? I can't fathom it.
Thanks
Chris
Posted Mon 01 Jul 13 @ 6:27 pm
The sort answer is it's not really possible. The long answer is...
This is as close as I have ever gotten with the problem. It logically makes sense but does not work.
down ? repeat 100ms & var_greater '$counter' 10 ? doSomething : cycle '$counter' 50 : stopSomething & set '$counter' 0
if you want to keep trying paste this into your skin file past the header to be updated on the value of the $counter variable on the skin. you might need to change the x and y values depending on the skin you use.
I just realised your a No Licence User... Disregard this, it is only available in the Pro version. I will leave it as it may be useful later.
This is as close as I have ever gotten with the problem. It logically makes sense but does not work.
down ? repeat 100ms & var_greater '$counter' 10 ? doSomething : cycle '$counter' 50 : stopSomething & set '$counter' 0
if you want to keep trying paste this into your skin file past the header to be updated on the value of the $counter variable on the skin. you might need to change the x and y values depending on the skin you use.
<textzone>
<size width="33" height="31"/>
<pos x="80" y="9"/>
<text font="Arial" size="24" color="#80FFFF" align="center" weight="bold" format="`get var '$counter'`"/>
</textzone>
I just realised your a No Licence User... Disregard this, it is only available in the Pro version. I will leave it as it may be useful later.
Posted Mon 01 Jul 13 @ 11:00 pm
Thanks for the reply - When you say it doesn't work, what does it actually do?
I was thinking of writing a macro to do a slow controlled fade - Something like.
Volume 90%
Wait 100ms
Volume 80%
Wait 100ms
Volume 70%
Wait 100ms
Volume 60%
Wait 100ms
Volume 50%
Wait 100ms
So the volume decreases (smoothly-ish) from full to 50% over half a second.
Chris
I was thinking of writing a macro to do a slow controlled fade - Something like.
Volume 90%
Wait 100ms
Volume 80%
Wait 100ms
Volume 70%
Wait 100ms
Volume 60%
Wait 100ms
Volume 50%
Wait 100ms
So the volume decreases (smoothly-ish) from full to 50% over half a second.
Chris
Posted Tue 02 Jul 13 @ 8:53 am
before you attempt to read the following check to see if mix_now is not what you are looking for, It will play the opposite deck and mix the crossfader over to the new song if not continue reading.
you could do what you want by simply making a midi button press repeat while held, and using the formula for speed 'velocity = distance / time' to calculate how much to change the volume for make it occur in 5 seconds. **this will not work on a keyboard**
I think you need to modify the formula a little to take into account the time between steps. you should find
velocity = 50% / 500ms
=0.1%
if you have a resolution of 1ms per move you could simply use that number,
repeat 1ms & volume -0,1%
that would be smooth as butter, if you want to have steps you can simply multiply the answer 0.1 by 100 to get the amount of steps between the start and the finish
repeat 100ms & volume -10%
you would need to make a condition to prevent the script going past 50%.. something like
repeat 100ms & volume & param_cast 'percentage' & param_smaller 51% ? nothing : volume -10%
What my script above is meant to do is repeat a script every 100ms while the button is held down, every time the script runs it will cycle a counter variable, when the variable gets above 9 it should fire the script. It is a simple 'for' loop in computer world, but unfortunately it doesn't work here.
you could do what you want by simply making a midi button press repeat while held, and using the formula for speed 'velocity = distance / time' to calculate how much to change the volume for make it occur in 5 seconds. **this will not work on a keyboard**
I think you need to modify the formula a little to take into account the time between steps. you should find
velocity = 50% / 500ms
=0.1%
if you have a resolution of 1ms per move you could simply use that number,
repeat 1ms & volume -0,1%
that would be smooth as butter, if you want to have steps you can simply multiply the answer 0.1 by 100 to get the amount of steps between the start and the finish
repeat 100ms & volume -10%
you would need to make a condition to prevent the script going past 50%.. something like
repeat 100ms & volume & param_cast 'percentage' & param_smaller 51% ? nothing : volume -10%
What my script above is meant to do is repeat a script every 100ms while the button is held down, every time the script runs it will cycle a counter variable, when the variable gets above 9 it should fire the script. It is a simple 'for' loop in computer world, but unfortunately it doesn't work here.
Posted Tue 02 Jul 13 @ 10:17 am