-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audio Uniform #12
Comments
Uh, interesting :) Having something like WebAudio API passing the volume to the shader could be fun too. |
tada! created a new branch if you'd like to experiment with. https://github.com/zz85/glsl-sandbox/tree/audio for now, you need to click the "Play Music" button and put the path to a music file you have on your server. It also falls back on dsp.js for firefox browsers. Firefox and Chrome levels may seem a little difference, so to have perfect consistency, we could use audiolib + madlib for javascript based mp3 decoding... I'll upload a version to my webhost for playing quickly :) |
okay, here we go! http://jabtunes.com/labs/glslaudiosandbox/minecraft.html <-- minecraft + audio http://jabtunes.com/labs/glslaudiosandbox/ <-- default example + audio :) |
also just thinking, potentially could use some annotation like
to make music play in glslsandbox gallery. okay, heading to sleep! (^^)/~~~ |
Oh wow, that adds completely new dimension to the sandbox ;). Which reminds me - I was thinking maybe we could also have uniforms for mouse buttons events (I often find myself unconsciously clicking on these demos). It should be relatively simple to implement and would add more interactivity options (especially for these crazy games that started to pop-up). |
Very cool :) Talking of new input options, http://learningthreejs.com/blog/2012/02/07/live-video-in-webgl/ shows how to use WebRTC to get live camera input. From messing around with Paragraf app on the iPhone I'm sure this would be really fun... |
Since you guys are considering new mouse activity on this thread, take a look at my pan/zoom demo: http://warm-journey-1887.heroku.com/e#21.4 Click "hide code" and use the left mouse button to pan, right mouse to zoom the fractal. The code for this is on my branch in GitHub. I'm pretty sure it won't break any existing shaders, but I need someone to test on AMD cards. It's been tested on nVidia and Intel hardware. |
Audio uniforms would be nice. Also brings to mind gpu-based audio filters, but that's a whole different animal... |
Yes i also like the idea of audio filters, we just need an output audio array of size resolution.x*resolution.y and a samplerate related to time, then we could fill that every frame to get a nice samplerate, we could then also generate sounds, e.g. a simple sinewave-based chord:
|
this has been on my (and perhaps others') mind and it would probably take a day to integrate but adding this here so I might get to do it sometime ;)
the idea is to run a spectrum analyzer on some background music and pass in the dynamics as an
audio
uniform of value between 0 and 1.and i initially thought of using the audio wrapper I wrote https://github.com/zz85/audiokeys.js but perhaps we could use the soundcloud or echonest api (which is probably easier to host it on heroku, while providing music in the sandbox :) too?
The text was updated successfully, but these errors were encountered: