# [SOLVED] Kontakt key colors disappeared



## danilocff (Sep 18, 2018)

So I was just at the very beginning of my script and key colors disappeared (the keys were the default color at the beginning).

The instrument works fine, but none of my attempts of bringing colors back seem to be working and could not find anything online. Ideas?

I attach a screenshot of my Kontakt window, in case it helps.


----------



## P.N. (Sep 18, 2018)

Hi.

You defined the note 60's color as default. That means that if your playable keyrange overlaps that note, it will be "invisible" as it's the same color as the default color assigned to playable notes. Change it to another color or change your playable keys to a different color instead and redefine 60 to default after you set your playable keyrange color.

*Note a*: It might be easier for scripters to help you if you post text as tagged code instead of a screenshot.

*Note b*: Unless you have some other tasks in mind (alternating between round-robin/random, turning off round-robin, etc) you don't really need code for round-robin. Simply set the group start options accordingly (from "always" to "cycle round_robin")

Cheers.


----------



## danilocff (Sep 18, 2018)

P.N. said:


> You defined the note 60's color as default. That means that if your playable keyrange overlaps that note, it will be "invisible" as it's the same color as the default color assigned to playable notes. Change it to another color or change your playable keys to a different color instead and redefine 60 to default after you set your playable keyrange color.



Wait, isn't $KEY_COLOR_DEFAULT the light blue-ish color you see when you throw samples in (or red for keyswitches)? And anyway, then why isn't key 64 red?



P.N. said:


> *Note a*: It might be easier for scripters to help you if you post text as tagged code instead of a screenshot.


Ok, I see, I posted the picture just to make sure my issue was clear showing the keyboard and groups (you never know, in case the problem was there).


----------



## P.N. (Sep 18, 2018)

The color red for keyswitches isn't required, it's just a convention. You can set up keyswitches any color you wish.
You should look into "set_key_type()" for more information on that.

About your script, i can't see any reason why the key 64 isn't red in your example code. It should.


----------



## EvilDragon (Sep 18, 2018)

You meant set_key_color(), probably


----------



## P.N. (Sep 18, 2018)

Yes, talking about "set_key_type" seems a little off topic, but since the OP mentioned keyswitches, i just wanted to pass on the idea that keys can be colored and type-tagged independently (in case his script eventually benefits/requires key_type tagging).

It's certainly not useful information for this particular example, i realize that, that's why i didn't go into details regarding that.

I apologize to both for any confusion.

Paulo


----------



## danilocff (Sep 18, 2018)

EvilDragon said:


> You meant set_key_color(), probably


For a second I hoped I had only misspelled the function :(


----------



## P.N. (Sep 18, 2018)

Your code is fine. It should work (works fine here).
Assuming that's the full code, if the colors aren't being displayed correctly, that means there's some other bug somewhere.
Which Kontakt version are you using? I've never encountered a version that presented this particular behaviour, but it might be something worth checking none-the-less.


----------



## danilocff (Sep 18, 2018)

I'm using 5.8.1, and never had this issue on any previous version.

UPDATE: Tried uninstalling and reinstalling, now the keyboard does not show any color even in the other libraries I have


----------



## danilocff (Sep 18, 2018)

OK, I found out that the "Options > Interface > Show mapping and keyswitches on keyboard" was disabled for some reason, it was enough to activate it to solve everything. -.-"


----------



## P.N. (Sep 20, 2018)

Great to see you solved it. 

I admit that going into the options interface tab didn't even cross my mind... I was already thinking "bug/error".

This is what happens if i focus too much on the code and not the software. I think i learned my lesson. 

Cheers.


----------

