Real-time, zero-delay bass-reactive lightshow engine for Tuya WiFi LED strips.
This project captures system audio (via WASAPI loopback), isolates bass frequencies, applies aggressive gamma-contrast, calculates spectral centroid for dynamic colors, and sends high-speed Direct Jump (Music Mode) packets to local Tuya devices.
- 60+ FPS Network Sync: Background thread handling Wi-Fi packets.
- Smart Envelope Follower: Instant attack, smooth decay.
- Vocal & Chord Filter: Ignores mid/high frequencies (
BASS_DOMINANCEfilter). - Spectral Centroid: Dynamic LED color based on bass pitch (sub-bass vs punchy kick).
- Background Mode: Run silently on Windows startup.
- Python 3.10+
- Make (via Chocolatey). Open PowerShell as Administrator and run:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install make-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/tuyalight.git cd tuyalight -
Install dependencies (creates
venvautomatically):make install
-
Copy your Tuya credentials into
config.toml.
Edit the config.toml file in the root directory:
device_id,ip,local_key: Get these from your Tuya IoT Developer account.smoothing: Adjust visual smoothness (0.25 is recommended).bass_dominance: Set higher (e.g., 0.35) to ignore vocals/guitars completely.
make runTo run the app silently without a terminal window:
venv\Scripts\python -m tuyalight run --backgroundEnable the background service to start with Windows:
make startup-enableTo disable:
make startup-disableInstall pre-commit hooks for contributing:
make dev
make lintMIT