An intelligent, automated video switcher for WebGL shaders.
This application uses machine listening to analyze real-time audio and determine values for high level audio features that are then used to conduct the switching of audio-reactive shaders written with the OpenGL Shading Language and sourced from the Shadertoy community.
The application will need access to your computer's microphone so to try this out locally you'll have to create a certificate first:
openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
Then run an https server, maybe with Python?
There are a few shader sets to choose from by default but you can also load your own. In order to do so, the following steps are required:
- Browse around Shadertoy to find a few shaders you like and copy each one into a file in the same directory:
shader_folder/ shader1.frag shader2.frag ...
- Add a brightness uniform to the shaders so that the brightness slider in the application can have an effect:
uniform float brightness; ... // output final color fragColor = vec4(ledColor, 1.0) * brightness;
- Add the high level visual features in comments at the end of each shader file:
// Visual Features // complexity=1 // contrast=0 // movement=0
- Now in the app you can upload your folder of shaders and they should load and be displayed.