#dmx #visualizer #music #led-strip #frame-rate #openrgb

app dmxvis

High Framerate LSD Audio Visualizer [DMX, WS281x, OpenRGB]

2 releases

0.1.1 Jul 26, 2024
0.1.0 Nov 1, 2023

#163 in Audio

MIT and GPL-2.0 licenses

550KB
1K SLoC

DMX & Addressable RGB Strip - Audio Visualizer - with OpenRGB support!

Simple Visualizer for Music. Colors can be sent to WS2812 LED strips and DMX light fixtures.

Available for Windows and Linux, MacOS is currently untested.

⚠️ VISUAL EPILEPSY WARNING ⚠️

How does it work?

  • The app captures audio from your default playback device
  • converts stereo to mono and applies gain
  • produces an fft
  • generates color from fft bands (currently a fixed crossover)
  • applies various filters to the color bands
  • color can be sent:
    • to the serial port: An Arduino converts received color to DMX and/or WS2812 strip
    • over the network: A Raspberry Pi can receive color packets and render them on a WS2812 strip

What Music works well?

Any Music works, but the visualizer visualizes best with Dynamic, Uncompressed Music (as in boosting the volume of all instruments to the same level). Fast Music is especially fun. Beware of seizures!

Project Structure

  • pio/ kicad/
    • firmware and documentation for the ATMega32u4 based USB to DMX&WS281X Board
  • assets/
    • icons, GIFs and images of app and PCB
  • docs/
    • Design Documentation, Tasks and Drafts
  • rpi/
    • python scripts for the Raspberry Pi (in need of rewrite)
    • receives UDP from desktop app, can send color to WS2812 strips, DMX currently not supported
  • src/ Cargo.toml Cargo.lock build.rs
    • the desktop app rust project
    • to be reworked soon

Releases

The program is compiled to a standalone executable, available for Windows and Linux (support may vary). Find them under Releases.

Building from Source

git clone https://gitlab.com/Romanizer/dmxvis
cd dmxvis
# checkout to a tagged version for stability, tho master is usually pretty clean
git switch v0.1.1

Prerequisites

Before attempting to build dmxvis, get the following packages/software for linking:

# Arch
pacman -S pkgconf
# OpenSUSE
zypper in alsa-devel systemd-devel
# Fedora
dnf install systemd-devel pkgconf alsa-lib-devel
# Arch, compiling to Windows
pacman -S mingw-w64-gcc
cargo b -r --target x86_64-pc-windows-gnu

Windows Build Notes

Install the Windows SDK found in the Visual Studio Installer options.

Building

To compile from source, update rust and run:

rustup update
cargo b -r

The binary will be located at: target/release/dmxvis(.exe)

Configuration

Linux

Pulseaudio Volume Control can be used to set the input (Microphone or playback device).

Serial

To use the Serial port (for the DMX & WS2812 LED board), your Linux user account needs permissions.

First, check which group the serial port belongs to (often dialout or uucp):

ls -l /dev/tty*
ls -l /dev/ttyUSB0
ls -l /dev/ttyACM0
# output
crw-rw---- 1 root uucp 166, 0 20. Apr 04:20 /dev/ttyACM0

Normally, your user is not in this group, so add your user to the dialout or uucp group:

sudo usermod -aG GROUP USERNAME

For changes to take effect, logout and re-login to the user or reboot the machine.

Windows

Connect an Arduino and find out which COM it is represented by, and set the app to that COM port.

Windows will prompt the user to allow the application to use the network.

Common Configuration

dmxvis uses confy to save configuration files, which in turn uses the directories crate.

It uses these paths for configs:

// Lin: /home/[User]/.config/dmxvis
// Win: C:\Users\[User]\AppData\Roaming\dmxvis\config
// Mac: /Users/[User]/Library/Application Support/rs.?.dmxvis

NOTE: updating to a new version may overwrite existing configuration files with defaults.

Dependencies

~19–55MB
~1M SLoC