Skip to content

Avicted/c_fft_visualizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C FFT Visualizer

Visualize the Fast Fourier Transform (FFT) of audio signals in real-time using C, FFTW3, Raylib and PortAudio. Includes RTA-style smoothing, per-band peak-hold, and pink-noise compensation.

Warning

Early prototype. Only supports .wav audio files for now or Live microphone. Sample rates of 48kHz and higher may make the visualization lag relative to the audio.

Requirements

Arch Linux:

sudo pacman -S clang raylib fftw portaudio

Build and run

chmod +x build.sh
./build.sh

# Audio file
./build/c_fft_visualizer <path_to_audio_file> <--loop (optional)>

# Live microphone
./build/c_fft_visualizer --mic

Features

  • Log-frequency bars with fractional-octave smoothing (1/1…1/48)
  • dB-domain time averaging (EMA) with Fast/Slow presets
  • Per-band peak-hold with timed decay
  • Pink compensation (pink-flat display)
  • dB grid overlay and peak/RMS meters
  • Use a live microphone with the flag: --mic

Controls

  • O: Change octave scaling (1/1…1/48)
  • C: Cycle color gradients
  • P: Toggle pink compensation
  • A: Toggle dB-domain averaging (v.s. linear)
  • F: Toggle Fast/Slow averaging preset
  • H: Cycle peak-hold (Off, 0.5s, 1.0s, 2.0s)
  • F11: Toggle fullscreen

Configuration

Edit include/config.h to tune defaults

Screenshot

screenshot

License

MIT License

About

Visualize the Fast Fourier Transform (FFT) of audio signals in real-time using C, FFTW3 and Raylib.

Topics

Resources

License

Stars

Watchers

Forks