# Renaming Sample References



## gregjazz (Jul 22, 2010)

I have a simple problem. I need a way to replace the text (a prefix) in sample references to get other mic positions for a library I'm working on. Since there are loop points and sample start points, it would save weeks of tedious work.

I've tried Kontakt Assistant, and it doesn't work well at all. I've tried it on both my PC and Mac, and it is extremely buggy.

Basically all I need to do is be able to take an NKI or NKG (Kontakt group) and use a simple "search and replace text" function on the sample references, like you'd find in any simple text editor.

Any ideas?


----------



## polypx (Jul 22, 2010)

Greg,

If the samples are sorted in the same order in mic position 1 and mic position 2, ie. from low to high keys, you could make a Quick Key loop that would select the zone in Kontakt, "Exchange Sample", select the next sample from a folder, and then select the next zone. You could make the loop as long as there are number of samples in the group.

cheers
Dan


----------



## Mark Belbin (Jul 23, 2010)

Hey Greg,

Why not just save your alternate mic position samples in a different folder with a name that indicates the different position, and then "orphan" the original samples by renaming the original samples folder, opening the kontakt instrument, then pointing the missing samples dialog box to the new folder, and saving as a new .nki.

Then you can change the original folder's name back to the intended one, and the original mic position instrument will work as it should. Putting both mics in one instrument would then be a matter of group export/import, or as I recently discovered, copy and paste from one instrment to the other.

Voila! ...I think.

Mark


----------



## ddas (Jul 23, 2010)

Mark Belbin @ Fri Jul 23 said:


> Hey Greg,
> 
> Why not just save your alternate mic position samples in a different folder with a name that indicates the different position, and then "orphan" the original samples by renaming the original samples folder, opening the kontakt instrument, then pointing the missing samples dialog box to the new folder, and saving as a new .nki.
> 
> ...



Unfortunately, it wouldn't work, because then once the full instrument is assembled, there would be duplicate sample file names, which is strongly discouraged (and actually disallowed for Kontakt Player libraries).


----------



## ddas (Jul 23, 2010)

polypx @ Thu Jul 22 said:


> Greg,
> 
> If the samples are sorted in the same order in mic position 1 and mic position 2, ie. from low to high keys, you could make a Quick Key loop that would select the zone in Kontakt, "Exchange Sample", select the next sample from a folder, and then select the next zone. You could make the loop as long as there are number of samples in the group.
> 
> ...



Dan's suggestion is a good one if you are very careful about your naming (i.e. the samples to be swapped are adjacently alphabetical) and if you watch your automation routine carefully.

Note that Kontakt's alphabetization is different than the Finder's (e.g. in the Finder it intelligently knows that the order of numbers is 1 2 3 4 5 6 7 8 9 10, but Kontakt isn't that smart and it sorts the same list as 1 10 2 3 4 5 6 7 8 9 (etc.) so you have to be VERY careful with alphabetization.


----------



## Cinesamples (Jul 23, 2010)

Would ddas, or polypx be interested/available in helping us with this? It's for our choir library VOXOS.


----------



## Mark Belbin (Jul 23, 2010)

ddas @ Fri Jul 23 said:


> Unfortunately, it wouldn't work, because then once the full instrument is assembled, there would be duplicate sample file names, which is strongly discouraged (and actually disallowed for Kontakt Player libraries).



I just did a quick test with an instrument that had two samples with the same name. Kontakt saved both in the same directory and added an underscore to one of them. That being the case, I think the Kontakt player compiling process would still work fine. I guess (assuming this approach is preferable to any others offered) it's down to whether greg's ok with Kontakt's arbitrary re-naming convention, or wants to use some higher-level indication of which sample is which.

-M


----------



## ddas (Jul 23, 2010)

Mark Belbin @ Fri Jul 23 said:


> I just did a quick test with an instrument that had two samples with the same name. Kontakt saved both in the same directory and added an underscore to one of them. That being the case, I think the Kontakt player compiling process would still work fine. I guess (assuming this approach is preferable to any others offered) it's down to whether greg's ok with Kontakt's arbitrary re-naming convention, or wants to use some higher-level indication of which sample is which.
> -M



Ooh, that's very interesting. So Kontakt has a built-in renaming function for when it detects duplicate sample names. I guess that makes sense, since if you used two kick.wav samples in an instrument and told Kontakt to save as patch+samples, it couldn't write two samples with identical names into the same folder.

So Mark is right. You could use that method to do it, although it depends how meticulous you are about your organization, since Kontakt will rename things with an extra underscore to differentiate. This could make file management more tricky later (e.g. I can't guarantee that all stage mics would have one underscore or two underscores or three underscores, since Kontakt would likely rename them in the order it finds them) so that means that reverse-engineering this later, if you should ever need to, could be a nightmare. However, it will work for the specific purpose you mentioned at the top of this thread.


----------



## gsilbers (Jul 23, 2010)

http://renamer4mac.com/


----------



## ddas (Jul 23, 2010)

gsilbers @ Fri Jul 23 said:


> http://renamer4mac.com/


 No renamer will help in this case. Greg needs something that can rename references inside the Kontakt file.

Renaming files outside (at the Finder) is fairly easy using any number of free/cheap tools, but they won't help him with his current problem.


----------



## gsilbers (Jul 23, 2010)

oops :(


----------



## EvilDragon (Jul 23, 2010)

ddas @ 23.7.2010 said:


> Unfortunately, it wouldn't work, because then once the full instrument is assembled, there would be duplicate sample file names, which is strongly discouraged (and actually disallowed for Kontakt Player libraries).



BUT, if each mic position was saved in a different monolith file AND different folders within a monolith, there wouldn't (shouldn't?) be problems?


----------



## ddas (Jul 23, 2010)

EvilDragon @ Fri Jul 23 said:


> BUT, if each mic position was saved in a different monolith file AND different folders within a monolith, there wouldn't (shouldn't?) be problems?



Sort of, but not for Greg's purposes.

A monolith file in the end-user sense represents an NKI saved as a monolith, which means it's just one instrument, which means you couldn't have duplicate sample names within that one monolith (and Kontakt would rename them for you, as detailed above).

A monolith in the Kontakt Player sense (the NKX or NKS files) can only be built by NI for a Kontakt Player product. This is what Greg's working towards, and NI forbids duplicate sample names within any whole Kontakt Player library.


----------



## gregjazz (Jul 24, 2010)

The only difference in sample names between mics is a two-letter prefix. For example:

Close mic: "FX_M_*CL*_SHOUT_Khree.wav"
Far mic: "FX_M_*FR*_SHOUT_Khree.wav"

So all I need to do is go through all the sample references and rename those two letters. It's okay if Kontakt needs to refind the samples, since all the sample names are unique.


----------



## MaraschinoMusic (Jul 26, 2010)

*Renaming Sample References...*



gregjazz @ Sat Jul 24 said:


> The only difference in sample names between mics is a two-letter prefix. For example:
> 
> Close mic: "FX_M_*CL*_SHOUT_Khree.wav"
> Far mic: "FX_M_*FR*_SHOUT_Khree.wav"
> ...



I would be very interested too if anyone can shed any light on this. I have tried looking at the .NKI file format in a Hex editor, but can't find and direct references to sample names. Someone somewhere informed me that the .NKI format is a unicode XML file, but I still can't get at those damn sample names...! If we could parse the .NKI file, it would be a very simple matter to do a search & replace within the file.

Any takers...? Perhaps Garth Hjelte form Chicken Systems would know? 8)


----------

