ShiftPWM for single color LEDs

I'm looking for ways to adapt Elco Jacobs' ShiftPWM Non-Blocking for single color fades. The end goal is to have a fade spread across several leds (of a single colour) rather than fade in one by one.

Eventually, I'd like to be able to address the particular order of leds to fade in/out through an array but this is another matter.

I've looked through the CShiftPWM.cpp and found the code below. Is there a way I could adjust this code and embedded within a sketch to work for a single color - a wide fade over several leds? I'm getting a bit lost in the code here.

If not this, any suggestions on an alternative?

Bringing in the array for specific leds will be the next issue.

Hardware in use: four x ... 32 channel MOSFET boards, P-channel MOSFET board - Other Hardware Development - Arduino Forum which has worked great for other projects. See here: CAFKA.18: Negotiating +/- by Marcia Huyer - YouTube

For this project a total of 16 shift registers

void CShiftPWM::SetHSV(int led, unsigned int hue, unsigned int sat, unsigned int val, int offset){
	unsigned char r=0,g=0,b=0;
	unsigned int H_accent = hue/60;
	unsigned int bottom = ((255 - sat) * val)>>8;
	unsigned int top = val;
	unsigned char rising  = ((top-bottom)  *(hue%60   )  )  /  60  +  bottom;
	unsigned char falling = ((top-bottom)  *(60-hue%60)  )  /  60  +  bottom;

	switch(H_accent) {
	case 0:
		r = top;
		g = rising;
		b = bottom;
		break;

	case 1:
		r = falling;
		g = top;
		b = bottom;
		break;

	case 2:
		r = bottom;
		g = top;
		b = rising;
		break;

	case 3:
		r = bottom;
		g = falling;
		b = top;
		break;

	case 4:
		r = rising;
		g = bottom;
		b = top;
		break;

	case 5:
		r = top;
		g = bottom;
		b = falling;
		break;
	}
	SetRGB(led,r,g,b,offset);
}

Thanks!!

If what you want to do is to have several LEDs fade up or down at the same rate then put their pin numbers in an array and iterate through it setting each pin to the same PWM value then wait {*} a while before doing it again.

If that is not what you want to do then please explain in more detail.

(*) The smart way to implement the wait is to use millis() for timing so that the program can do other things during the fade.