Does anyone know how to (or if you can) increase the frequency of the

Does anyone know how to (or if you can) increase the frequency of the LEDs lighting up for @Mark_Kriegsman 's applause effect. It looks great on short strips, but when I run it on my outdoor strips (set for 300 LEDs each) they seem very sparse.

void applause()
{
static uint16_t lastPixel = 0;
fadeToBlackBy( leds, NUM_LEDS, 32);
leds[lastPixel] = CHSV(random8(HUE_BLUE,HUE_PURPLE),255,255);
lastPixel = random16(NUM_LEDS);
leds[lastPixel] = CRGB::White;
}

Thank you!

Maybe just call this function more than once, perhaps several times, before FastLED.show()?

I’m using it as part of the Timed Playlist code. I’ll try doubling or
tripling it within it’s own void. Don’t think it’ll work… but costs
nothing to try!

EDIT: “kind of” of worked, but I messed up the playlist’s ability to play somehow. Hooray for backups!

Will try the suggestion below next!

Tested on a strip of 60 vs 300 APA102 LED’s and the frame rate went from 460 to 100 fps. Instead of just calling:

applause();

in your main loop, try:

for (int i=1; i<20; i++) { applause(); }

Now, you get 20 changes per FastLED.show instead of a single one.

I just tried putting everything that’s currently in the applause function into a for loop. Have it loop 8x or so you’ll have lots of sparkles again.

void applause()
{
for (uint8_t i=0; i<8; i++) {
//put previous stuff here
}
}

I noticed calling mutiple times cause it to loose a bit of the nice smoother fade out though, so if you run it multiple times before calling show, you might also want to reduce the fadeToBlackby amount from 32 down to 4 or something.

Thanks @marmil ! Had another problem crop up… one of the effects I took from someone else has started causing problems, and I can’t figure out why. Will deal with that then try to implement your suggestion. I can’t really see where it could fit in the void loop though (for the Timed Playlist).

Also noticed the sketch sets the frame rate at 120 frames per second. Would changing or deleting frame rate help the speed of effects?

Have you spoken with the person that the effect from?

Thanks for all the advice and tips everyone! I think part of the problem
is I’m trying to go from crawling with code to running – and that’s not
fair to everyone willing to help, or my learning curve. For now, I’m going
with a simpler sketch and effects and add other ones as I learn and
understand them.

Thanks again!

@allanGEE - You might want to look at the following post on TimePerformance code by @Mark_Kriegsman :

https://plus.google.com/112916219338292742137/posts/TVzTPbnJNE7

Also look at a couple of my sketches in GitHub that use the TimePerformance code: