sean-e / mTroll

mTroll is the software MIDI control engine part of a hybrid hardware/software MIDI foot controller, but can be used standalone on Windows.
http://www.creepingfog.com/mTroll/
GNU General Public License v3.0
4 stars 0 forks source link

move switch LED color attribute to config file to emulate (and eventually support) RGB LEDs #4

Closed sean-e closed 4 years ago

sean-e commented 6 years ago

One day, using RGB LEDs in the hardware would be nice.
In the meantime, get the software working as if RGB LEDs are already present. Currently, switch LED colors are defined in the ui.xml file.
Move LED color attributes to the config file so that different patches can define different colors. Consider a class definition that can be overridden by individual patches. For example, set a default set of colors for momentary patches, a different set for toggle patches, a different set for scene patches, a different set for program change patches, etc. At the same time support individual patches overriding their class default. Consider doing the same with label background and text colors.

Serial protocol implementations that set RGB LEDs:

sean-e commented 4 years ago

the monome firmware now supports RGB LEDs and the serial protocol has been updated. see today's commits at https://github.com/sean-e/monome40hFirmware/commits/master

the firmware has 32 preset color slots that can be modified at runtime. the serial protocol commands are backwards-compatible. current version of mtroll functions as it did before using the single color LEDs. new commands are added for RGB support: kMessageTypeLedRgbOn, // enable LED using specified RGB value kMessageTypeUpdatePresetGroup1, // set preset color slot to specified RGB value (for slots 0 - 15) kMessageTypeLedOnPresetGroup1, // enable LED using RGB color slot 0-15 kMessageTypeUpdatePresetGroup2, // set preset color slot to specified RGB value (slots 16 - 31 specified as 0 -15) kMessageTypeLedOnPresetGroup2, // enable LED using RGB color slot 16-31 (specified as 0 - 15)

sean-e commented 4 years ago

implemented