What's new

My slider picture doesn't work [SOLVED]

Fredeke

Active Member
Hello.

I am trying to learn how to skin my instruments.

I've tried to begin very simple, imitating a couple of tutorials... Well my first attempt just doesn't work at all !

I believe a picture will explain better than many words :



See how all the button's frames are layed out, like it's displaying the original png without understanding it is an animation ?

This is what I've tried so far, without any success:
- reducing the number of animation frames
- laying out a vertical animation strip (instead of an hozizontal one)
- setting $CONTROL_PAR_PICTURE_STATE to 0, then to 1 ...

Here's what I believe could be the beginning of a diagnostic :

Kontakt never created the knob2.txt file it was supposed to create next to knob2.png when displaying it for the first time (or so I've been told). I had to create and populate that txt file myself, but, since even when I turn off the alpha channel in the txt file, the button remains transparent in Kontakt, it would seem Kontakt doesn't even bother to look into the txt file. Hence it cannot know the picture is an animation strip.

So, what do you think I am doing wrong here ?
 
Last edited:

d.healey

Music Monkey
Kontakt doesn't create the text file, you have to do that. Have you created a resource container?
 
OP
Fredeke

Fredeke

Active Member
Kontakt doesn't create the text file, you have to do that. Have you created a resource container?
Yes, I've created a resource container, I think.

Here are the relevant files, with path relative to one another :

Skin Test.nki -> my instrument
Skin Test.nkr -> the resource container
Skin Test.nkc -> i don't know what that is, it got created at some point
Resources/ -> the temporary folder for what should go in the container (if I get this right)
Resources/pictures/knob2.png -> the picture for the slider
Resources/pictures/knob2.txt -> the text file for interpreting the slider's picture

However, Kontakt seems to ignore the text file.
 
Last edited:
Hi,

Is there an empty line in the .txt file after the 'Fixed Right:0' line? And make sure you saved the text file in UTF-8 coding. (although I'm not sure if its necessary.)

Regards,
Peter
 
OP
Fredeke

Fredeke

Active Member
Hi,

Is there an empty line in the .txt file after the 'Fixed Right:0' line? And make sure you saved the text file in UTF-8 coding. (although I'm not sure if its necessary.)

Regards,
Peter
Yes !!! Thanks man !

There was indeed no carriage return after the last line in the .txt file, and that was the problem.

As for UTF-8 vs anything else: except for an optional (and rarely used) flag at the beginning of the file, text files are the same no matter what their encoding is, as long as you use only super standard characters (like unaccented letters, digits, the most common punctuation, and a few other common signs like $, %, &, -, etc.). There are a few exotic encodings that don't follow this rule, but UTF-8 is not one of them. As soon as you divert from that however (i.e. by using regional characters like accents), then the encoding begins to matter. The point is, it shouldn't matter here.
 
Last edited:
OP
Fredeke

Fredeke

Active Member
I suppose the encoding would matter if I used non-ASCII (or non-ANSI, as EvilDragon suggests) characters in my picture's filename -- which would really be asking for trouble !
 
Last edited:
Top Bottom