Send microphone audio to a Shadertoy shader

Hey out there,

So I am trying to send microphone audio to a Shadertoy shader in Three.js and not sure if I am sending the audio data to the shader correctly though because I’m not getting any response from it. From what I can tell the numbers look right up until they are sent to the shader but after that I am not sure what happens. Sending them in with a texture inspired by the technique used here. The shader I am trying to port is Any guidance would be much appreciated!

(You’ll need to edit on Codepen to allow it to use the microphone)

The following example demonstrates how to visualize the audio frequency data by passing them to an instance of THREE.DataTexture. I would say this is a good starting point for developing your own audio visualizer.

Yes thank you! I had landed there before but this time things clicked and I was able to figure out what was missing. Most important part was that I had to switch from UnsignedByteType to LuminanceFormat for the DataTexture type. Switched to a different shader that’s a little nicer to look at and will leave the codepen in place for others.