I was working on a tool to randomly choose parameters from a given instrument’s modulation sets and device chains as the instrument macros, and then stumbled into this block:
→ [read-only, renoise.DeviceParameter]
Why is this read-only? Is there any workaround?
This .parameter refers to a DeviceParameter object, not a value (like a number).
userdata: 0x0000000017E6BB28 (DeviceParameter object)
So you can access the properties of this object. Does this information help you?
Thank you so much for your help, but my question was - how can I assign a macro to a particular parameter via the API, given that the .parameter field is read-only?
I think this is not possible with the current API, and in fact it would be quite complex, maybe that’s why it’s not available.
Each instrument has 8 macros, and each modulation or effect parameter can be linked to a specific macro from within Renoise. All of this taken together is quite complex. In addition, multiple unrelated parameters can be linked to the same macro!
I studied the API some time ago and saw some shortcomings in the modulation or in the keyzones, for example. But I never thought of controlling the macros from the API because of its complexity. You need to show the user somehow from their tool what parameters are assignable to macros in order to bind, and so on. As the modulation devices and effects are variable, it is even more complicated, since they can exist or not and repeat themselves.