tlc5940 + fading

hey Everyone

I hope you can help me with this project. i am trying to fade a multiple LED's ( 48 leds - connecting 3 tlc5940 togheter ) i want them to fade one at a time, in a random order, so at any given time only one led is on.

i tried to write a code, but i am still not sure how to do it, ( a newbe in programing ) .. please anyhelp is appreciated.

#include "Tlc5940.h"
#include "tlc_fades.h"

void setup()
{
  Tlc.init();
}

void loop()
{
  if (tlc_fadeBufferSize < 23) {
    if (!tlc_isFading(random(16))) {
      uint16_t duration = analogRead(0) * 2;
      int maxValue = analogRead(0) * 2;
      uint32_t startMillis = millis() + 50;
      uint32_t endMillis = startMillis + duration;
      tlc_addFade(random(16), 0, maxValue, startMillis, endMillis);
      tlc_addFade(random(16), maxValue, 0, endMillis, endMillis + duration);
    }
   
  tlc_updateFades();
  }
}