Page 2 of 2

Re: non-idealistic equal loudness curve

Posted: Fri Apr 26, 2013 11:29 pm
by tester
This exscel is yummy :-)

Okay, now I have to figure out, how to convert it into your tools Trog. As far I understand, I need to recalculate somehow the frequency/amplitude points in this table into sometling linear that will fit the array? Somebody said something about interpolation? Could someone helpe with getting this right? Some schematic for automated conversion of such data would help.

Re: non-idealistic equal loudness curve

Posted: Sat Apr 27, 2013 10:28 am
by tester
Trog, I'm in your Trogz Tools now, and in maths - see something like "control law". Inside one - I see a graph (array equivalent) and module named "interpolation". If I understand you correctly - I must use that "interpolation module" (with reference array input, and i/o for converting value) yes?

And if I want to add more array points to the reference table, then inside that interpolation module - I must change one of the values (in two places) from 10 into N (amount of points I will have in array), yes?

So now, what I would need is some conversion routine between custon (X,Y) table, to get equal linear distances on the X axis (and corresponding Y values), I guess...

Re: non-idealistic equal loudness curve

Posted: Sat Apr 27, 2013 2:57 pm
by digitalwhitebyte
I do not know if this can help you,
but this is a good approximation of a A_Weight function for the given frequency.

Code: Select all

def weighting_A(freq)
       if (freq>0)
          f2 = freq ** 2
          f4 = freq ** 4
          
        return   weighting_A = 10 *
        Math.log(1.562339 * f4 / ((f2 + 107.65265 ** 2) *
        (f2 + 737.86223 ** 2))) / Math.log(10) + 10 *
        Math.log10(2.242881E+16 * f4 / ((f2 + 20.598997 ** 2) ** 2 *
        (f2 + 12194.22 ** 2) ** 2)) / Math.log(10)
        
        else
           return   weighting_A = -1E+32
       end
end

weighting_A(1000)  # Return A-weighting for this frequency. in dB SPL
# => -1.1761701e-006


Edit: correct exponential operator ^ to **

Re: non-idealistic equal loudness curve

Posted: Sat Apr 27, 2013 3:45 pm
by tester
Thanks. If that A_weighting serves the purpose, then it's worth to check it in real life conditions. Could you post an FS schematic with defined input/output nodes? I'm still confused with this whole ruby thing...

Re: non-idealistic equal loudness curve

Posted: Mon Apr 29, 2013 12:37 pm
by Tronic
A question.
But in the code says this
% If more samples are required you should be able to easily
% interpolate these values using spline().

he intends to interpolate the data in the tables to get more samples of reference available?
or interpolate the data coming out from it?
to me it would seem more correct to interpolate the data in the tables,
as it always refers to a given value for pure tone, am I wrong?

Re: non-idealistic equal loudness curve

Posted: Mon Apr 29, 2013 9:00 pm
by digitalwhitebyte
@tester
you're still interested in this?

Re: non-idealistic equal loudness curve

Posted: Mon Apr 29, 2013 11:50 pm
by tester
Yes, why?

I slowed down, because I'm involved in few other projects, but to get this one done - is one of my interests.

Generally, from what I understand - I will deal from time to time with some "random data" (i.e. no linear distances between X points, to get the correlated Y values), and I will need to convert them into linear arrays (equal X distances), that can be applied to other linear arrays, like these coming from FFT analyzer, or else (like freq/gain relationship via sliders on current example). Second part of my interest are the equal loudness curves (and other EQ profiles like that) itself.

Re: non-idealistic equal loudness curve

Posted: Tue Apr 30, 2013 3:22 pm
by digitalwhitebyte
I made it all in ruby​​, ISO226 and interpolation.
I am enclosing something in a few days.

Re: non-idealistic equal loudness curve

Posted: Tue Apr 30, 2013 7:03 pm
by tester
Okay, thanks.

Re: non-idealistic equal loudness curve

Posted: Tue Apr 30, 2013 10:59 pm
by RJHollins
Interest here too !

Look forward to your posting !!