So I'm attempting to setup a LED visualizer using a python library called Impulse. I've already repaired some of the initial issues with the code in my own custom fork, and now I'm attempting to change the chunk size to something a bit more high-resolution. I got the idea from this question, but the issue is I'm a bit lost as to what a certain part of the code does.
I've kinda hit a wall. The bit of code is here. I don't understand what it refers to by fft_max
, but I need to figure out what it is so I can determine how to calculate and expand the array to match the higher sample chunk. I apologize if this is in the wrong section, as it is highly related to programming, but I figured someone here might know what fft_max
might be referring to.
fft_max
refers to. In the meantime, please note the way that the magnitude spectrum is calculated on line 189. For more information please see this link, section "Computations using the FFT". $\endgroup$ – A_A Oct 15 '16 at 11:12fft_max
is used to normalise it as indicated by Olli Niemitalo's response. Do you need it? I don't know, maybe within the context of that code you do, I haven't gone through it in detail. The main point is that the output of the DFT is complex and to obtain the magnitude of its value you need to calculate that "vector magnitude" you refer to. You could try with and without division byfft_max
to see how the results differ. $\endgroup$ – A_A Oct 16 '16 at 0:08