Skip to content

Aisboerk/spectralux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spectralux -- Retro Spectrum Analyzer

A real-time retro-style spectrum analyzer with CRT glow aesthetics, logarithmic band distribution and smooth dBFS visualization.

Designed for music sessions, stream overlays and pure visual enjoyment.

Preview


✨ Overview

Spectralux is a real-time audio spectrum analyzer built with Python, Pygame, NumPy and SoundCard.

It captures system loopback audio, performs FFT-based spectral analysis with proper dBFS normalization, and renders a retro-inspired visual interface with:

  • Logarithmic frequency bands
  • Waveform display
  • CRT-style glow
  • Scanlines and vignette
  • Dynamic layout scaling

🎛 Features

Audio Engine

  • Real-time loopback capture (WASAPI tested on Windows)
  • Logarithmic frequency band spacing
  • Proper dBFS normalization
  • Adjustable attack / decay smoothing
  • Peak hold markers
  • Configurable FFT size and sampling rate

Visual System

  • Retro CRT glow simulation
  • Optional waveform with trail persistence
  • Scanlines and vignette effects
  • Fully resizable window
  • Dynamic layout split (header / waveform / spectrum)
  • Parameter-driven visual tuning

🖥 Platform

Currently optimized and tested on:

  • Windows (WASAPI loopback)

Other platforms may work depending on audio backend support in soundcard, but Windows is the primary target at the moment.


🚀 Quick Start (Windows)

An installer script is included for convenience:

install-and-run.bat

This script:

  1. Creates a virtual environment (.venv)
  2. Installs required dependencies
  3. Launches the application

No manual setup required.


🛠 Manual Installation

Requirements

  • Python 3.9+
  • pygame
  • numpy
  • soundcard

Clone the repository

git clone <your-repo-url>
cd spectrum-analyzer

Create virtual environment

Windows

python -m venv .venv
.venv\Scripts\activate

Linux / macOS

python3 -m venv .venv
source .venv/bin/activate

Install dependencies

pip install --upgrade pip
pip install -r requirements.txt

Run

python src/spectralux.py

Controls:

  • F → Toggle fullscreen\
  • ESC → Exit

🎚 Configuration

All visual and audio parameters are configurable directly inside the source file.

You can adjust:

  • Number of bands
  • Frequency range
  • dB display range
  • Glow intensity
  • Attack / decay behavior
  • Scanline density
  • Waveform appearance
  • Layout proportions

The entire visual style is parameter-driven and easy to tweak.


📐 Layout Concept

The UI consists of:

  1. Fixed header area\
  2. Waveform area (percentage-based)\
  3. Spectrum analyzer area (remaining space)

The layout dynamically adapts to window resizing while preserving proportions.


📌 Notes

  • Segment height automatically adjusts if the window becomes very small.
  • The spectrum plot is clamped to stay within its allocated area.
  • Designed as a visually pleasing analyzer rather than a scientific measurement tool.

📄 License

MIT License

Copyright (c) 2026 Alexander Stroschke

About

A real-time retro-style spectrum analyzer with CRT glow aesthetics, logarithmic band distribution and smooth dBFS visualization.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors