Cabbage Logo
Back to Cabbage Site

Black keys on keyboard

Hi everyone,

I was wondering if there is a way to deactivate visually the keyboard unused key.

I’m building a vst with sample played by the keyboard and I would like to darken the keys that are not used by the sampler.

Is there any way to do that?

Thank you so much

Hi @Gabriele_Manniello, you can use blackNoteColour(). Another thing you could do is hide the top part of the keyboard so that only the area below the black notes are showing?

Hey @rorywalsh,

I think there was a misunderstanding
For what I know, blackNoteColour() makes the keyboard black notes of a specified colour.

I need to darken all the keys that I don’t use and leave the used ones to normal, as to show the active keys and the deactivated keys. I have multiple presets and it should change also depending of the preset. Is there any way to do that? Is saw plugins working on kontakt that have that type of dynamic keyboard.

Ah sorry, your thread subject threw me. What you can do is dynamically place images over the unused keys? Another approach would be to draw x different keyboard layouts, and then place these images on top of the keyboard widget as needed. You can set up images so that mouse presses are passed through them to the widget underneath. So users will still be able to play the notes. Does that make sense?

Yes, That’s what I imagined,

Thank You.