Happy Spring everybody. Given the season I guess,

Happy Spring everybody. Given the season I guess, I’ve been working on a new idea called “rain” (gist link below). It’s unfinished but well commented. Really only a dozen or so lines of code, but I think it has a lot of potential. The HSV blurring looks pretty nice, but I’m still working on adding a more natural feel to the rain. Specifically a more natural/sporadic rhythm, less-random placement of drops, and “easing in” to each drop. I elaborate on each of these in the code comments. Right now the effect creates flashes of light in the room which goes against the relaxing look of the effect… Feel free to shout out any suggestions, and I’ll upload any code updates to the comments below :smiley:

https://gist.github.com/drewandre/7799e5f107ead4275741f905210f8c14

I’ve been thinking of some way of fading in, spreading and fading out and this seems like a much simpler way of doing that as opposed to using sine waves as I’m wont to do. Thanks!

Update: Yep, a few modifications and it’s looking good (slowing it down and just lighting up 1 or 2 pixels at a time and blur only). Now I just need to add some sound reactive code to it!

Really cool, man!!! As soon as I have a chance I’ll have a look at those exquisite lines of code

@Drew_Andre
Nice one.
To make EVERY_N more variable, maybe try some of Marc Miller’s code - particularly the setperiod() and reset() bits.

If you use EVERY_N_MILLIS_I() then you can randomly set the time between drops. Search this forum for how to use it, don’t forget the ‘I’

Why not do something similar to the addGlitter function in the DemoReel example code to randomly generate your drops and forget about having to use the timer altogether? That’s what I do to create the lightning effect on my rain array and it works quite well.

My new sound reactive version works quite nicely. A ‘peak’ triggers a drop. The volume of that peak is proportional to the size and intensity of the initial drop. A volume control adjusts sensitivity.

Anyone have any thoughts on how to slowly introduce each new drop to the strip, as opposed to each drop appearing at full brightness/color? I mean, not a huge deal but like I said, it makes harsh flashes in the room. May not look like in this video because I had the room lights on, but in the dark, this effect is a little… intrusive. I’m really only looking for, say, 10ms of fading into each drop. I think that would make a huge difference in the overall feel.

I was thinking you’d 1) store the last few drops in a few arrays of LED indices, 2) slowly draw the previous arrays over milliseconds…

But I really don’t have a single clue how to implement this. Maybe it requires a completely different approach to this sort of 2D rain effect.

@Jeremy_Spencer and @matt_p thank you both for the notes. I didn’t know there were variations of EVERY_N… I’ll definitely try both of those variations out. Same to @Brian_Lewis - I’ll give that a shot. I’m away from this project for about a week so I’ll report back this weekend!

@Andrew_Tuline I had a very similar approach to introducing audio reactivity on this effect. I have plenty of audio reactive effects though… my personal opinion on this is that if I add any audio reactivity, I’d like it to be subtle for this specific function. By all means, make that bass rain.

I do a lot of fading up and then down and vice versa. You can control the delay between each step of fading to achieve a fast fade in and a slow fade out. The way I do it requires 2 addtional queues, one for Hue and one for Brightness.

I will add that I also use a bunch of timers. One for the pattern, one for the fade, one for modifying the pattern, and sometimes more depending on what I am changing.

@Drew_Andre - Would love to see your audio reactive effects in action, along with the code if possible.

Enchanting effect already! Thanks for sharing it.