Reverse an exponential scale

bkshepard's icon

I know that I can replicate the exponential scaling of [gain~] with [scale 0 157 0. 7.942307 1.071519]. My question is, what exponential value would I use to reverse that process? In other words [scale 0. 7.942307 0 157 ???]. Thanks.

justin's icon

dbtoa / atodb [?]

bkshepard's icon

I thought about that, but it's not dB and amplitude. It's that strange relationship between amplitude and 158 that is present in the [gain~] object.

Luke Hall's icon

This should explain the [gain~] equation and you can see how to do the reverse to get you back to where you started.

Max Patch
Copy patch and select New From Clipboard in Max.

lh

bkshepard's icon

Thank you Luke! That's exactly what I was looking for.

Roman Thilenius's icon

i usually scale the range down to 0-1, reverse that, and scale it up again.

Emmanuel Jourdan's icon
Max Patch
Copy patch and select New From Clipboard in Max.

With the default parameter, there's 6 dB for 10 increments. So it's easy to find the value in db. It's more or less the same patch as Luke, but you might get easier the 6db per 10 ints by not including the dbtoa conversion in the expr.