Scaler module with explicit ranges

Is there a module that given a value V (voltage or CV) in a range [ x1,x2] returns the corresponding (linearly) scaled value V’ in another range [y1,y2]; and x1,x2,y1,y2 are parameters from -10 to 10; and both V, V’ are clamped to their interval?

For example:

Input: V = -1
Range [x1,x2] = [-2,2]
Range [y1,y2] = [-5,3]
Output: V' = -3

The formula is: V' = (V - x1)*[ (y2-y1)/(x2-x1) ] + y1

This maybe?

1 Like

N.i.c.e.! Thanks!