

GitHub - xdaimon/music_visualizer: Shader viewer / music visualizer for Windows...
source link: https://github.com/xdaimon/music_visualizer
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

README.md
About
Welcome to the project page for my music visualizer :)
Here is a comparison between what my app looks like and what other music visualizers might look like when visualizing the same sound.
Examples
Usage
The program is meant to feel like using shadertoy. What this means is that the user writes a .frag file that renders to a fullscreen quad (actually a window sized quad). If the user wants multipass buffers, then multiple .frag files should be written. The name of a buffer is the file name of the frag file without the .frag extension. The contents of a buffer are available in all buffer shaders as i[buffer name here]. So if the buffers A.frag and a B.frag exist, then B can access the contents of A by doing texture(iA, pos);.
Every shader must contain an image.frag file, just like shadertoy.
Code for a shader should be located in a folder named shaders that is in the same directory as the executable. Subdirectories of shaders/ can also contain code but that code will not be considered a part of the currently rendered shader.
A shadertoy like shader might have the following folder layout
shader_viewer.exe
shaders/
image.frag
buffA.frag
buffB.frag
See here for details on how to configure the rendering process.
Here is a list of uniforms available in all buffers
vec2 iMouse;
bool iMouseDown; // whether left mouse button is down, in range [0, iRes]
vec2 iMouseDownPos; // position of mouse when left mouse button was pressed down
vec2 iRes; // resolution of window
vec2 iBuffRes; // resolution of currently rendering buffer
float iTime;
int iFrame;
float iNumGeomIters; // how many times the geometry shader executed, useful for advanced mode rendering
sampler1D iSoundR; // audio data, each element is in the range [-1, 1]
sampler1D iSoundL;
sampler1D iFreqR; // each element is >= zero for frequency data, you many need to scale this in shader
sampler1D iFreqL;
// Samplers for your buffers, for example
sampler2D iMyBuff;
// Constant uniforms specified in shader.json, for example
uniform vec4 color_set_by_script;
Building
First get the sources:
git clone --recursive https://github.com/xdaimon/music_visualizer.git
Then to build on Ubuntu with gcc version >= 5.5:
sudo apt install cmake libglfw3-dev libglew-dev libpulse-dev
cd music_visualizer
mkdir build
mkdir build_result
cd build
cmake ..
&& make -j4
&& mv main ../build_result/music_visualizer
&& cp -r ../src/shaders ../build_result/shaders
and on Windows 10 with Visual Studio 2017:
build the x64 Release configuration
Contact
Feel free to use the issues page as a general communication channel.
You can also message me on reddit at /u/xdaimon
Thanks To
ffts
Fast fft library
cava
Pulseaudio setup code
Oscilloscope
Shader code for drawing smooth lines
SimpleFileWatcher
Asyncronous recursive file watcher
RapidJson
Fast json file reader
Catch2
Convenient testing framework
Recommend
-
57
README.md PHP Ast Visualizer This library will take an AST generated from Nikita's PHP-Parser and gen...
-
43
README.md A code visualizer for Swift, which you can read about on the S...
-
63
README.md rback A simple "RBAC in Kubernetes" visualizer. No matter how complex the setup, rback queries all RBAC related information of a...
-
6
Sorting Visualizer Responsive visualizer built using React for popular algorithms See it in action This repo is an attempt to help in...
-
10
readme.md elfcat - ELF visualizer. Generates HTML files from E...
-
2
Repo Visualizer A GitHub Action that creates an SVG diagram of your repo. Read more in the writeup. Please note that this is an experiment. If you have...
-
6
Issues · shoumikchow/bbox-visualizer · GitHub Clear current search query, filters, and sorts Author...
-
11
cross-platform music visualization. Open-source and Milkdrop-compatible Files Permalink ...
-
10
-
5
@react-three/fiber equalizer r3f-equalizer is a 3d audio equalizer for React built using @react-three/fiber. Quickstart npm install r3f-equa...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK