real value vs display value

Type : Macro
References : Posted by emil[AT]arpanet[DOT]no
Notes :

REALVAL converts the vst param at given ranges to a display value.
VSTVAL does the opposite.
a = start
b = end
Code :
#define REALVAL(a, b, vstval) (a + (vstval)*(b-a))
#define VSTVAL(a, b, realval) ((realval-a)/(b-a))

Comments
from : bekkah[AT]web[DOT]de
comment : Why da hell do you use Makros??? BTW: I'll post my mapper class in a few days here, which does all this in a much more convenient way.

from : kaleja[AT]estarcion[DOT]com
comment : See http://www.u-he.com/vstsource/archive.php?classid=2#16 for my solutions to this problem.