Audio data to pixel shader?

According to a post on the openFrameworks forum, shader toy uses the following approach to transfer audio data to a shader via a texture.

“The FFT signal, which is 512 pixels/frequencies long, gets normalized to 0…1 and mapped to 0…255. The wave form, which is also 512 pixels/smapled long, gets renormalized too from -16387…16384 to 0…1. FFT goes in the first row, waveform in the second row. So this is a 512x2 gray scale 8 bit texture.”

Is there anyway to implement this approach in TD?

Any suggestions are much appreciated.

B.

Audio Device In CHOP to Spectrum CHOP (specify length manually option) to Merge CHOP that merges prior two CHOPs, then send to CHOP to TOP to get it in a texture. Use that TOP with a Material operator.

You may ahve to Trim CHOP to get only the last 1-frame of salmples as CHOPs are Time Sliced and CHOPs will be 1, 2, … frames long (1/60, 2,60 sec … long) depending on how many frames you are dropping.

g

Here’s what I’ve got - it’s close, though the visualizations don’t quite match shadertoy - any ideas?

cz
audioShaderToyTouchdesigner.toe (14.7 KB)

Thanks guys, this is enough to get me going. Much appreciated.