A real-time music visualizer for Nanoleaf devices (Shapes, Canvas, Elements, and Light Panels). Audioleaf listens to your system audio, analyzes it, and drives your Nanoleaf panels with reactive color animations — all rendered in a graphical window that mirrors your physical panel layout.
Note: This is a fork with macOS compatibility fixes, a graphical UI, album art integration, and support for all Nanoleaf device types. See CHANGELOG.md for details.
- Real-time audio visualization — Three effects (Spectrum, Energy Wave, Pulse) that react to your music
- Graphical panel preview — See your exact Nanoleaf layout rendered on screen with live color preview
- Album art integration — Automatically extract color palettes from the currently playing track's album artwork (Spotify & Apple Music)
- 11 built-in color palettes — From ocean-nightclub to neon-rainbow, plus custom RGB palettes
- Panel sorting controls — Adjust how colors map to your physical layout
- Cross-platform — macOS and Linux
Install from cargo:
cargo install audioleafMake sure $HOME/.cargo/bin is in your $PATH.
For Arch-based distros, audioleaf is also available in the AUR:
yay -S audioleafAt first launch, audioleaf discovers Nanoleaf devices on your local network:
audioleaf -nThis will:
- Scan your network for Nanoleaf devices
- Display discovered devices
- Prompt you to put your device in pairing mode (hold power button until LEDs flash)
- Save the device configuration
Device data location:
- macOS:
~/Library/Application Support/audioleaf/nl_devices.toml - Linux:
~/.config/audioleaf/nl_devices.toml - Custom: Use
--devices /path/to/devices.toml
After setup, simply run:
audioleafTo connect to a specific device:
audioleaf -d "Shapes AC01"Press ? in the app to see all keybinds.
| Key | Action |
|---|---|
| Esc / Q | Quit |
| ? | Toggle help overlay |
| Space | Toggle live panel color preview |
| - / + | Decrease / increase gain (visual sensitivity) |
| 1-9, 0 | Switch color palette |
| E | Cycle effect: Spectrum / Energy Wave / Pulse |
| A | Toggle primary sort axis (X / Y) |
| P | Toggle primary sort (Asc / Desc) |
| S | Toggle secondary sort (Asc / Desc) |
| N | Use album art colors from current track |
| R | Reset all panels to black |
- Spectrum — Each panel tracks a frequency band. Bass on one end, treble on the other.
- Energy Wave — Audio energy cascades across panels as a traveling ripple.
- Pulse — All panels pulse together, driven by audio transients. Snaps to the beat.
Configuration lives in config.toml:
- macOS:
~/Library/Application Support/audioleaf/config.toml - Linux:
~/.config/audioleaf/config.toml - Custom: Use
--config /path/to/config.toml
A default config file is generated on first launch.
default_nl_device_name = "Shapes AC01"
[visualizer_config]
# Audio input device (see Audio Setup below)
audio_backend = "BlackHole 2ch"
# Frequency range to visualize [min_hz, max_hz]
freq_range = [20, 4500]
# Color palette — named palette or custom RGB array
# Named: "ocean-nightclub", "sunset", "fire", "forest", "neon-rainbow", etc.
colors = "ocean-nightclub"
# Or custom RGB: colors = [[255, 0, 128], [0, 128, 255], [128, 255, 0]]
# Audio sensitivity (doesn't affect playback volume)
default_gain = 1.0
# Panel transition speed in 100ms units (2 = 200ms)
transition_time = 2
# Audio sampling window in seconds
time_window = 0.1875
# Panel sorting
primary_axis = "Y" # "X" or "Y"
sort_primary = "Asc" # "Asc" or "Desc"
sort_secondary = "Asc" # "Asc" or "Desc"
# Visualization effect
effect = "Spectrum" # "Spectrum", "EnergyWave", or "Pulse"| Palette | Description |
|---|---|
ocean-nightclub |
Deep blues, purples, teals |
sunset |
Warm oranges, reds, pinks |
house-music-party |
Energetic magentas, purples, cyans |
tropical-beach |
Turquoise, aqua, lime |
fire |
Reds, oranges, yellows |
forest |
Deep greens, yellow-green |
neon-rainbow |
Full spectrum |
pink-dreams |
Soft pinks through magentas |
cool-blues |
Ice blues to navy |
tmnt |
Turtle green + bandana colors |
christmas |
Red, green, white |
- Install BlackHole (free virtual audio device)
- Open Audio MIDI Setup (Applications > Utilities)
- Create a Multi-Output Device including your speakers + BlackHole 2ch
- Set the Multi-Output Device as your system output
- Set
audio_backend = "BlackHole 2ch"in config.toml
Tip: Target "BlackHole 2ch" directly, not the Multi-Output Device aggregate. This provides proper audio levels with default_gain = 1.
- Run audioleaf
- Open
pavucontrol(PulseAudio Volume Control) - In the Recording tab, set audioleaf's input to your media player's monitor
- Set
audio_backendin config.toml to match
Inspect your device without launching the full app:
# Show panel layout info
audioleaf dump layout
# Interactive graphical layout view (click panels to flash them)
audioleaf dump layout-graphical
# List available color palettes
audioleaf dump palettes
# Show raw device info
audioleaf dump info- Check audio routing — Verify audioleaf receives audio input (use
pavucontrolon Linux, check Multi-Output Device on macOS) - Adjust gain — Press +/- in the app, or set
default_gainin config - Adjust frequency range — Try
freq_range = [20, 500]for bass-heavy,[20, 4500]for full range
- Ensure device is powered on and on the same network
- Check firewall isn't blocking SSDP/UDP multicast
- Try
audioleaf -nto re-discover
Brightness is controlled by your Nanoleaf device settings (mobile app or physical buttons), not by audioleaf. The visualizer dynamically adjusts color intensity based on audio.
Feel free to open a pull request or start a GitHub issue. Contributions welcome!

