FFT in FFGL
Posted: Thu Jun 26, 2014 09:44
Hi,
I'm trying to explore how I can get FFT data into FFGL plugins. I'd like my plugins to respond audio in a rich way, so a 256-band FFT would be nice. These are my ideas, although none of them are perfect:
1. using the FFT from Resolume, by limiting it to distinct ranges and sending it to separate parameters. This won't work for high number of bands, but easy to achieve.
2. writing an FFT plugin that calculates FFT using the audio input and renders this into a texture, which other plugins can use. Each band would be represented by one pixel or one column of pixels, where the intensity relates to the energy level of the FFT band.
3. sending the FFT texture similar to above using Syphon from an application that calculates the FFT itself.
Is there a way to get the FFT data from Resolume to the plugin somehow? It would be less computationally expensive than calculating the FFT again each frame. Getting the FFT as a texture would be a nice feature. For example. Shadertoy (https://www.shadertoy.com/) uses the same technique, so shaders can obtain FFT through a texture sampler.
I would be grateful for suggestions, ideas. Thanks.
-Gabor
I'm trying to explore how I can get FFT data into FFGL plugins. I'd like my plugins to respond audio in a rich way, so a 256-band FFT would be nice. These are my ideas, although none of them are perfect:
1. using the FFT from Resolume, by limiting it to distinct ranges and sending it to separate parameters. This won't work for high number of bands, but easy to achieve.
2. writing an FFT plugin that calculates FFT using the audio input and renders this into a texture, which other plugins can use. Each band would be represented by one pixel or one column of pixels, where the intensity relates to the energy level of the FFT band.
3. sending the FFT texture similar to above using Syphon from an application that calculates the FFT itself.
Is there a way to get the FFT data from Resolume to the plugin somehow? It would be less computationally expensive than calculating the FFT again each frame. Getting the FFT as a texture would be a nice feature. For example. Shadertoy (https://www.shadertoy.com/) uses the same technique, so shaders can obtain FFT through a texture sampler.
I would be grateful for suggestions, ideas. Thanks.
-Gabor