audio-reactive glsl sandbox forked from doob's glsl-sandbox for rapid prototyping of concert visuals
my audio additions are here.
NOTE: my additions were written under hackathon-style conditions, so please excuse the mess (for now)
bundle install
export MONGOHQ_URL="mongodb://[user]:[password]@127.0.0.1:27017/[database]"
- start mongo (
mongod
) bundle exec rackup config.ru
- hit
http://localhost:9292
- (optional) generate fake certs and use thin for SSL so you don't get a prompt for microphone access
every time you visit the shader page:
thin start -p 9292 --ssl --ssl-verify --ssl-key-file .ssl/server.key --ssl-cert-file .ssl/server.crt
so you don't have to deal with GLSL's const-only array indexing, there's a data-to-texture
pipeline included. declare uniform sampler2D audioTex
in the frag shader, then access
the data anywhere in the shader with vec4 datum = texture2D(audioTex, gl_FragCoord.xy);
.
you can replace gl_FragCoord.xy
with any vec2 with normalized coordinates.
- controls for fading/transitioning
- should rewrite this with a less bulky interface & less overhead ("presentation mode"?)
- audio smoothing
- a lot more