EchoPy is a real-time music visualizer built with Python, PySide6, and NumPy. It captures system audio and renders various artistic visualizations.
- Framework: PySide6 (Qt for Python)
- Audio Core: sounddevice (PortAudio wrapper)
- Math/Signal Processing: NumPy (FFT, Windowing)
- Aesthetics: Custom QSS (Glassmorphism), Vanilla CSS/HTML for About dialog.
-
SOLID Principles: Applied (SRP for visualizers, DIP for audio processing).
-
VisualizerFactory: Centralized management of visualization styles (OCP).
-
AudioProcessor: Decoupled from UI, supports dependency injection for smoothing buffers.
-
Resource Management: Externalized QSS and image resources.
-
Hardware Driver Conflict: NVIDIA SyncMaster (HDMI/DP).
- Status: ✅ SOLVED (2026-01-28)
- Solution: Integrated native WASAPI Loopback via
PyAudioWPatch. The engine now automatically detects and utilizes the correct loopback device even on graphics card outputs.
-
NumPy 2.0 Compatibility: The system uses NumPy 2.4.1.
- Optimization:
AudioProcessorcallback has been refactored for vectorized Boolean masking to avoid performance bottlenecks (Input Overflow).
- Optimization:
- Logic: Fully optimized for NumPy 2.0.
- Audio Capture: IMPROVED.
- Integrated Weighted Multichannel Downmixing (inspired by CAVA) to preserve surround audio fidelity on NVIDIA SyncMaster/HDMI drivers.
- Enhanced WASAPI Loopback Discovery with name-matching and "SyncMaster" prioritization.
- Visuals: Modernized aesthetics and coherent, high-end retro-neon visuals across core styles:
- Synthwave Grid (New): Added a premium 3D perspective scrolling neon grid visualizer with a reactive neon mountain range silhouette and an audio-pulsing sun with horizontal cutout lines.
- Circular Spectrum: Upgraded with a rotating tech grid, erupting neon particle sparks on bass impacts, and gradient sweeps with glowing caps.
- Spectrum Bars: Rebuilt as segmented LED columns with a glassmorphic backplate, calibration scale lines, rising embers, and falling neon peak caps.
- Radial Bars: Refactored with an outrun central sun core featuring horizontal cutouts, pulsing dashed concentric rings, and outward erupting neon sparks.
- Waveform: Enhanced with a vector oscilloscope grid, a moving horizontal laser scanline overlay, glowing energy aura fill, and reactive electron sparks shooting from peaks.
- Compatibility Fixes: Fixed PySide6
QPenconstructor errors by wrapping all gradients in aQBrushand providing proper line widths.
- Testing: Active verification via
tests/test_visualizers.pyprogrammatically validating render processes for all 13 styles under the Qt context. All 6/6 tests pass. - Calibration:
NOISE_FLOOR = 0.00020andGAIN = 15000maintained for clean response.
- Resource Pathing: Use
sys._MEIPASSpath resolution (implemented inutils.get_resource_path) to ensure themes, icons, and QSS are found inside the temporary PyInstaller directory. - Windows Identity: Use
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelIDto detach the app from the genericpython.exeprocess, allowing custom taskbar icons. - Icon Header: Windows executables require native
.icoheaders (PNG data wrapped in ICO structure) for explorer-level visibility. - Modern UI Patterns: Right-click context menus replace legacy menu bars for immersive "frameless" designs. Shortcuts must be registered as window actions (
addAction) to remain active when menus are hidden.