Quick Sign In:  

Forum: General Discussion

Topic: Repeat script question.

This topic is old and might contain outdated or incorrect information.

I searched high and low, I didn't see a solution or even a mention to my current quest.

I have a simple time-saver here; "repeat_start 'rfader' 150ms 200 & set $rfade 1 & deck right gain -0.25%"

What I am trying to do is change an LED color based on the status of 'rfader' - I figured I could manage this by setting a var and a simple condition. That itself works to change the color when I start the repeat. Although, I have yet to find a way to check if this has ended. A lot of controllers do this automatically behind the scenes. I made a test button in my skin to trigger the color change so I know the var trigger works properly.

What is the best method to either see if a specific repeat is active, or how to change a variable once a repeat has completed?

Cheers!
 

Posted Wed 07 Aug 19 @ 2:12 am
locoDogPRO InfinityModeratorMember since 2013
Well you've not toggled '$rfade ' back to zero on the last repeat, you could do this a good few ways but fortunately in this case you don't have to.
Just query the repeat_script :p

Led/padColor mapping : repeat_start 'rfader' ? color 'red : color 'blue'

Just incase you ever do need to do something only on the last repeat
repeat_start 'rfader' 150ms 200 & cycle '$rfade' 200 & deck right gain -0.25% & var '$rfade' 0 ? Script here for final run : nothing
 

Posted Wed 07 Aug 19 @ 2:53 am
Thanks Locodog! So we direct query the bool state of the repeat itself instead of trying to work some 'external' logic solution. I knew it was something simple since I couldn't find anyone trying to do this. Kinda sucks - I was overthinking since I know some programming languages.

I've tackled the two big ones for this mapping. The rest should be simple!

Cheers!

 

Posted Wed 07 Aug 19 @ 3:12 am


(Old topics and forums are automatically closed)