Exponential Scaling of Gain

Danger Raven's icon

I am am scaling the gain object to respond to the values 0.-1. and am using the expr object with a function of "sqrt($f1)" to adjust for the perceived level of volume versus the absolute volume. This is to say, the lower end of the gain spectrum is "shortened" to place more emphasis on the upper end. So 90-127 range of the gain object corresponds to the values .5-1.

I am pretty happy with the results, but I was curious if anybody had a better solution or a different approach? Thanks!

667.Volume_Exp_Scaling.maxpat
Max Patch
Roman Thilenius's icon

you should use the standard formula for decibel to linear conversion for GUI
objects, it probably works best.

for example like this:

expr (pow(10.$f1*0.05))*($f1!=-90.)

the input will be -90 to 0, the output 0 to 1.

for your 0-127 just add *127 right in the expression.

-110