my own audio visualizer library, because after effects sucks
here are some songs rendered with libavz!
- low-level construction of visuals from audio
- layer-and-effect composition
- super fast video encoding with ffmpeg
- faster than adobe after effects!!!!!!!!!
below are two great videos by Cinamark explaining some of the fundamentals of programming with audio & visualization:
How do computers even render audio...?
How Do Computers Even Visualize Audio...?
-
install dependencies, per platform:
# ppa required to install SFML 3 sudo add-apt-repository ppa:bleedingedge/noble-bleed sudo apt-get update sudo apt-get install -y libfftw3-dev ffmpeg libglew-dev libsfml-dev portaudio19-devsudo pacman -S fftw ffmpeg glew sfml portaudio
winget install gyan.ffmpeg
brew install glew sfml fftw ffmpeg
-
on all platforms: clone repo, configure cmake, and build
git clone https://github.com/trustytrojan/libavz && cd libavz cmake -S. -Bbuild && cmake --build build -j
-
by default, example programs are built, so you can run them like so:
build/examples/scope 'my-song.mp3'
- FFTW3: FFT
- FFmpeg: media container transcoding
- portaudio-pp: C++ header-only wrapper for PortAudio, optional dependency
- SFML: graphics/windowing
- tk-spline: cubic spline interpolation
- GLEW: for OpenGL extension loading
the project requires C++23 with GNU extensions, so try to use a compliant toolchain. i primarily use GCC 15.2 on linux and windows. thanks to github actions, there is success building with AppleClang on macOS (see actions workflow runs for more details). i do not guarantee fully working builds with Clang/LLVM or MSVC. if you want to see them work, contribute!
my choice of editor is Visual Studio Code with the CMake Tools and clangd extensions. optionally install WebGL GLSL Editor for shaders.
please use the MinGW-w64 toolchain as it is the only toolchain i have compiled with, and honestly the easiest to setup and use.
with winget you can get the version i usually use with the command below. make
sure to restart your terminal if it doesn't pick up on the updated PATH
environment variable.
winget install BrechtSanders.WinLibs.POSIX.UCRTclangd might freak out about the standard headers being missing. to fix this, open clangd extension settings, and add the following argument without quotes:
--query-driver=C:\path\to\mingw\bin\g++.exe
- gonna take imgui out... it belongs in a separate repo as an effort to make some kind of editor using libavz. ui should not be conflated with the library itself.
- rhythm-based effects
- use aubio for this