MIDI feedback and RGB values

@mike, well this is actually possible right now.

With Kilowhat you can set up to 8 different configuration banks, and you can set color and MIDI channel to a whole bank.

After you set this for a whole bank, you can then individually modify the color per component, setting either hex values in #RRGGBB format for any component with feedback, or setting the color for each velocity/value range for encoder switches and rubber buttons.

The color range feature is intended for a button or an encoder switch to change colour inside the same bank, depending on the range of the velocity/value of the NOTE or CC message received.

Please let me know if you still have doubts about this :smile:

I think you misunderstood me. Only a few buttons have only off/on states; most of them need to take on multiple colors at different times, so they’d need to use value ranges and would be limited to your set of 16 colors.

so if I really want my own colors, I guess I can modify this piece of code and rebuild the firmware? :slight_smile:

1 Like

yep, changing the color table to your specific needs would give you customized colors.

We could think about a Kilowhat feature that lets you customize and configure this.

1 Like

A little update on this one:

We improved the “value to midi” feature to a fixed table with 128 colors.
Like this:


Brilliant! thank you!

Out of curiosity, how did you calculate the colors? can you link to the code? or is it entirely hard-coded numbers?

Hi Mike!

I divided the 360° of the HUE wheel into 42, and took that value as Hue HSV, and then for each of those I took a 1/3, 2/3 and full saturation points. This gave 42x3 = 126 colors, and we added black for 0 and a greyish white for 127.
Then converted to RGB values and got the table.

For now it’ll be a hardcoded table, but we want to make it editable in Kilowhat soon.

I used this code to generate the table: https://codeshare.io/5DdEgl

This is a nice compiler to test it: https://repl.it/languages/c



Making it editable and making the colors “ordered” would be awesome!

I mapped the feedback from my fader to one of the pads and made the color velocity sensitive, and the results are… interesting. being able to make the color changes more gradual and specific would be cool though!

Hi @qbrd! It’s also on To do list!

For now they are set, if you wanted you could change the colors in the types.h file and recompile and upload to your controller, but this is coming relatively soon.

It’s even set for it in the controller, we just need to implement the interface in Kilowhat :slight_smile:

Ah cool! I might have a go at that… It’s been YEARS since I wrote any C seriously… :slight_smile:

I’m sure you guys are busy, so I’m trying to be patient! Just thought I’d vocalize my support for the feature! :smiley:

Thanks again, you guys have been great!

1 Like

Oh, and! IF I may be so bold… I’d like to define a color gradient for each LED… :smiley:

Okay so, I’ve whipped a color table that’s pretty much giving 2 bits to red, 2 bits to green, 3 bits to blue (I like blue) and counting up in order. what do I need to do to build the firmware again?

If anyone wants to try using it, I’ll upload it here, but I would like to figure out how to build my own.colors.h (2.3 KB)

1 Like

I’ve cloned the git repo and downloaded the Arduino IDE, but I’m not sure how to open and build the project.

make install

No, not that easy… lol but I think the link above should get you sorted?

Working on it… I replied in that thread

Added as feature request. :wink:

1 Like

I got the firmware building and was able to install a different color palette.

as I mentioned, it’s basically 2 bits red, 2 bits green, 3 bits blue. I should be able to write a simple function that just takes a full RGB color and reduces it to 0…127, so I don’t need to keep a lookup table.

The code I uploaded earlier was wrong. I’ll upload my actual types.h
types.h (16.6 KB)


:heart_eyes: looks beautiful already! glad you were able to put your own palette in Hachi

1 Like

Update: I wasn’t getting quite the results I wanted from trying to compute my 7-bit colors from full RGB values, so I switched to a palette where colors 0-63 are based on 2 bits each of red, green, and blue, while the upper colors (particularly 96-118 at the moment) are hand-picked colors for a decent palette (bright and dim versions of red, orange, yellow etc, plus several grays from black to white). if anyone wants it, I can upload a copy.