scaling output to percieved loudness


    Nov 02 2013 | 9:56 pm
    Hi,
    I am going to use random numbers to control amplitude but I would to scale the output so that they produce changes in percieved loudness, what is the formula for this?
    For example random numbers between 0 and 100 would be scaled to 0 to 1 but in a way that 25 produces a quater percieved maximum volume, 50 half the percieved maximum and 100 the maximum output. I believe I need to scale in an exponential ot logarithmic way because hearing isn't linear with respect to loudness.
    please help :)