I think it would be an easy and more dynamic way of setting the color than trying to parse an 3 number RGB array to a 0-127 decimal
I respectfully disagree. the color is already an array, so you’ll end up parsing it somehow, anyway.
But of course, since you are writing that driver you can do it in whichever way possible -
The Launchpad is based on MidiDevice, which in turn is based on the more generic Device class.
Here’s what the documentationhas to say about output_value():
--- Convert values into a something that the display & device can understand.
--
-- Each type of value (number, boolean or text) is handled by a specific
-- submethod: @{output_number}, @{output_boolean}, @{output_text}
--
-- Numbers are generally used for dials and faders, booleans are
-- used for objects with an on/off state (buttons), and text is used for
-- things like labels and segmented displays
--
-- Depending on the device, you might want to override these submethods with
-- your own implementation. For example, the Launchpad has its own method for
-- converting a value into a color. You can also implement your own code for
-- direct communication with the device by overriding these methods -
-- in such a case, adding an additional boolean return value ("skip_hardware")
-- will update the virtual display, but skip the hardware part
So yes, you can send raw sysex using send_sysex_message(), and then “skip hardware” as explained above
Edit. btw: you also want to change the colorspace property, for the Launchpad classic it looks like this
-- this device has a color-space with 4 degrees of red and green
self.colorspace = {4, 4, 0}
Which means, blue is ignored. You probably want to specify {4,4,4} as the new value.
Only once you have set this value can you start modding the device configurations to specify blue colors for the various applications.