yeah, something like this should work (untested)…
local ControlSpec = require 'controlspec'
local Control = require 'params/control'
local mycontrol = Control.new("mycontrolname", ControlSpec.new(20, 20000, 'exp', 0, 10000, "Hz"))
print(mycontrol:string())
mycontrol:delta(1)
print(mycontrol:string())
mycontrol:delta(-1)
print(mycontrol:string())
Option may be a better alternative if you need to use delta() for enumerated values.
local Option = require 'params/option'
local myoption = Option.new("myoptionname", {"fwd", "bwd", "updn"})
print(myoption:string())
myoption:delta(1)
print(myoption:string())
myoption:delta(-1)
print(myoption:string())
(again, untested as I’m not at my device, but something like above should do)
(also FYI note that i tend to Capitalize OOP classes in Lua such as ControlSpec, Control and Option. this is not required, and you will see in many scripts that classes are not capitalized)