yes, extending this is important. For you guys - so that you can do more in your presets - and also to myself to be able to deliver new features. I am currently working on making Control object (and possibly others in future) more like a real object. That means making it possible to inherit from it, extend the instance and class attributes and functions, and provide getters/setters for all low-level attributes.
eg. Amongst others I will use it for overriding internal paint and touch methods with Lua functions. Like this:
There is a catch though. Adding extra functions (even plain getters / setters) will have quite an impact on memory available on mk1. I very unhappy about that but I feel that the moment when I will have to break compatibility between mk1 and mk2 is coming
Great news. In my case, I have a set of controls that need to display different formatting depending on what data has been put in a mod matrix. Luckily, my format routines are named fmt1(), fmt7(), etc.
So for now I can do this:
_G["fmt" .. ctlNum](valueObject, value) to call the correct formatter
I also acknowledge the point about retro compatibility. However, the mk2 represents a significant evolution that inherently offers much more functionality than the mk1. I don’t overlook the fact that the mk1 is already one of the most advanced MIDI controllers out there! Even though it may not match the capabilities of the mk2, it still performs exceptionally well!
In other words, even if the mk1 may not be capable of achieving as much as the mk2, it already surpasses many other controllers. Therefore, the compatibility of the former should not hinder the advancement of the mk2, in my opinion.
Lastly, I want to express my gratitude for all the hard work and innovations! The XY pad is fantastic! Thank youuuu so mutch !
yup, I am using the __index and __new_index to manage adding of extra methods added in Lua (and making them known to the C++ part of the firmware). I will give this some thinking. Maybe with a bit of metadata added to the C++ classes, I could be able to map it dynamically. Good thinking! Thanks!