Blog
dance class
Mon 23 Jan 23 @ 1:08 am
Place this script on a custom buttonFill user 1 tag with desired pitch, if tag is blank it will assume natural pitch
Fill user 2 tag with desired fade point in seconds, if tag is blank it will assume your fadeat time
place songs in automix list but don't turn automix on
don't load a song just press the custom button
these FOUR set variables at the top are your only levers
the toggle $amIworking is there for visual
$fadeat is time to start fading (in seconds)
$fading is how long it fades to silence
$waiting is how long it waits to start playing the next track
$initialWait is how long it waits to play from the first press of the button [or restarting the mechanism]
the variable $fallbackFade [don't worry about it] is a holder of $fadeat time, as actual fade time could be from the tag.
when it reaches the bottom of automix it will play the last song then switch off,
if you add more songs before it switches off it will continue
if you ever error or have garbage tags, press the button to turn the thing off, fade down manually, unload the deck, press the button again and it should grab the next track in automix
THE SCRIPT
toggle $amIworking & set $fadeAt 180 & set $waiting 8 & set $fading 8 & set $initialWait 8 & set $fallbackFade $fadeAt &
( repeat_start 'pulsePitch' ? wait 100ms & repeat_stop 'rsWaiting' & repeat_stop rsInitialWait & set $amIworking 0 : ) &
( repeat_start 'pulsePitch' ? repeat_stop 'pulsePitch' : set $amIworking 1 & repeat_start 'pulsePitch' 100ms -1 & load_pulse ? : loaded ? level 1.0 & set $counter 0 & ( param_equal `get_loaded_song 'user 2'` "" ? set $fadeAt $fallbackFade & param_equal `get_loaded_song 'user 1'` "" ? pitch 100% : get_loaded_song 'user 1' & param_cast 'percentage' & pitch : set $fadeAt `get_loaded_song 'user 2' & param_cast 'integer'` & param_equal `get_loaded_song 'user 1'` "" ? pitch 100% : get_loaded_song 'user 1' & param_cast 'percentage' & pitch : ) &
set $done 0 &
repeat_start 'rsWatchTime' ? on & repeat_stop 'rsWatchTime' : off & level 1.0 & ( loaded !? playlist_load_and_remove : ) & repeat_start rsInitialWait `param_multiply 'get_var $initialWait' 1000` 1 & play &
repeat_start 'rsWatchTime' 500ms -1 & toggle $amIworking & ( param_equal `file_count automix` 0 ? set $done 1 : set $done 0 ) &
repeat_start 'rsfading' ? : repeat_start 'rsWaiting' ? :
param_smaller `get_time total 1000` `param_add "param_multiply 'get_var $fadeAt' 1000" "param_multiply 'get_var $fading' 1000"` ?
param_bigger `get_time elapsed 1` `get_var $fadeAt` ? :
repeat_start 'rsfading' `get_var $fading & param_multiply 10` 100 & level -0.01 & level 0 ? repeat_stop 'rsfading' & stop & var $done 1 ? repeat_stop 'pulsePitch' & repeat_stop 'rsWatchTime' & unload & set $amIworking 0 & level 1.0 : playlist_load_and_remove &
repeat_start 'rsWaiting' `get_var $waiting & param_multiply 1000` 1 & play : :
param_smaller `param_add "get_time total 1000" "param_multiply 'get_var $fading' -1020"` `param_add "get_time elapsed 1000" 500` ? :
repeat_start 'rsfading' `get_var $fading & param_multiply 10` 100 & cycle $counter 100 & var $counter 0 ? repeat_stop 'rsfading' & stop & var $done 1 ? repeat_stop 'pulsePitch' & repeat_stop 'rsWatchTime' & unload & set $amIworking 0 & level 1.0 : playlist_load_and_remove &
repeat_start 'rsWaiting' `get_var $waiting & param_multiply 1000` 1 & play : :






