Hey there! I was SUPER excited to find spectral analysis being implemented into the engine as it was something I’ve been struggling with for my own project, I’ve used a flurry of plugins that were supposed to solve this for me however none have really provided anything useful.
So the second 4.22 was out I started digging into this, trying to figure out how it works, now keep in mind I’m an artist here, not a programmer!
I wish to analyse my games currently playing music and feed the data to shaders in order to drive HUD elements and create an on-screen bar visualiser.
Exactly like what is shown in the release notes gif!
So this is my current set up, I’m just scaling some boxes based on these output magnitudes using the (Get Copy) node to select which frequency to map to which box.
I assumed it was proper to set the first array to 20, as anything below 20 can not be heard by the human ear, my current Max Frequency value is set to 20000.
Now the values that I get out of these frequencies I’d like to remap to 0-1 values to make it easy to use it within code and shaders via material parameter collections, however this is where I get confused!
So I’m dividing the max frequency by six, as I currently want six outputs, the result on Array 0, I would have assumed would this become a value between 20-3333,3
However what is currently being output is a 0-0.30 (Approx) value and I’ve no clue how to translate these properly into usable values.
Folks out there whom have dug into this, send me your aid!