Cabbage Logo
Back to Cabbage Site

Keyboard GUI MIDI note activity color setting

In the music keyboard GUI widget settings, there is a color for mouseover, and black/white keys, spaces, arrows, edges etc… but based on the information I could find in the attributes panel and the online manual I could not find a setting for the color of notes that are being played by incoming MIDI data. It appears to be a default yellowish color which doesn’t really go with my scheme. I realize it may not seem like a big deal but I am obsessive with color and design.

here is an image captured from my GUI showing the mouseover color which is defined as white:

and here is the somewhat unattractive yellowish green color that represents midi activity:

I propose the following options:

the MIDI note activity could be represented with the color setting of the mouseover by default, and could have its own setting midinotecolor(R,G,B,A) which defaults to the setting of the mouseover color if it is not defined.

I also thought it could be interesting to add a setting velocityalpha(0 or 1) which would scale the alpha of the rectangle overlay for each midi note by midinotecolor alpha *= velocity/127

One other option that I thought of worth considering is an additional setting velocityscale(0) toggle under the colors or misc attributes. this would default to 0 which is off, a setting of 1 would display the midi velocity by scaling the overlaid rectangle anchored to the bottom of the key and scaled on the y axis by height * velocity/127 so that velocity 64 would be half the height of the key, 32 would be 1/4 the height of the key and 127 would be the full height of the key.

also I just noticed a little detail that the apple versioning of the cabbage application file is showing 1.0.0 in the bottom right of the file information:

while the help>about menu item shows v2.0.02

Thanks for this. The installer is what’s causing the wrong number to show. I’ll sort that out. Good call on the incoming note colour. Should be an easy fix. I can take a look at the alpha ideas, that will depend on his really I can access this info in JUCE. I’ll let you know.

1 Like

I’ve added a keydowncolour() identifier to deal with incoming notes. I’ll look into the other suggestions soon.

1 Like

You can grab the latest beta from links posted here

1 Like

I used the beta from your link, and added keydowncolour(255, 255, 0), and also tried keydowncolour(255, 0, 0, 0), and its still the same yellow :

and here is my line of code ;
keyboard bounds(5, 226, 560, 90), keydowncolour(255, 0, 0, 0), keyseparatorcolour(255, 255, 255, 128), blacknotecolour(255, 64, 128, 255), arrowbackgroundcolour(128, 128, 128, 255), mouseoeverkeycolour(255, 255, 255, 255), whitenotecolour(0, 0, 0, 64), active(1)

Hmm, I’ll take a look later. Maybe the changes didn’t go through…

Crap, looks like I didn’t push those changes through. Lucky enough they were not much work. I’ll try to get it done again tomorrow. Sorry about that.

I just pushed some changes through now. A new packages should be in the vBeta release section in the next hour or so. Note that the current mouseoverkeycolour() use an alpha channel, so keydowncolour() will contribute to that colour. So it’s best to use the same colour for both unless your happy with a blend between the two :wink:

It appears that in the new version of Cabbage (Help says 2.1.01, the keydowncolour(255, 255, 255, 255) is no longer working, and the color is the off yellow again.

it’s working for me, but you must press the key. Did you try mouseoverkeycolour() ?

Ah I see now that both the manual, and the syntax highlighter have a typo. Your mouseoverkeycolour() is spelled mouseoeverkeydown, I’ll sort that. Does the correct spelling help? Sorry, I can’t check myself right now…

It looks like mouseoverkeycolour() fixes it, it used to work with the other spelling.

My mistake. I know it might break some older GUIs but I think it’s best to stamp out the incorrect spelling!