What is the purpose of the following code?
I think fft_max is a kind of equalization table so that the visualization would be "flat" over all frequencies for a typical input. It does not look carefully crafted as it is so spiky. Probably the author just used some example audio input and kept book of the largest encountered values of the magnitudes of the bins, hence the name of the table. If you need a different length fft_max, it would be fine to interpolate the original fft_max say by linear interpolation, or to roll your own (not a cigarette).

You could use the synthetic pink power spectral density $a^2/f$, where $a$ is a normalization constant and $f$ is frequency. In terms of magnitude which you need to put into code, that would be $a/\sqrt{f}$, the square root of power. Put some reasonable value to $f = 0$, for example copy the value at the first non-zero frequency.


Figure 1. Pink magnitude spectrum (red diamonds) compared to the original fft_max (blue dots).