Connexion rapide:  

Forum: VirtualDJ Technical Support

Sujet Automix and Action points
I was looking for a way to program fade outs in my tracks and incorporate the "fixed" track in Automix.

I found this POI which works on the track
repeat_start_instant 'fadeout' 200ms 20 & level -5% & level 0% ? goto 100%

The track fades out as expected and then jumps to the end but Automix doesn't start the next track - instead it jumps to the end of the playlist.

So then I added code to kill the repeat which stopped it jumping through the rest of the Automix list, but the volume was still low. I've tried to add code to remember the level at the start and set it back for the next track, but it doesn't work.

set 'mylevel' get_level & repeat_start 'fadeout' 200ms 20 & level -5% & level 0% ? repeat_stop 'fadeout' & level 'mylevel' & mix_selected

What am I doing wrong?



 

Posté Sun 14 May 23 @ 11:20 am
Found another post on setting levels using a variable which helps a little - now if I specifically set a variable I can use it.

set_var '%test' 0.5 &
get_var '%test' & param_cast float & level

But if I try to set %test using the current level, I can't get this to work:
set_var '%test' get_level & param_cast float &
get_var '%test' & param_cast float & level

This drops the level to 0 as though %test had no value.

 

Posté Sun 14 May 23 @ 12:33 pm
locoDogPRO InfinityModeratorMember since 2013
if you're using an action as a value, wrap action in ` `

set thing `get_level`
 

Posté Sun 14 May 23 @ 12:35 pm
Thank you but still doesn't seem to work:

set_var %test 'get_level' & param_cast float &
repeat_start 'fadeout' 200ms 20 & level -5% &
level 0% ?
repeat_stop 'fadeout' &
get_var %test & param_cast & level

The fadeout occurs, but the volume is not reset at the end.

Oops - hadn't realised that ' and ` were different!

OK - a little progress - the volume is now set, but to about 1/4 of what it was before.
 

Posté Sun 14 May 23 @ 12:49 pm
You need `` not ''

`get_level`
 

Posté Sun 14 May 23 @ 12:52 pm
Adding var_list to the script just after %test has been read, shows it to have a value of 0.151, regardless of what level I set the deck slider to.
I changed `get_level` to `get_volume` but left the rest the same and now it works as expected.

Many thanks for the assistance - not sure I fully understand what the difference between volume and level is here, but it seems to work OK now.
 

Posté Sun 14 May 23 @ 1:06 pm
get_level is the current Level (VU Meter) and not the Fader position. Use volume

set %test `volume` & 
repeat_start 'fadeout' 200ms 20 & volume -5% &
volume 0% ?
repeat_stop 'fadeout' &
get_var %test & param_cast 'integer' & volume

 

Posté Sun 14 May 23 @ 1:10 pm
Quick question before I post another block of code - how do you indicate it's code so that the forum formats it?

My full script is now:

set_var %test `volume` & var_list &
repeat_start 'fadeout' 200ms 20 & level -5% &
level 0% ?
repeat_stop 'fadeout' & pause &
get_var %test & param_cast float & volume &
automix_skip

Slight issue in that automix is slower than the volume reset, so I get half a second of the track I've just faded at full volume before the new track kicks in. So I swapped the automix_skip for goto 100%- this worked better, but there was an audible noise - a kind of "phut" sound just before the new track starts playing. This seemed to be the goto command because I get it if say goto 98% instead.
So I swapped back to using automix_skip, but added a pause - this now works perfectly.


Many thanks for all the assistance!
 

Posté Sun 14 May 23 @ 1:32 pm
for insert codes:

why have you var_list in your script?

you can also use wait 500ms for waiting.
example:


repeat_stop 'fadeout' & pause & wait 500ms &
get_var %test & param_cast float & volume &


 

Posté Sun 14 May 23 @ 1:47 pm
Oh strange - my view doesn't look anything like that - I just have the text box and a Save button underneath. The [code] tags don't work either - I guess my forum account is limited as I'm currently on the free license.
Ah - the var_list was for debugging - forgot to remove thanks!

 

Posté Sun 14 May 23 @ 2:00 pm