my own audio visualizer, because after effects sucks. builds on windows and linux!!!!
here are some demos:
- install any required dependencies below
- run
cmake -S. -Bbuild && cmake --build build -j$(nproc)
or use your IDE of choice with CMake support
- create a directory called
windows_deps
, with three subdirectoriesffmpeg
,portaudio
, andfftw
- install ffmpeg in one of two ways:
- run these commands in an administrator command prompt (
mklink
doesn't run otherwise), replace[version]
with the ffmpeg version that was installed by winget:thewinget install gyan.ffmpeg.shared mklink /D windows_deps\ffmpeg %LocalAppData%\Microsoft\WinGet\Packages\Gyan.FFmpeg.Shared_Microsoft.Winget.Source_8wekyb3d8bbwe\ffmpeg-[version]-full_build-shared
mklink
command simply links the winget installation directory towindows_deps/ffmpeg
. - or, go here, download the "shared" release and extract the archive to
windows_deps/ffmpeg
- download portaudio source, extract
portaudio.h
(insideinclude
directory of the tarball) towindows_deps/portaudio
. i recommending using 7zip for viewing archives: you can get it by runningwinget install 7zip
. - download the 64bit portaudio dll, rename it to
portaudio_x64.dll
, and move it towindows_deps/portaudio
- download fftw, open the archive and extract
fftw3.h
andlibfftw3f-3.dll
intowindows_deps/fftw
- optionally, create a
lua
directory inwindows_deps
, install lua withwinget install devcom.lua
, then in an an admin command prompt run:
mklink /D windows_deps\lua %LocalAppData%\Programs\Lua
- FFTW
- libavpp
- requires the FFmpeg libraries
- the
ffmpeg
CLI program, also part of the FFmpeg project- required for video encoding
- portaudio-pp
- requires PortAudio (only the C library)
- SFML
- note that SFML only supports X11 windows, so you will need XWayland if you use Wayland
- argparse
- sol2
- spline
on namespaces:
fx
: post-processing effectstt
: utility & library extensionsviz
: audio visualization components
i recommend using vscode as it integrates well with git with no effort. get the cmake tools extension and clangd to make development easier.
on windows please use the mingw toolchain as it is the only toolchain i have compiled with, and honestly the easiest to setup and use. clangd might freak out about the standard headers being missing: to fix this, open clangd extension settings, and add the following argument:
--query-driver=C:\path\to\mingw\bin\g++.exe
- ✅️
viz::ScopeDrawable
- basically done, want extra feature: audio window customization independent of shape size
- lua api (in progress)
- ✅️ modular layering/effects system
- remove hardcoded visualizer components
- make
audioviz
generic, extend it with default functionality in a new class namedttviz
- figure out how to deal with
fft_size
andsa.analyze(...)
- figure out how to deal with
- add components/effects based on rhythm
- involves knowing the tempo of the song
- want a small translucent flash overlay that flashes to the beat of music
- copy the osu! stars effect
- need to experiment with only using the ffmpeg CLI instead of the libraries
- ✅️ figure out metadata parsing, then subprocessing for the audio/video streams
- ✅️ this might fix all the "ending early" problems (not a guarantee)
- try using
basic_ipstream
overbasic_pipe
- try to have one
ffmpeg
process output both streams
⁉️ figure out why particles randomly don't show on linux