opengl-audio-visualizer
OpenGL 4.5 audio visualizer with FFT-based frequency analysis and reactive 3D graphics. Built in C++ with GLFW and ImGui for a computer graphics course.
- Repository
- AidenCarrera/opengl-audio-visualizer
- Created
- May 7, 2026
Highlights
- Analyzes live audio with a Hann-windowed 1024-point FFT.
- Maps bass, mid, and treble energy to separate rings of reactive 3D objects.
- Implements Phong shading, cubemap reflections, and a full skybox in OpenGL 4.5.
- Provides real-time controls for camera, lighting, color, geometry, and reaction intensity.
- Loads WAV, MP3, and FLAC files at runtime through miniaudio.
OpenGL Audio Visualizer is a C++ desktop application that turns audio into a reactive 3D scene. It analyzes a music file in real time and uses the resulting frequency data to animate orbiting objects, lighting, scale, and color.
A Hann-windowed 1024-point FFT separates the signal into bass, mid, and treble bands. Each band controls a different ring of spheres, toruses, or cubes, with envelope following and automatic normalization keeping the movement responsive across different audio files.
The graphics pipeline uses OpenGL 4.5, Phong shading, cubemap reflections, and a full environment skybox. An ImGui control panel exposes object counts, ring sizes, reaction intensity, camera settings, lighting, and dynamic color behavior while the visualization is running.
Audio playback is handled by miniaudio and frequency analysis by KissFFT. The application can load WAV, MP3, and FLAC files at runtime, and it falls back to a time-based animation when no audio is available.