Hi,
I'll use a function called A-weighting Filter for a spectrum analyzer I'm designing in Flash. Here is the equation of A-Weighting Filter:

I thought the function is a little heavy to compute (for hundreds of values) realtime in Actionscript.
I won't need a precise computation of the a-weighting filter.
Can you provide a simpler function example which produces more or less the same curve as below.

A javascript example to compute a-weigthing:
Again, any equation that more or less matches with the curve is ok with me.
Thank you.
I'll use a function called A-weighting Filter for a spectrum analyzer I'm designing in Flash. Here is the equation of A-Weighting Filter:

I thought the function is a little heavy to compute (for hundreds of values) realtime in Actionscript.
I won't need a precise computation of the a-weighting filter.
Can you provide a simpler function example which produces more or less the same curve as below.

A javascript example to compute a-weigthing:
Code:
function AWeightLevel()
{
var f = parseFloat(AWeightForm.Frequency.value);
var K = 3.5041384 * Math.pow(10,16);
var M1 = Math.pow(Math.pow(f,4),2);
var N1 = Math.pow(Math.pow(20.598997,2) + Math.pow(f,2),2);
var N2 = Math.pow(107.65265,2) + Math.pow(f,2);
var N3 = Math.pow(737.86223,2) + Math.pow(f,2);
var N4 = Math.pow(Math.pow(12194.217,2) + Math.pow(f,2),2);
var Level = K * M1 / (N1 * N2 * N3 * N4);
Level = 10 * Math.log(Level) / Math.log(10);
Level = Math.round(Level * 1000) / 1000;
AWeightForm.Level.value = " " + Level;
}
Thank you.
Comment