Scale conversion

SimonB's icon

Hi there,

Ive been fiddling with Max the past few days and loving it. Ive run into a problem on one of the patches ive made though and was wondering if anyone could help me out?

Im trying to convert a scale of 0-255 (a) into the audio spectrum of 20-20,000 (b)

What ive done so far is b = a/255 * 19980 + 20. This converts it fine but doesn't take into account octaves, so cuts out most of the low end of the audio spectrum.

I was wondering if anyone had any better solutions.

Thanks
-Simon

LoneMonad aka don malone's icon

[scale 0 255 20. 20000. 1.06]

SimonB's icon

wow what a handy tool, thanks for the help

Peter Castine's icon

You may also find mtof handy.