Renaming a Live dial
var c1 = this.patcher.getnamed("controller1");
This does’t seem to work, neither does "shortName". I’m shooting in the dark as to what property/method I should use. Or maybe I should be using the Live API. I don’t seem to be having much success at firing a "set name xxx" message at a live.object either.
As with most parameter attributes, this cannot be changed programatically. Live needs to know things such as the name, range, unit style, modulation mode, etc, when the object is instantiated in Live. The only supported way to change these things is via the object inspector (or the ‘Parameters’ window) in the Max editor.
Thanks for that info.
Did I not want to hear that :)
Any chance of providing ways of doing this at instantiation time? (I’m guessing that would be safe?)
I’m working on something that automatically constructs guis, and it would be really nice if I could use the live. objects for this, since they have so many useful features built-in. (like the rawfloat (or instant midi mapping message as I tend to think of it))
Send a message to any live.object saying _parameter_shortname $1 $2 to change the name after initialization
10guitars: excellent. Is this a private api? If not, are these types of calls and valid params listed anywhere?
For example, I am writing a simple M4L device to map one parameter to another (f.ex. to assign a rack macro to a random control in the set) and would love to be able to set units, range, type, etc.
The short name is generally safe to change after instantiation (it’s used for display in Live’s GUI, but not for identification). Changing the long name will set you up for a world of hurt, as will most of the other semi-secret parameter attributes. Which are "secret" for a reason, namely to prevent you from causing crashes or other undefined behavior.
When the device is instantiated, Live collects this information exactly once. Changing it after the fact will cause Live and Max to get out of sync.
There is currently no way to dynamically create valid, functioning parameters in realtime in Max for Live. That limitation is unlikely to change anytime soon. The "Macro Parameter" approach (e.g. a predefined bank of assignable pots) is the best approach here.