Spinning Style that Slows Down on Retraction Help

I have a saber with a circular LED strip that has a spinning style using CircularSectionF / Saw when the blade’s on spinning at 160 RPM.

I’d like to make this slow down and eventually stop when the blade retracts, so the style would change from 160 RPM to (for example) 140, 120, 100 etc. until it reaches 0. Is there a way to do this?

Here’s the current style I’m using, though I guess the only relevant bit would be the CircularSectionF part.

Layers<
Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,Black,RgbArg<BASE_COLOR_ARG,Red>>,
TransitionEffectL<TrConcat<TrJoin<TrDelay<30>,TrInstant>,RgbArg<CLASH_COLOR_ARG,Black>,TrFade<300>>,EFFECT_CLASH>,
LockupTrL<AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Black>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Black>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Black>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,
LockupTrL<Strobe<RgbArg<LB_COLOR_ARG,White>,AudioFlicker<RgbArg<LB_COLOR_ARG,White>,Black>,50,1>,TrInstant,TrFade<1000>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,
InOutTrL<TrConcat<TrFade<500>,RgbArg<BASE_COLOR_ARG,Red>,TrFade<500>,Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,RgbArg<BASE_COLOR_ARG,Red>,White>,TrFade<1000>>,TrFade<500>>>

Thanks

Edit: Including the Sin function seems to come close, but it doesn’t always start at the beginning (fastest speed):

Mix<CircularSectionF<Saw<Sin<Int<10>,Int<160>>>,Int<3300>>,Black,RgbArg<BASE_COLOR_ARG,Red>>

Full style with above code included in the InOutTrL section:

Layers<
Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,Black,RgbArg<BASE_COLOR_ARG,Red>>,
TransitionEffectL<TrConcat<TrJoin<TrDelay<30>,TrInstant>,RgbArg<CLASH_COLOR_ARG,Black>,TrFade<300>>,EFFECT_CLASH>,
LockupTrL<AudioFlickerL<RgbArg<LOCKUP_COLOR_ARG,Black>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Black>,TrFade<300>>,TrConcat<TrInstant,RgbArg<LOCKUP_COLOR_ARG,Black>,TrFade<400>>,SaberBase::LOCKUP_NORMAL>,
LockupTrL<Strobe<RgbArg<LB_COLOR_ARG,White>,AudioFlicker<RgbArg<LB_COLOR_ARG,White>,Black>,50,1>,TrInstant,TrFade<1000>,SaberBase::LOCKUP_LIGHTNING_BLOCK>,
InOutTrL<TrConcat<TrFade<500>,RgbArg<BASE_COLOR_ARG,Red>,TrFade<500>,Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,RgbArg<BASE_COLOR_ARG,Red>,White>,TrFade<1000>>,TrConcat<TrInstant,Mix<CircularSectionF<Saw<Sin<Int<10>,Int<160>>>,Int<3300>>,Black,RgbArg<BASE_COLOR_ARG,Red>>,TrFade<4000>>>>

Just use ColorCycle<> it already does what you’re looking for ;-). Set the Off speed to 0, set the On speed to whatever you want, then set the time to transition to how long you want it to take to slow down to 0 on Retraction. it will also keep it’s place when turning on/off.

Example:
https://fredrik.hubbe.net/lightsaber/style_editor_beta.html?S=ColorCycle<Blue%2C0%2C1%2CBlue%2C100%2C3000%2C5000>

Oh man, that’s so simple! It works perfectly!

I had a slightly different style setup on ignition where the whole strip would ignite as the Base Colour with a white spinny bit, then would fade out to the main style (black strip with Base Colour spinny bit).

Layers<
Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,Black,RgbArg<BASE_COLOR_ARG,Red>>,
InOutTrL<TrConcat<TrFade<500>,RgbArg<BASE_COLOR_ARG,Red>,TrFade<500>,Mix<CircularSectionF<Saw<Int<160>>,Int<3300>>,RgbArg<BASE_COLOR_ARG,Red>,White>,TrFade<1000>>,TrFade<500>>>

I can’t seem to make the In-Out transition work using ColorCycle as the way ColorCycle gets the spinning effect is to only light up a portion of the blade at once, which doesn’t work if I want the whole blade to be Red with a spinning White section. Is there a way to do this?

I can just leave the In-Out transition as it is since it does work, but it doesn’t smoothly transition into the main ColorCycle which can look a bit odd sometimes!

I wouldn’t use an InOutTrL with ColorCycle for what you’re after. If you want a specific transition set it up as a TransitionEffectL<> for EFFECT_IGNITION if you want something special to happen on ignition.

Edit: can’t recall if we can get a Base Color under ColorCycle, I “thought” there was a way but I’m forgetting need to look through some of the code. You can set a ColorCycle in a Transition with a different color and have it fade, but I am fuzzy on the background color in place of Black, will have to get back to you on that.

Update, you can do a Base Color in ColorCycle, the Editor wasn’t updated to show this but it SHOULD run on the blade in OS7. In the OS it’s the last argument, it defaults to Black.

Layers<
  ColorCycle<Blue,10,0,Blue,10,160,2000>,
  TransitionEffectL<TrConcat<TrExtend<2000,TrFade<500>>,
    ColorCycle<White,10,0,White,10,160,2000,Blue>,TrFade<1000>>,EFFECT_IGNITION>>

Oh nice! That’s working perfectly. Thanks so much for all your help!

You’re welcome, enjoy.