Hi,
it is a fairly simple matter to read a register value.
LUA Syntax:
hReg, rc = mc.mcRegGetHandle(
number mInst,
string path)
This gets the handle of the register.
LUA Syntax:
value, rc = mcRegGetValue(
number hReg)
This gets a numeric value. It may be that the value is stored as a string in which case you would use:
LUA Syntax:
buf, rc = mcRegGetValueString(
number hReg)
You could then use all the standard arithmetic and mathematical functions within Lua and then write the result back to the same register
if you wish or another register of your choice. To make a new register use the Regfile plugin to create it. Then use mcRegGetHanndle() to get
the handle in the normal way and use mcRegSetValue() or mcReSetValueString() to write a value into the register.
Tell me a little more about what you want to do, maybe I can help with the code.
Craig