Max/MSP Quick Tip #1: Linear > Logarithmic dials in Max/MSP

In Max you may have come across the problem whereby the dial you are using to control a filters cutoff frequency causes the filter to jump through the low frequencies in large steps before evening out towards the higher frequencies. This is due to the fact that dials in Max are scaled linearly whilst filter cutoff frequencies are logarithmic. To remedy this simply place this expression between the output of the dial and the filter cutoff inlet on the filter object:

expr (pow(2.,((($i1/127.*119.589417+15.48682)-69.)/12.)))*440.

Although most useful for converting a dial from linear to logarithmic scaling this expression is also useful for plaing between anything that outputs a linear scale to control something frequency related.

(This expression comes courtesy of Luke Hall on the Cycling74 forum, Check out his website and Cycling profile for various other useful tips and tricks.)