attenuation function for spectral visualizers?

Please remember the terms of your membership agreement.

Moderators: valis, garyb

Post Reply
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

attenuation function for spectral visualizers?

Post by kensuguro »

Can anyone tell me, or point me to info about what the standard function is to attenuate the frequencies in a spectral visualizer. Basically, it's the difference between "normal" and "log" modes. I wan to do a "log" mode, but I can't find what the actual log function is.

hmm, on second thought, the "log" points to the frequency -> space distribution, and not how the higher frequencies are attentuated (visually).. but anyway, if anyone knows what I'm talking about, I'd appreciate some pointers. I mean, I know that all I have to do is to scale the value with some sort of pow function that takes frequency into account.. I just want to grab the standard one.
User avatar
kensuguro
Posts: 4434
Joined: Sun Jul 08, 2001 4:00 pm
Location: BPM 60 to somewhere around 150
Contact:

Re: attenuation function for spectral visualizers?

Post by kensuguro »

oh.. hmm, maybe I just need to log it. I guess the high end isn't being "attenuated" in the log view, but just being pushed so far off to the right, that I'm mainly seeing the lower, more active bandwidths. In that case, I guess I need to find that the log function is. Is it an log e? I'm not sure.

edit: so far, I just made an approximation with a:
for(var i:int=0;i < totalband; i++){
visualizerWidth * Math.pow(i/totalband, 0.3)
}
Which more or less looks right.
Post Reply