Use audio frequency peaks to generate GPU particles

Hi everyone,

I’m always trying to improve sound reactivity in my projects. Usually id only use peak values for some frequency ranges, for example one value would be driven by the frequencies between 20 and 100 Hz. While this does react good to rhythm and changes in loudness of the song, it fails to make use of the melody.

Thus I had the Idea to extract the peak values and their corresponding Hz values and use this data to drive a particle system. Check it out if you are interested: ( Also let me know if you need a more in depth explanation )

https://github.com/andrinr/td-frequency-gpu-particles

3 Likes

Hi! Thanks for sharing:)) Just wondering how the numbers in the sub and div are worked out.

Hi! This is indeed very poorly documented. Actually the sub, is the frequency offset, while the div is the range size. The values that are used out of the box mean:

For each frequency range:

  1. subtract the ‘sub’ value
  2. divide by the ‘div’ value

Its nothing else than a simple normalization.