Scale conversion

Jun 26, 2008 at 1:24pm

Scale conversion

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

#38607
Jun 26, 2008 at 1:43pm

[scale 0 255 20. 20000. 1.06]

#134787
Jun 26, 2008 at 2:02pm

wow what a handy tool, thanks for the help

#134788
Jun 26, 2008 at 3:38pm

You may also find mtof handy.

#134789

You must be logged in to reply to this topic.