# Adding an own ICON in KONTAKT... works and works NOT



## Cosmonomad (Feb 8, 2011)

*Hi Community!*
Scince i am a Newbie here, i again must say: *Its wonderful that i found you!*

Such a grrreat Pool of Knowledge, such a grrreat Family of Users!
Its NOT only a Phrase, when the Mooto says: *"Musicians helping Musicians"!*
Now i still study the *KSP-ReferenceGuide*... but here and there i get Problems, cause the Guide 
is more a LISTING than a TUTORIAL.
Also i searched over 30 Minutes with the Seach-Page here...i could not find any answer to this.

*The actual Prob is:*
On the left upper Part of Kontakt-Instrument there is the Icon that represent the Kind of Instrument. 
Kontakt has a view "Build in"-Icons... but now i found that Script-Line:

*set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,"ImageName")*

*My Experience is this: *
If i start to create an Instrument *from SCRATCH*... and then implement that Codeline.... *it WORKS great!*
BUT: 
*If i try to implement the same Line in an older Instrument* that already exists... it works *NOT!*

Can you please tell me why it* IS THIS WAY?*
*Or: *
Is there another way to get an own Icon in an already existing Instrument?
*Or: *
Do i something wrong?
*Additional Question:*
I own the "KSP-Reference Guide", own the "Kontakt 4 Player Developer Guide", know Nils Scripting Page.... 
but, is there any written Source that works like a "Step by Step-Tutorial" for the KSP? 
*For Example with Lessons like:*
"Now you learn how to implement a Reverb and Delay-Knob"

*Many Thanks for your Help!*
Cosmo


----------



## EvilDragon (Feb 8, 2011)

You do know that the custom icon image has to be located in:

(MAC) user/documents/native instruments/kontakt 4/pictures
(PC) <user my documents folder>/Native Instruments/Kontakt 4/Pictures

It is my suggestion that you have additional folders for each vendor/library in that Pictures folder. For example:

<user my documents folder>/Native Instruments/Kontakt 4/Pictures/Vendor/Library/icon.png

Then, you use this code to get to that image:

set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,"Vendor/Library/icon")


It must work like this.



The only problem I can see is that the "older instrument" you're mentioning, perhaps from a Kontakt Player licenced library, already has a custom icon determined in another script...


----------



## polypx (Feb 8, 2011)

The icon image also has to have a corresponding text file (which gives it's properties), I think.


----------



## EvilDragon (Feb 8, 2011)

Text file is created automatically if there isn't one. For icons, if it's not transparent, it will be fine. If the icon is transparent, the text file will have to be edited so that *Has Alpha Channel:* says "yes" instead of "no" ("no" is automatically created default).


----------



## Cosmonomad (Feb 8, 2011)

Thank you BOTH for the tips!
*@EvilDragon:*
That idea with the specified Vendors is a clever one... and i checked that out.
*But it is still the same:*
If i do a new script from Scratch like this:

on init
set_control_par_str($INST_ICON_ID,$CONTROL_PAR_PICTURE,"CNIinc/Selfsampledstrings/Juliascello")
end on

then it shows up* AND*: *Automatically* KONTAKT created a Textfile in that Folder!
*Its this:*

Has Alpha Channel: no 
Number of Animations: 0
Horizontal Animation: no
Vertical Resizable: no
Horizontal Resizable: no
Fixed Top: 0
Fixed Bottom: 0
Fixed Left: 0
Fixed Right: 0

I also could change the "Has Alpha Channel: no" to "yes" and my Juliascello.png changed 
to a part-transparent Icon!!!!

*so this answers polypix statement: *The Image don`t have to have this.

*BUT*... and i could cry... if i take an Instrument which is already done, with a Script 
(a Retail-Script that is 100% clean and correct) in it and an own Instrument-Wallpaper.... *the Icon DON`T CHANGE!*

Please... try this at your OWN Kontakt, please.
I can imagine hat you will have the same behavior.
*Anyway: Thanks for helping me,
Cosmo
*

Btw: EvilDragon... your MIDI-Latch-Script is sooo helpfull! Thanks again!


----------

