Hello!
I am making a LED installation that is reacting to audio. The idea is that I want to be able to control what frequency the LEDs should react to live, using Touch OSC.
I've "wired up" an analog input to a biquad filter, and the biquad is "wired" to an FFT analyzer. I started with only Analog in -> FFT, but I thought I could specify even more accurately the frequency I want my LEDs to react to if I also ran the signal through a biquad using the bandpass functionality.
So, from touch OSC I can control the frequenzy, and width of the bandpass filter, and I can control the start and stop bin for the FFT readings. My confusion sets in when adjusting these parameters and trying to understand exactly how they function. Here's an example:
I'm listening to a song, and the bass I want my LEDs to react to is at 65hz. I would then set the bandpass filter to 65hz, frequency bin start to 2, and frequency bin stop to 2. The reason I set the bins to 2 and 2 is because the frequecy resolution of the FFT is 43hz (I'm using the 1024 point FFT), and bin 2 should be 43hz to 86hz. This is the part I want to get confirmed if is correct or not.
The reason I started doubting this is if I set the bandpass frequency to 1000hz, and the start + stop bins to 23, and 24, I get no reaction at all on the LEDs. The level returned by the FFT is 0.00 (or close to it).
My code is here: https://github.com/harald25/MicroTree
The file in question that does the audio stuff is this one: https://github.com/harald25/MicroTree/blob/master/src/audio_react.cpp
Hope someone can clearify to me exactly how the bins work, because I clearly don't understand it fully!
I am making a LED installation that is reacting to audio. The idea is that I want to be able to control what frequency the LEDs should react to live, using Touch OSC.
I've "wired up" an analog input to a biquad filter, and the biquad is "wired" to an FFT analyzer. I started with only Analog in -> FFT, but I thought I could specify even more accurately the frequency I want my LEDs to react to if I also ran the signal through a biquad using the bandpass functionality.
So, from touch OSC I can control the frequenzy, and width of the bandpass filter, and I can control the start and stop bin for the FFT readings. My confusion sets in when adjusting these parameters and trying to understand exactly how they function. Here's an example:
I'm listening to a song, and the bass I want my LEDs to react to is at 65hz. I would then set the bandpass filter to 65hz, frequency bin start to 2, and frequency bin stop to 2. The reason I set the bins to 2 and 2 is because the frequecy resolution of the FFT is 43hz (I'm using the 1024 point FFT), and bin 2 should be 43hz to 86hz. This is the part I want to get confirmed if is correct or not.
The reason I started doubting this is if I set the bandpass frequency to 1000hz, and the start + stop bins to 23, and 24, I get no reaction at all on the LEDs. The level returned by the FFT is 0.00 (or close to it).
My code is here: https://github.com/harald25/MicroTree
The file in question that does the audio stuff is this one: https://github.com/harald25/MicroTree/blob/master/src/audio_react.cpp
Hope someone can clearify to me exactly how the bins work, because I clearly don't understand it fully!