r/FastLED • u/StefanPetrick • Mar 08 '26
Quasi-related I used Codex for the first time
Yesterday I played with Codex for the first time. I didn't write a single line of code; I just explained step by step what needs to happen. I was impressed and surprised to see it working within half an hour. Vibecoding has come a long way! To be honest, I didn't even look at the code once.
It is basically a recreation of the Noise Smearing demo I wrote 11 years ago: https://www.youtube.com/watch?v=QmkCvihs0wo. I wonder if we should rename this to something more compelling...
This current prototype was written in Python in order to test it immediately — I assume with current AI tools it shouldn't be too difficult to refactor it in C++. If anyone is interested in doing so, DM me; I'm happy to provide the code and explanation if needed.
Actually, this should be a perfect use case for the new fixed-point data types.
Please note that this concept, as it is, is framerate-dependent. Instead of drawing every new frame from scratch, it manipulates and dims the previous frame a little and draws only the emitter (in the demo the 3 orbiting circles, but it could be anything) anew. So the length of the tail depends on the framerate — and it can be adjusted by the dim factor between the frames.
I'm happy to collaborate with anyone willing to make this effect accessible to FastLED users.
3
u/StefanPetrick Mar 08 '26
Here the code: https://www.dropbox.com/scl/fi/ycgaywcsnka95tu90n3y3/Archiv.zip?rlkey=q9xiojccc9c3xastkce5pd3mj&st=w7rm6vu5&dl=0
2
u/StefanPetrick Mar 08 '26
This could be used to animate previously static gfx as well: https://youtu.be/WEYOP9S4hxY
3
u/mindful_stone Mar 08 '26
That's very cool u/StefanPetrick. I will definitely take a look and see if I can get a C++/FastLED-friendly implementation going!
2
u/ZachVorhies Zach Vorhies Mar 08 '26
Can you explain the graphs. I see they are noise generations, but I'm not sure exactly how the map to the presentation.
2
u/mindful_stone Mar 08 '26
I got a quick port of it going in c++: https://youtu.be/ezTDJNxN1A8
It's running at 44FPS on an ESP32-S3 on a 32x48 display. I'll add it as a program in my AuroraPortal playground so I can enable some Web BLE UI run-time parameter control (and perhaps audio enable it) and really take it for a spin!
2
u/mindful_stone Mar 09 '26
Oh, u/StefanPetrick, if it wasn't for the genius of AnimARTrix, I'd say you've outdone yourself. But what you just unleashed is a whole different world of fun:
https://youtube.com/watch?v=qczTTGWb2Yo&si=_tF3mM-Elgx1ZtLd
The video reflects (1) a Claude-assisted port of your visualizer into a FastLED/Arduino-friendly C++ sketch; and (2) the addition of that sketch as a program/visualizer in my AuroraPortal playground.
With Claude's help, I identified several parameters that would be the most impactful/interesting as far as manipulating the visual output, and I added some runtime UI controls, which you can see me playing around with in the video..
Although I kept the background music in the video for "ambience", this is not an audio-enabled animation. But I could easily audio-enable it in a matter of minutes, and will no doubt do so in short order!
1
u/StefanPetrick Mar 08 '26
This effect could be applied to any existing animation that only draws to parts of the screen buffer.
But instead of clearing the screen buffer for each new frame, the previous one gets modified, and only the new parts get rewritten. In other words — it works on animations that leave parts of the LEDs black.
Like, for example, u/sutaburosu’s latest amazing demo.
1
u/Full-Perception-5674 Mar 08 '26
So seeing a ton of these programs. Do any just run? No manual labor, no person physically being involved? Can I set disconnect and go on with life for years?
1
u/Actual-Wave-1959 Mar 08 '26 edited Mar 09 '26
Really cool, I've been working with different AI tools to try to build an LED shader recently. Still very much a work in progress but I'm always looking for new animation types for inspiration 🙂 I want to eventually build a hardware remote to control the different parameters.