Blade Style Help for 6 LED Pixel Switch

I’ve recently received a saber with a Pixel Switch and I’ve been having fun playing with that and building styles for it. I have no coding background, so my method for this is basically to keep poking and trying things until they work without entirely knowing what I’m doing!

Blade styles Pastebin

For the most part I’ve gotten them working by using TrConcat to build the sequence I want, but I haven’t managed to figure out everything and have a couple of questions.

Are there ways to replicate the styles using a simpler method? One thing I would like to keep is the starting point for the styles, as that is the top LED for the switch.

Is the a way to create a style like the Build style that has different colours for each segment? What I would like is a style where I can say:
Light up Section 1
AND
Light up Section 2
AND
Light up Section 3
etc.

So that I can control each segment individually, but TrConcat only seems to allow Argument 1 THEN Argument 2 etc. and what I’ve had to do is this:

Light up Section 1
THEN
Light up Section = (1+2)
THEN
Light up Section = (1+2+3)
etc.

Which means when the style moves onto Section 3, it’s done as a single block that encompasses the area of Sections 1-3, so I can only change the colour for all of it rather than each section individually. I’d like to be able to make a style where I could light up each section additively, but have them be, for example:
Section 1: Red
Section 2: Orange
Section 3: Yellow
Section 4: Green
Section 5: Blue
Section 6: Purple

I hope that makes some sort of sense! Any help would be appreciated.

Maybe, but it’s usually easier to start with a description or a video than a blade style, as it can be hard to figure out what a blade style will look like, or what the original intent was.

Well, you can use Gradient<> with 6 arguments, but that might not be what you want either, because now you have to have 6 sequences of transitions. (one for each LED.)

However, if all you want is to just have the lights come on one at a time, then all you need is a TrWipeIn<1000> where the transition target (or the layer underneath) is a Gradient<Red, Orange, Yellow, Green, Blue, Purple>.

Well, you can use Gradient<> with 6 arguments, but that might not be what you want either, because now you have to have 6 sequences of transitions. (one for each LED.)

However, if all you want is to just have the lights come on one at a time, then all you need is a TrWipeIn<1000> where the transition target (or the layer underneath) is a Gradient<Red, Orange, Yellow, Green, Blue, Purple>.

Thanks! I did look at Gradient a while ago but didn’t think it would work - I must have been going off how it looked in the Style Editor (which shows a full blade with many more pixels) and figured the colours wouldn’t be right on a 6 pixel switch due to the blending, but I was wrong and it works perfectly!

I had a look at TrWipeIn as well, but because the first pixel I want to light up isn’t at the base or tip of the blade I couldn’t get that to work. Is there a way to offset the start or finish point for TrWipeIn?

I’ve taken some videos of the blade style, which I’ve mirrored on both the switch and the blade so it’s clear what’s happening. The Blink video turned out super blurry and I didn’t realise until I’d uploaded it, but it should still be possible to see what’s going on from the main blade? I’ve uploaded the config as well.

Remap<> should be able to do it.
Maybe something like:

Remap<ModF<Sum<RampF, Int<5461>>, Int<32768>>, YOUR_STYLE_HERE>

Replace 5461 with 32768 * offset / 6, where “offset” is how many leds you want to shift it over.

That’s exactly what I needed, thank you! I’ve managed to create some simpler (or at least shorter) bladestyles for all the variants I was playing with. I’ll link them on the off chance someone comes across this looking for blade styles for a KR pixelswitch.