Skip to content

batuhancode/spektrum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spektrum - Audio Visualizer

A real-time audio spectrum visualizer for Windows with a sleek, minimalist design. Displays audio frequencies as animated vertical bars that respond to system audio or microphone input.

Ekran görüntüsü 2026-01-16 223443

Features

  • Real-time Audio Visualization - 60 frequency bars dancing to your music
  • Dual Input Modes
    • Speaker mode (system audio/loopback)
    • Microphone mode (live input)
  • Ultra-low Latency - Instant response with high-priority audio capture
  • Minimalist Design - Clean black and white aesthetic
  • Smooth Animations - 60 FPS with fluid transitions
  • Lightweight - Native Windows app, minimal resource usage
  • No Dependencies - Single executable, no installation required

Controls

  • 1 - Switch to Speaker mode (system audio)
  • 2 - Switch to Microphone mode (microphone input)

Requirements

  • Windows 7 or later
  • Audio device (speakers/headphones for Speaker mode, microphone for Mic mode)
  • No additional libraries or runtime dependencies

Building from Source

Prerequisites

  • MinGW-w64 or MSVC compiler
  • Windows SDK

Compile Instructions

# Compile resource file
windres icon.rc -o icon.o

# Compile and link
g++ main.cpp icon.o -o spektrum.exe -lole32 -mwindows -O2

Alternative with MSVC

rc icon.rc
cl main.cpp icon.res ole32.lib /Fe:spektrum.exe /link /SUBSYSTEM:WINDOWS

Technical Details

  • Language: C++
  • Framework: Win32 API
  • Audio API: WASAPI (Windows Audio Session API)
  • Rendering: GDI with double buffering
  • Architecture: Multi-threaded (separate capture and render threads)

Performance Optimizations

  • High-priority audio capture thread (THREAD_PRIORITY_TIME_CRITICAL)
  • 100ms audio buffer for minimal latency
  • Timer-based rendering to prevent freezing during window operations
  • Smooth interpolation for fluid animations

Project Structure

Spektrum/
├── main.cpp          # Main application code
├── icon.rc           # Resource file (icon + version info)
├── icon.ico          # Application icon
├── .gitignore        # Git ignore rules
└── README.md         # This file

Customization

You can modify the following constants in main.cpp:

const int WINDOW_WIDTH = 1200;   // Window width
const int WINDOW_HEIGHT = 700;   // Window height
const int NUM_BARS = 60;         // Number of frequency bars

License

Copyright © 2026 Batuhan Eroğlu. All rights reserved.

Author

Batuhan Eroğlu

Acknowledgments

  • Inspired by classic audio spectrum analyzers
  • Built with Windows WASAPI for professional-grade audio capture
  • Optimized for real-time performance and low latency

⭐ Star this repo if you like it!

About

A real-time audio spectrum visualizer for Windows with a sleek, minimalist design.

Topics

Resources

Stars

Watchers

Forks

Contributors

Languages