A function returns discrete data between 0 and 128. I want to transform that data to a scale in that way that a value of …
0 would result in 0 128 would result in 128
The values in between should be weighted in that way where lower number are transformed "faster" to higher numbers where higher number would grow more slowly.
Background: I want to do a VU meter on a dB scale (-inf to 0dB) like this (please note how the distances decrease for the same absolute change in dB)
L |||||||||||||||||||| |
R ||||||||||||||||||||||||||| |
-inf -36 -18 -6 -3 0
0 128
How do I transform the values to reflect the width of the peak on a VU of a width of 255 pixels, for example?