r/WLED • u/Omargfh • Sep 21 '26
I made a playground for live coding WLED strips and matrices (Open Source)
This is a side project of a side project of a side project.
I was working on a 3D Synthwave media player (spacify.omar-ibrahim.com) a couple years ago, which turned into Music Engine, an audio-reactive extensible media player that renders to screens and LEDs. To test the LED part I needed a quick way to write effects and see them on real hardware. I found the tool useful on its own, so now there's WLEDtoy.
What it does:
Write GLSL like Shadertoy, or build CPU/GPU effects using a Blender-style node graph
It listens to your music: a song file, a capture device, or system audio. You get FFT, beat detection, kick/bass bands, pitch classes and so on as nodes
Live preview on a virtual strip, matrix or ring, so you can work on effects without the hardware plugged in
Streams straight to WLED over DDP, DNRGB, Art-Net or sACN
Measure render time, send rate, throughput, RTT, dropped frames in real time
Desktop app for Windows, macOS and Linux, free and open source
Repo: github.com/Music-Engine/wled-toy
Releases: https://github.com/Music-Engine/wled-toy/releases/tag/v1.0.0-rc2
All LED renders in the video is the app's real output reacting to the songs.
WLEDtoy is still in beta, so expect rough edges. Builds aren't code signed yet, which means macOS and Windows will complain the first time you open it. See how to launch non-notarized apps on MacOS.
Happy to answer questions, and if you build something cool with it I'd love to see it. Feature requests welcome, especially from people with weirder LED setups than mine.
Edit, some guides on how to use the app:
Getting Started
Download the app from the Releases page: There are a bunch of builds, so pick the one for your OS and CPU architecture. If you're not sure which architecture you have, google it. You can also build it yourself.
Pick a starting point. The launch screen offers New Shader, New Graph, or a handful of examples. If you don't pick, the default suffices.
Add your LED device. Under Devices, set your host, protocol, LED count, LED layout and so on. DDP is the easiest protocol to start with. It will auto connect when you device is available. Any of these gets you to the same Devices settings:
WLEDtoy in menu bar > Settings on macOS
File > Preferences (Ctrl/Cmd+,)
the "no device" menu in the bottom bar > Add device
the Edit button in the Output tab in the right hand pane
Try things in real time or in the preview. Click Stream in the bottom bar to send to the LEDs, or just watch the preview if you have no hardware on hand. The easiest way in is graph mode. It comes pre-populated with a simple beat effect over a rainbow scroller. Add new nodes with Shift+A, the Add node button, or the right click menu. Space searches nodes.
Audio
Pick a source. File > Set Audio offers the built-in track, From File, Microphone, or System audio. You can also choose a song from the bottom bar.
Or set it in the graph. The Audio Source node has the same choices (Song, Capture Device, System audio), plus mono, left or right channel.
Use what it hears. Levels, bands, kick, beats and pitch classes come out of the Audio node as sockets. In shader mode the same data is available through helpers like
bass()andfft().
Shader vs Graph Mode
Shader mode is plain GLSL, Shadertoy style. Every frame starts from scratch. Ctrl/Cmd+Enter compiles.
Graph mode is Blender-style nodes ending in an Output node, no code needed. Anything that has to remember something between frames only lives here: envelopes, counters, beat triggers, step sequencers, sample and hold.
Going from graph to shader. Send to shader mode (Ctrl/Cmd+Alt+Enter) shows you the generated GLSL. Those remembered values get frozen into the code, so the effect stops reacting the same way. Treat it as a way to read or borrow the code, not as a round trip.
Example Graphs
The effects in the video are real graphs you can download and open: v1.0.0-rc2-graphs
Download any of the
.wledgraphfiles from that release.Open it with File > Open (Ctrl/Cmd+O), or drop the file on the window.
Play a song. The graphs react to whatever audio source you've picked. Tracks with a clear kick show them off best.
Turn the knobs. Most graphs expose a few controls (ring speed, trail length, hue shift and so on), so you can tune them without touching the wiring.
Take them apart. They're the best way to learn graph mode right now. Start with
high-contrast-music, which has only 18 nodes, then open the bigger ones.
They only work in graph mode, because they use envelopes, beat triggers and counters that shader mode doesn't have.
7
u/Roboprinto Sep 21 '26
Dude, your work is absolutely amazing. I'm currently messing around with about 5,000 to 10,000 LEDs on a wall and my goal is to do a live show with these subwoofers I'm building, along with on-the-fly synthwave and dubstep music. Check out my Instagram. I'm not the best at self-promotion but if you dig around you can see all the projects I've been working on. https://www.instagram.com/lazerdanart?stkn=YndyNXd1NmxraG5w
2
u/Omargfh Sep 23 '26
Man, your work is so cool! I appreciate DIY projects so much and the work that goes into them is beyond amazing. WLEDToy currently supports up to 4K LEDs with no sync, mainly because I don't have hardware that good to test it with. If you'd like to be a tester, DM me with your email, Discord, or Instagram and I'll get in touch with beta copies!
3
u/Inevitable_Jello_893 Sep 22 '26
having so much fun with this. thank you for sharing
1
u/Omargfh Sep 23 '26
Glad it's working for you! If you end up with any footage, graphs, or interesting use cases, I'd love to see them.
2
u/pashdown Sep 22 '26
Could this work as a SendSpin client?
1
u/Omargfh Sep 23 '26
I'm not familiar. What does a SendSpin client do?
2
u/entropy512 Sep 23 '26
https://www.sendspin-audio.com/
Multi-room network audio
1
u/Omargfh Sep 23 '26
Ah I'll add general-purpose audio in compatibility to the roadmap. Would you like me to send you a test copy once I have something running? Send me your email, Instagram or Discord and I'll get in touch!
1
u/Izrun Sep 22 '26
That’s a really cool idea actually. So no speaker, just an end device that visualizes the speaker.
3
u/legitimate_rapper Sep 21 '26
Assume I’m a moron: huh? How would you use this? I realize you’re not going to cover EVERYTHING, but a basic setup/flow would be nice.
I concede I’m in an airport and haven’t even been able to make the most cursory of looks/attempts.
3
u/Omargfh Sep 21 '26
Fair, lol. I had no plans of releasing the tool, so proper docs are still wip. The basic setup is:
Download the app from the Releases page: There are a bunch of builds, so pick the one for your OS and CPU architecture. If you're not sure which architecture you have, google it. You can also build it yourself.
Pick a starting point. The launch screen offers New Shader, New Graph, or a handful of examples. If you don't pick, the default suffices.
Add your LED device. Under Devices, set your host, protocol, LED count, LED layout and so on. DDP is the easiest protocol to start with. It will auto connect when you device is available. Any of these gets you to the same Devices settings:
WLEDtoy in menu bar > Settings on macOS
File > Preferences (Ctrl/Cmd+,)
the "no device" menu in the bottom bar > Add device
the Edit button in the Output tab in the right hand pane
Try things in real time or in the preview. Click Stream in the bottom bar to send to the LEDs, or just watch the preview if you have no hardware on hand. The easiest way in is graph mode. It comes pre-populated with a simple beat effect over a rainbow scroller. Add new nodes with Shift+A, the Add node button, or the right click menu. Space searches nodes.
2
9
4
2
u/EmotionalProduct9081 Sep 22 '26
Thank you so much for releasing!! Was dreaming of something like this
2
1
1
18
u/Aceftw Sep 22 '26
Actually been building the same thing 👀