This is actually closer to an ideal solution than what I’m doing now. I’m doing a sort of workaround to effectively give objects their own parameters, by making pseudo-parameters whose actions set values to objects in a buffer. But, it’s convoluted and a little hard to keep track of. It would be nice to be able to create different sets of parameters, and be able to localize them inside of a table.

For example


local Object = {}
function Object:new()
  local o = {}
  self.__index = self
  setmetatable(o, self)
  o.val = 0
  o.params = ParamSet:new()
  o.params:add{
    type = "number",
    id = "val",
    name = "value",
    min = 0, max = 127, default = 64,
    action = function(x) o.val = x end
  }
  return o
end

then the parameter page could be viewed with something like o.params:view().
There would have to be some management of views so that different parameter sets wouldn’t be competing.